Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
problems with the igGrid,displaying more records than the page size after adding rows programatically
posted

i am having problem when adding row programatically,, i have got a simple row..with only a fild and i am using paging..

the code for adding 6 consecutives rows..

    $('#grid_Software').igGridUpdating('addRow', { 'IDSoftware': 1 });
    $('#grid_Software').igGridUpdating('addRow', { 'IDSoftware': 3 });
    $('#grid_Software').igGridUpdating('addRow', { 'IDSoftware': 1 });
    $('#grid_Software').igGridUpdating('addRow', { 'IDSoftware': 3});
    $('#grid_Software').igGridUpdating('addRow', { 'IDSoftware': 1 });
    $('#grid_Software').igGridUpdating('addRow', { 'IDSoftware': 3 });

    $('#grid_Software').igGrid("commit");

the code for the grid..

  @( Html.Infragistics().Grid().ID("grid_Software").DefaultColumnWidth("100px")

        .PrimaryKey("IDSoftware")
     
        .Columns(column =>

column.For(x => x.IDSoftware
                );
           })
        .Features(features =>
        {
       
            features.Paging().PageSize(5).PrevPageLabelText("Previous").NextPageLabelText("NEXT").RecordCountKey("TotalCount");
            features.Sorting().Mode(SortingMode.Single);
            features.Selection().MultipleSelection(false).Mode(SelectionMode.Row);
            features.Filtering().Mode(FilterMode.Simple);
            features.Updating()
                 //.EnableDataDirtyException(true)
                   .EnableAddRow(false)
                   .EnableDeleteRow(true)
                   .EditMode(GridEditMode.None);
        
        })
        
        .UpdateUrl(Url.Action("SaveSoftwareToProcesso"))
        .Height("300px")
        .Render())

has you can see i am using pager, show 5 records per page..

the problem is that after adding 6 rows the pager says 2 pages, it also says 1-5 of 6 records..everything is ok..

now in the records in the 1 page it displays all of the 6 records, the if i select the 2nd page everything is ok, the last record show, and them i move to the first page and the page shows 5 records..

i have tried to use databind but if i do that the i loose all the transactions..

how can i resolve this..

thanks

Parents Reply Children