This question is locked. New answers and comments are not allowed.
Hi ,
I am using MVC 3.0 and telerik controls for MVC 3.0 , I am trying to disable grid sorting on all columns using :
Sortable(sorting => sorting.Enabled(false))
However , nothing has been changed , all columns still sortable , event disable sorting on each column using :
columns.Bound(o => o.Text).EditorTemplateName("MatchTypeText").Sortable(false)
isn't working too.
Here is my html code for the grid :
@(Html.Telerik().Grid(Model)
.Name("Grid")
.DataKeys(p => p.Add(o => o.TextFilterId))
.DataBinding(dataBinding =>
{
dataBinding.Ajax().Update("textfiltersactions", "appsite", new { actionName = "update" });
dataBinding.Ajax().Delete("textfiltersactions", "appsite", new { actionName = "delete" });
dataBinding.Ajax().Insert("textfiltersactions", "appsite", new { actionName = "insert" });
dataBinding.Ajax().Select("textfiltersactions", "appsite");
})
.ToolBar(commands => commands.Position(GridToolBarPosition.Top).Insert().ButtonType(GridButtonType.BareImage))
.Columns(columns =>
{
columns.Bound(o => o.Text).EditorTemplateName("MatchTypeText").Sortable(false);
columns.Bound(o => o.MatchTypeText).Width(180).EditorTemplateName("MatchTypeDropDownList").Sortable(false);
columns.Command(o =>
{
o.Edit().ButtonType(GridButtonType.BareImage);
o.Delete().ButtonType(GridButtonType.BareImage);
}).Width(100);
})
.EnableCustomBinding(true)
.Sortable(sorting => sorting.Enabled(false))
.Editable(editing => editing.Mode(GridEditMode.InLine))
.Scrollable(scrolling => scrolling.Enabled(false))
.Footer(false).ClientEvents(events => events.OnError("textFilterOperationError")))
Please help me , I have to fix this issue ASAP.
Thanks
I am using MVC 3.0 and telerik controls for MVC 3.0 , I am trying to disable grid sorting on all columns using :
Sortable(sorting => sorting.Enabled(false))
However , nothing has been changed , all columns still sortable , event disable sorting on each column using :
columns.Bound(o => o.Text).EditorTemplateName("MatchTypeText").Sortable(false)
isn't working too.
Here is my html code for the grid :
@(Html.Telerik().Grid(Model)
.Name("Grid")
.DataKeys(p => p.Add(o => o.TextFilterId))
.DataBinding(dataBinding =>
{
dataBinding.Ajax().Update("textfiltersactions", "appsite", new { actionName = "update" });
dataBinding.Ajax().Delete("textfiltersactions", "appsite", new { actionName = "delete" });
dataBinding.Ajax().Insert("textfiltersactions", "appsite", new { actionName = "insert" });
dataBinding.Ajax().Select("textfiltersactions", "appsite");
})
.ToolBar(commands => commands.Position(GridToolBarPosition.Top).Insert().ButtonType(GridButtonType.BareImage))
.Columns(columns =>
{
columns.Bound(o => o.Text).EditorTemplateName("MatchTypeText").Sortable(false);
columns.Bound(o => o.MatchTypeText).Width(180).EditorTemplateName("MatchTypeDropDownList").Sortable(false);
columns.Command(o =>
{
o.Edit().ButtonType(GridButtonType.BareImage);
o.Delete().ButtonType(GridButtonType.BareImage);
}).Width(100);
})
.EnableCustomBinding(true)
.Sortable(sorting => sorting.Enabled(false))
.Editable(editing => editing.Mode(GridEditMode.InLine))
.Scrollable(scrolling => scrolling.Enabled(false))
.Footer(false).ClientEvents(events => events.OnError("textFilterOperationError")))
Please help me , I have to fix this issue ASAP.
Thanks