This question is locked. New answers and comments are not allowed.
i have a model with 2 properties for example ProductName and MyName, lets say ProductName is my primary key so i set it as my DataKey in the telerik grid all works fine aslong as i position the column commands after all the other columns. The problem is when i position the column commands at the far left side just before the other columns which makes some of the client validation is not displaying.
example: using this code will place the column commands right before the ProductName when i try to trigger any client validation ProductName client side validation will not display but MyName column's client side validation will.
i have also found out that if i use a different column as DataKey all will work fine where ever i place the command columns, but i am trying to avoid adding a new column for the DataKey. Is there any fix for this?
example: using this code will place the column commands right before the ProductName when i try to trigger any client validation ProductName client side validation will not display but MyName column's client side validation will.
@(Html.Telerik().Grid<EditableProduct>() .Name("Grid") .DataKeys(keys => { keys.Add(p => p.ProductName
); }) .ToolBar(commands => commands.Insert().ButtonType(GridButtonType.Image).ImageHtmlAttributes(new {style="margin-left:0"})) .DataBinding(dataBinding => { dataBinding.Ajax() .Select("_SelectAjaxEditing", "Home") .Insert("_InsertAjaxEditing", "Home") .Update("_SaveAjaxEditing", "Home") .Delete("_DeleteAjaxEditing", "Home"); }) .Columns(columns => { columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Image); commands.Delete().ButtonType(GridButtonType.Image); }).Width(180).Title("Commands"); columns.Bound(p => p.ProductName).Width(210); columns.Bound(p => p.MyName).Width(210); }) .Editable(editing => editing.Mode(GridEditMode.InLine)) .Pageable() .Scrollable() .Sortable() )i have also found out that if i use a different column as DataKey all will work fine where ever i place the command columns, but i am trying to avoid adding a new column for the DataKey. Is there any fix for this?