asp.net mvc 3 - How to add same column multiple times in mvcgrid in mvc3 view -
below code mvcgrid
. model contains properties name
, productcode
, avgwaight
. want add column productcode
2 times. @ runtime argument exception thrown "column 'productcode ' exist in grid"
@html.grid(model).columns(columns => { columns.add(c => c.name).titled("product name ").setwidth(200).sortable(true).filterable(true); columns.add(c => c.productcode).titled("product code").setwidth(200).sortable(true).filterable(true); columns.add(c => c.avgweight).titled(" avg. weight").setwidth(300).sortable(true).filterable(true); }).withpaging(5)
how add same column multiple times, different titles.
thank in advance
do way, worked me.
@html.grid(model).columns(columns => { columns.add(c => c.name).titled("product name").setwidth(200).sortable(true).filterable(true); columns.add(c => c.productcode).titled("product code").setwidth(200).sortable(true).filterable(true); columns.add(c => c.productcode, "duplicate column").titled("product code").setwidth(200).sortable(true).filterable(true); }
Comments
Post a Comment