This question is locked. New answers and comments are not allowed.
Hi Team,
I am trying to use delete button in the grid using Ajax databinding. Below is the code snippet which I use, with this grid is populating data properly but when I click on delete button it is asking 'are you sure you want to delete this record?'. After clicking on ok it is giving javascript error saying 'Profile.AccountNumber' is null or not an object error message.
@(Html.Telerik().Grid(Model.PartnerDetails.SubPartnersList).Name("PartnerManagement") .DataKeys(keys => keys.Add(o => o.Profile.AccountNumber)) .DataBinding(dataBinding => { dataBinding.Ajax() .Delete("DeletePartner", "PartnerManagement"); }) .Columns(columns => { columns.Bound(o => o.Profile.CompanyName).Title(ViewResources.PartnerManagement.GetSubPartnerList.PartnerName); columns.Bound(o => o.Addresses.BillingAddress.StateProvinceCode).Title(ViewResources.PartnerManagement.GetSubPartnerList.State); columns.Bound(o => o.Addresses.BillingAddress.CountryCode).Title(ViewResources.PartnerManagement.GetSubPartnerList.Country); columns.Bound(o => o.SellerDetails.PartnerTypeCode).Title(ViewResources.PartnerManagement.GetSubPartnerList.PartnerType); columns.Command(commands => { commands.Delete(); } ).Width(180).Title(""); }) .ClientEvents(e => e.OnLoad("customizeTelerikGridFilter")) .Pageable() .Sortable(sorting => sorting .OrderBy(sortOrder => sortOrder.Add(o => o.Profile.CompanyName).Ascending())) .Filterable() )Please help in soving this problem. Here I am trying to bind to a model with 2 levels of list items in it. Is it causing the problem because I am assigning a property in the second level of a list ?