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
Hello Hugo,Please feel free to contact us if you have any additional questions regarding this matter.
hi, there was a recent release, and in that release this problem should be resolved,,,i will try and tell how it worked.
Hello Hugo,
Thank you for letting us know about this.
Also if there is something else that we could help you with, contact us again.
ok, thanks for the help, once again..for now i will go with my implmentation, as soon as i receive some updates about this i will try and give you guys my feedback.
thank once again, for the help.
Hugo
The issue you are seeing is caused by Paging and Updating not working together in the most obvious way possible and some internal limitations which we are looking to resolve in the future. Generally speaking the grid should behave as you are expecting, that is, rows added above the page size threshold should instead force the grid to change the page index to the page that would contain the new row so the action is immediately observable by the end-user. I've logged this in our internal system with ID 167407. The case opened for this forum post will be linked to the internal item and you'll be notified about updates through the case directly.
To work around this you can either proceed with your own implementation or data bind the grid after calling saveChanges so the remote data source is updated with the newly added records prior to the data binding call.
Please, let me know if you have any other questions and/or concerns!
Best regards,
Stamen Stoychev