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

IDKeyNameFlagAmountNumberBirthday
1 KeyName mkkllllllllllll M 1234.56 123456 17-Aug-1973
2 Charlotte F 4444.65 1234 18-Aug-1993
3 n d 123.00 123 30-Dec-1960
4 f e 1.00 11324 10-Nov-1989
5 4526 Q 62.00 31315546546 28-May-1932
6 keyname W 12.00 123456 14-Jul-1981
7 6611 s 5.00 12 11-Jun-1973
8 g g 123.45 12345 28-Feb-4000
9 minus g 12.10 6666 13-Aug-1967
10 nn g 123.45 654321 16-Sep-1968
11 gg f 0.12 12345 21-Aug-1945
12 minus x 5.00 5 20-Apr-1958
13 Darren M 12.00 12 20-Dec-1960
14 hjk f 4.00 5 18-Sep-2015
15 ret M 4.00 4 02-Sep-2015
16 ert t 5.00 56 20-Sep-2015
17 a f 1.00 2 04-Jan-2016
18 banana w 12.00 43 13-Feb-2016
19 abc f 123.00 12 02-Feb-2016
20 gfhgfh f 65655665.00 65554 07-Mar-2016
21 try65yrty i 65.00 123445 08-Mar-2016
22 ewtwtew h 54.00 1234 14-Mar-2016
Above is a selection from Holding Table joined to the Gift Table.
 Expiry 1   Contract 2   Status 3   Last 4   Open 5   Bvol 6   Bid 7   RFQ 8   Ask 9   Avol 10   High 11   Low 12   Time 13   Vol 14   Sett 15   Lvol 16   2nd Last 17   3rd Last 18   Opn Int 19   Change 20 
The display above uses a Repository object in the view model, passed to the viewmodel as a list allowing foreach() in Razor.
@foreach (var item in Model.WebMarketDisplayColumns)
{
   <th width="@(item.Size)"><b>@(item.Title)</b> </th>
}
The ViewModel: public List<MarketDisplayWeb> WebMarketDisplayColumns { get; set; }
is populated in the Controller via a static class that calls a new member function: viewModel.WebMarketDisplayColumns = Repository.GetWebMarketDisplay();
expExpiry#ffffff#00000030
cntContract#ffffff#00000060
mktStatus#ffffff#00000030
lstLast#ffffff#00000030
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
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.WebMarketDisplayColumns) { @( @MvcHtmlString.Create( item.htmlString() ) ); }
Now the more powerful repository object 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
oinOpn Int#ffffff#00000040
tlt3rd Last#ffffff#00000030
slt2nd Last#ffffff#00000030
lvlLvol#ffffff#00000030
setSett#ffffff#00000030
volVol#ffffff#00000030
tmeTime#ffffff#00000030
lowLow#ffffff#00000030
hghHigh#ffffff#00000030
SLAvol#ffffff#00000030
SPAsk#f5beaa#00000030
rfqRFQ#ffffff#00000030
BPBid#a7ccf6#00000030
BLBvol#ffffff#00000030
opnOpen#ffffff#00000030
lstLast#ffffff#00000030
mktStatus#ffffff#00000030
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 | SL | Avol | #ffffff | #000000 | 30
WebMarketDisplayColumns: WMDColumns:
This Select has defaulted to #4 in its list, its on change handler is in jQuery.
jQueryBound WMDColumns:
jQueryBound WMDColumns: