0
我正在使用asp .net MVC3來懸停選定的列。有一個網格,Multiselect Listbox和一個頁面中的按鈕。我使用下面的webgrid來顯示錶。jquery函數來隱藏webgrid列
@{
var grid = new WebGrid(Model.oTravelReadyEntities, canPage: true, rowsPerPage: 3);
grid.Pager(WebGridPagerModes.NextPrevious);
@grid.GetHtml(tableStyle:"WebGrid",
headerStyle:"Header",
alternatingRowStyle:"alt",
columns:grid.Columns(
grid.Column("Var_AssoId", "Var_AssoId", canSort: true, format: @<b>@item.Var_AssoId</b>,style:"Number"),
grid.Column("Var_AssociateName", "Var_AssociateName"),
grid.Column("Var_Grade", "Var_Grade"),
grid.Column("Char_VirtualPool", "Char_VirtualPool"),
grid.Column("Var_VirtualPoolCatagory", "Var_VirtualPoolCatagory"),
grid.Column("Char_VisaUtilization", "Char_VisaUtilization"),
grid.Column("Var_SupervisorId", "Var_SupervisorId"),
grid.Column("Var_SupervisorName", "Var_SupervisorName"),
grid.Column("Var_Deparment", "Var_Deparment"),
grid.Column("Var_Vertical", "Var_Vertical"),
grid.Column("Var_AccountName", "Var_AccountName"),
grid.Column("Var_Project_Desc", "Var_Project_Desc")
));
}
在運行時,當我點擊顯示按鈕,我將選擇多個列表框被選擇後COLUMNNAMES下的WebGrid放在列名,則應該的WebGrid只顯示選定列,其他列應該hided.how我可以使用jquery嗎?