Question

I have a kendo grid with datasource. Each time it is refreshing the old data with new data. But my requirement is quite different I also want display old data as well.

Another data source is in anotherKENDO GRID.

My Kendo Grid as below:

 @(Html.Kendo().Grid<ABC>()
                            .Name("grdABC")
                            .HtmlAttributes(new { style = "height:450px" })
                            .Columns(columns =>
                            {
                                columns.Bound(d => d.ID).Hidden(true);
                                columns.Bound(d => d.Group).Hidden(true);
                                columns.Bound(d => d.Name).Title("Name").Width(350);
                            })
                            .Selectable(selectable => selectable
                            .Mode(GridSelectionMode.Multiple))
                            .Scrollable()
                            .Filterable()
                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .Sort(sort => sort.Add("Name").Ascending())
                                .Model(model => model.Id(p => p.ID))
                                .Read(read => read.Action("GetSelectedNames", "EligCriteria", new { Id = Model.ID != null ? Model.ID : (decimal?)null }).Data("getSelectedEligibilityNames"))
                            )                            
                            .AutoBind(false)
              )
Was it helpful?

Solution

We can maintain using below code:

var grid = $("#GridID").data("kendoGrid");
grid.one("dataBinding", function(e){
          e.preventDefault()
 });
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top