1   Expiry 2   Contract 3   Status 4   Last 5   Open 6   Bvol 7   Bid 8   RFQ 9   Ask 10   Avol 11   High 12   Low 13   Time 14   Vol 15   Sett 16   Lvol 17   2nd Last 18   3rd Last 19   Opn Int 20   Change
The uses a Repository object in the view model, passed to the viewmodel as a list allowing foreach() in Razor.
@foreach (var item in Model.DecoratedDisplayColumns)
{
   <th width="@(item.Size)"><b>@(item.Title)</b> </th>
}
The ViewModel: public List<DecoratedDisplay> DecoratedDisplayColumns { get; set; }
is populated in the Controller via a static class that calls a new member function: viewModel.DecoratedDisplayColumns = LookUp.GetDecoratedDisplay();

The object has a htmlString() function method to return in HTML a Table Row which requires @MvcHtmlString.Create() is used before Razor() rendering it.
Syntax: @foreach (var item in Model.DecoratedDisplayColumns) { @( @MvcHtmlString.Create( item.htmlString() ) ); }
expExpiry#ffffff#00000030
cntContract#ffffff#00000030
mktStatus#ffffff#00000016
lstLast#ffffff#00000016
opnOpen#ffffff#00000030
BLBvol#ffffff#00000030
BPBid#a7ccf6#00000030
rfqRFQ#ffffff#00000030
SPAsk#f5beaa#00000030
SLAvol#ffffff#00000030
hghHigh#ffffff#00000030
lowLow#ffffff#00000030
tmeTime#ffffff#00000030
volVol#ffffff#00000030
setSett#ffffff#00000030
lvlLvol#ffffff#00000030
slt2nd Last#ffffff#00000030
tlt3rd Last#ffffff#00000030
oinOpn Int#ffffff#00000040
chgChange#ffffff#00000030

Now the more powerful repository object <WebMarketDisplay> with internal ArrayList and Hashtable support has a fetch(n).
Syntax:
@for (var i = 20 ; i > 0 ; i--)
{
    @( @MvcHtmlString.Create( Model.WMDColumns.fetch(i).htmlString() ) );
}
chgChange#ffffff#00000030
volVolume#ffffff#00000030
oinOpn Int#ffffff#00000040
setSettle#ffffff#00000030
opnOpen#ffffff#00000030
tlt3rd Last#ffffff#00000030
slt2nd Last#ffffff#00000030
lowLowest#ffffff#00000030
hghHighest#ffffff#00000030
SLAvol#ffffff#00000030
SPAsk#f5beaa#00000030
rfqRFQ#ffffff#00000030
BPBid#a7ccf6#00000030
BLBvol#ffffff#00000030
tmeTime#ffffff#00000030
lvlLvol#ffffff#00000030
lstLast#ffffff#00000012
mktStatus#ffffff#00000012
cntContract#ffffff#00000060
expExpiry#ffffff#00000030

Output Object 10 By Attribute Name, using this style of Syntax:
@( @MvcHtmlString.Create(Model.WMDColumns.fetch(10).Title ) ) |
@( @MvcHtmlString.Create(Model.WMDColumns.fetch(10).Color ) )
10 | SP | Ask | #f5beaa | #000000 | 30

WMDColumns: DecoratedDisplayColumns:
jQueryBound WMDColumns:  This [Title] Select has defaulted to #4 in its list, its on change handler is in jQuery.
jQueryBound WMDColumns:  This [Color] Select has defaulted to #14 in its list, its on change handler is in jQuery.
Below is Data From Stored Proceedure
CREATE PROCEDURE [dbo].[TSI_Calendar_Query]
AS
BEGIN
SELECT D_Contract.ContractNo AS D_Contract_ContractNo, 
D_Contract.ContractType, D_Contract.CONTRACT, 
D_Contract.Title AS D_Contract_Title, 
D_ContractType.IDN, D_ContractType.Title AS D_ContractType_Title, 
D_ContractType.ICODE, D_Calendar.Yieldpoint AS D_Calendar_Yieldpoint, 
D_Calendar.deliveryMonth, 
D_Calendar.Mnemonic, D_Calendar.monthCode, D_Calendar.Expires, D_Curve.ContractNo AS D_Curve_ContractNo, 
D_Curve.Yieldpoint AS D_Curve_Yieldpoint
FROM (D_Contract INNER JOIN D_ContractType ON D_Contract.ContractType = D_ContractType.IDN) 
INNER JOIN (D_Calendar INNER JOIN D_Curve ON D_Calendar.Yieldpoint = D_Curve.Yieldpoint) 
ON D_Contract.ContractNo = D_Curve.ContractNo
Order By D_Contract.ContractNo, D_Calendar.deliveryMonth;

END
ContractNo ContractType Contract IDN InstrumentCODE YieldPt Month Mnemonic monthCode Expires CurveContract CurveYieldPt
1 2 HO 2 FP---EMM 1 20130315 Mar13 H3 15/03/2013 00:00:00 1 1
1 2 HO 2 FP---EMM 2 20130415 Apr13 J3 15/04/2013 00:00:00 1 2
1 2 HO 2 FP---EMM 3 20130515 May13 K3 15/05/2013 00:00:00 1 3
1 2 HO 2 FP---EMM 4 20130615 Jun13 M3 15/06/2013 00:00:00 1 4
1 2 HO 2 FP---EMM 5 20130715 Jul13 N3 15/07/2013 00:00:00 1 5
1 2 HO 2 FP---EMM 6 20130815 Aug13 Q3 15/08/2013 00:00:00 1 6
1 2 HO 2 FP---EMM 7 20130915 Sep13 U3 15/09/2013 00:00:00 1 7
1 2 HO 2 FP---EMM 8 20131015 Oct13 V3 15/10/2013 00:00:00 1 8
1 2 HO 2 FP---EMM 9 20131115 Nov13 X3 15/11/2013 00:00:00 1 9
1 2 HO 2 FP---EMM 10 20131215 Dec13 Z3 15/12/2013 00:00:00 1 10
1 2 HO 2 FP---EMM 11 20140115 Jan14 F4 15/01/2014 00:00:00 1 11
1 2 HO 2 FP---EMM 12 20140215 Feb14 G4 15/02/2014 00:00:00 1 12
1 2 HO 2 FP---EMM 13 20140315 Mar14 H4 15/03/2014 00:00:00 1 13
1 2 HO 2 FP---EMM 14 20150315 Mar15 H5 15/03/2015 00:00:00 1 14
1 2 HO 2 FP---EMM 15 20160315 Mar16 H6 15/03/2016 00:00:00 1 15
1 2 HO 2 FP---EMM 16 20170315 Mar17 H7 15/03/2017 00:00:00 1 16
1 2 HO 2 FP---EMM 17 20180315 Mar18 H8 15/03/2018 00:00:00 1 17
3 2 CL 2 FP---EMM 1 20130315 Mar13 H3 15/03/2013 00:00:00 3 1
3 2 CL 2 FP---EMM 2 20130415 Apr13 J3 15/04/2013 00:00:00 3 2
3 2 CL 2 FP---EMM 3 20130515 May13 K3 15/05/2013 00:00:00 3 3
3 2 CL 2 FP---EMM 4 20130615 Jun13 M3 15/06/2013 00:00:00 3 4
3 2 CL 2 FP---EMM 5 20130715 Jul13 N3 15/07/2013 00:00:00 3 5
3 2 CL 2 FP---EMM 6 20130815 Aug13 Q3 15/08/2013 00:00:00 3 6
3 2 CL 2 FP---EMM 7 20130915 Sep13 U3 15/09/2013 00:00:00 3 7
3 2 CL 2 FP---EMM 8 20131015 Oct13 V3 15/10/2013 00:00:00 3 8
3 2 CL 2 FP---EMM 9 20131115 Nov13 X3 15/11/2013 00:00:00 3 9
3 2 CL 2 FP---EMM 10 20131215 Dec13 Z3 15/12/2013 00:00:00 3 10
3 2 CL 2 FP---EMM 11 20140115 Jan14 F4 15/01/2014 00:00:00 3 11
3 2 CL 2 FP---EMM 12 20140215 Feb14 G4 15/02/2014 00:00:00 3 12
3 2 CL 2 FP---EMM 13 20140315 Mar14 H4 15/03/2014 00:00:00 3 13
3 2 CL 2 FP---EMM 14 20150315 Mar15 H5 15/03/2015 00:00:00 3 14
3 2 CL 2 FP---EMM 15 20160315 Mar16 H6 15/03/2016 00:00:00 3 15
3 2 CL 2 FP---EMM 16 20170315 Mar17 H7 15/03/2017 00:00:00 3 16
3 2 CL 2 FP---EMM 17 20180315 Mar18 H8 15/03/2018 00:00:00 3 17
Above is Data Using DecoratedController.cs public ActionResult Details(int id = 0)
IDKeyNameFlagAmountNumberBirthday
1 KeyName M 1234.56 123456 17/08/1973 00:00:00
2 Charlotte F 4444.65 1234 18/08/1993 00:00:00
3 n d 123.00 123 30/12/1960 00:00:00
4 f e 1.00 11324 10/11/1989 00:00:00
5 4526 Q 62.00 31315546546 28/05/1932 00:00:00
6 keyname W 12.00 123456 14/07/1981 00:00:00
7 6611 s 5.00 12 11/06/1973 00:00:00
8 g g 123.45 12345 28/02/4000 00:00:00
9 minus g 12.10 6666 13/08/1967 00:00:00
10 nn g 123.45 654321 16/09/1968 00:00:00
11 gg f 0.12 12345 21/08/1945 00:00:00
12 minus x 5.00 5 20/04/1958 00:00:00
13 Darren M 12.00 12 20/12/1960 00:00:00
14 hjk f 4.00 5 18/09/2015 00:00:00
15 ret M 4.00 4 02/09/2015 00:00:00
16 ert t 5.00 56 20/09/2015 00:00:00
17 a f 1.00 2 04/01/2016 00:00:00
18 banana w 12.00 43 13/02/2016 00:00:00
19 abc f 123.00 12 02/02/2016 00:00:00
20 gfhgfh f 65655665.00 65554 07/03/2016 00:00:00
21 try65yrty i 65.00 123445 08/03/2016 00:00:00
22 ewtwtew h 54.00 1234 14/03/2016 00:00:00
24 ghghgh h 5465656.00 5545 10/10/2017 00:00:00
Above is a selection from Holding Table joined to the Gift Table.

Details: User Defined Lists for Razor @Html.DropDown and MvcHtmlString.Create. Scroll Full Page