Hi,
I have the below grid created in .cshtml
.cshtml
@(Html.Kendo().Grid((IEnumerable<FundFeeModel>)null)
.Name("Grid")
.Columns(columns =>
{
//columns.Template(@<text></text>).ClientTemplate("<input type='radio' id='rdoselect' value='#=FlatFeeId#' onclick='Javascript:SelectFlatFeeRecord(this)' name='group1' />").Width(90);
columns.Template(@<text></text>).ClientTemplate("<input type='radio' id='rdoselect' value='#=FundFeePeriodId#' onclick='Javascript:SelectFundFeePeriodRecord(this)' name='group1' />").Width(90);
columns.Bound(p => p.FeeTypeId).Groupable(false).Title("Fee Type").Visible(false);
columns.Bound(p => p.FeeTypeName).Groupable(false).Title("Fee Type").Width(300);
columns.Bound(p => p.SDate).Title("Start Date").Width(200);
columns.Bound(p => p.EDate).Title("End Date").Width(200);
})
.Pageable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetPeriodwiseFundFees", "FundFee"))
)
.Filterable()
.Pageable(pager => pager.PageSizes(new int[] { 10, 15, 20, 25, 30 })))
From the .js file i am able to hide the bound columns using the following syntax -
control.hideColumn('FeeTypeId');
control.hideColumn('FeeTypeName');
control.hideColumn('SDate');
control.hideColumn('EDate');
Question - How can I hide the Template Column by setting an Id/Name and using that Id/Name to hide the column from .js?
Note: control.hideColumn(0) doesn't meet my requirement as I need to set this asned on user access permission.
Thanks
I have the below grid created in .cshtml
.cshtml
@(Html.Kendo().Grid((IEnumerable<FundFeeModel>)null)
.Name("Grid")
.Columns(columns =>
{
//columns.Template(@<text></text>).ClientTemplate("<input type='radio' id='rdoselect' value='#=FlatFeeId#' onclick='Javascript:SelectFlatFeeRecord(this)' name='group1' />").Width(90);
columns.Template(@<text></text>).ClientTemplate("<input type='radio' id='rdoselect' value='#=FundFeePeriodId#' onclick='Javascript:SelectFundFeePeriodRecord(this)' name='group1' />").Width(90);
columns.Bound(p => p.FeeTypeId).Groupable(false).Title("Fee Type").Visible(false);
columns.Bound(p => p.FeeTypeName).Groupable(false).Title("Fee Type").Width(300);
columns.Bound(p => p.SDate).Title("Start Date").Width(200);
columns.Bound(p => p.EDate).Title("End Date").Width(200);
})
.Pageable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetPeriodwiseFundFees", "FundFee"))
)
.Filterable()
.Pageable(pager => pager.PageSizes(new int[] { 10, 15, 20, 25, 30 })))
From the .js file i am able to hide the bound columns using the following syntax -
control.hideColumn('FeeTypeId');
control.hideColumn('FeeTypeName');
control.hideColumn('SDate');
control.hideColumn('EDate');
Question - How can I hide the Template Column by setting an Id/Name and using that Id/Name to hide the column from .js?
Note: control.hideColumn(0) doesn't meet my requirement as I need to set this asned on user access permission.
Thanks