This is a migrated thread and some comments may be shown as answers.

[Solved] Delete from grid js error

0 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marcin
Top achievements
Rank 1
Marcin asked on 28 Jul 2011, 08:13 AM

simple question. After i click my "x" button on grid to delete i got strange js error  
telerik mvc grid this.deletedIds is empty or is not an object
What is other than normal is this that i show this partial view on edit popup from other grid
This error comes from telerik.common.min.js
My view code is
:

@model IEnumerable<CentralSystem.Services.DTO.Item.ProductItem>
 @Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.vista.css"))
       @(Html.Telerik().Grid(Model)
       .DataKeys(keys => keys.Add(o => o.ProductId))
       .Name("choosenProducers")      
       .Columns(columns =>   
       {
           columns.Bound(o => o.ProductId).Hidden(true);
           columns.Bound(o => o.ProductName).Title((@Resources.I18n.MODEL_PRODUCT_NAME)).Width(250);
           columns.Bound(o => o.ProductBloz12).Title((@Resources.I18n.MODEL_PRODUCT_BLOZ12)).Width(90);
           columns.Bound(o => o.ProductActiveSubstance).Title((@Resources.I18n.MODEL_PRODUCT_ACTIVE_SUBSTANCE)).Width(120);
           columns.Bound(o => o.DistributorName).Title((@Resources.I18n.MODEL_PRODUCT_DISTRIBUTOR_NAME)).Width(120);
           columns.Bound(o => o.ProducerName).Title((@Resources.I18n.MODEL_PRODUCT_PRODUCER_NAME)).Width(120);
           columns.Bound(o => o.MahName).Title((@Resources.I18n.MODEL_PRODUCT_MAH_NAME)).Width(120);
           columns.Command(o =>
           {
               o.Delete().ButtonType(GridButtonType.Image);
           }).Width(35);
       })
               .DataBinding(dataBinding => dataBinding
                   //Ajax binding
                            .Ajax()
                                .OperationMode(GridOperationMode.Client)
                   //The action method which will return JSON
                                .Delete("_AjaxDeletePartnerSelelctedProduct", "PartnerProducts")
                        )
       .Scrollable()
       .HtmlAttributes(new { style = "height:170px;" }) 
  
       
       <br class="cl" />
Tags
Grid
Asked by
Marcin
Top achievements
Rank 1
Share this question
or