1) set pageSize="10"
2) add 11 rows in the grid
3) it shows the components/link to move back and forth in pages
4) go to page 2, which in this case has only 1 row.
5) deleted that row using a delete button on top of grid with select column check box.
The gird removes the page navigation links. Shows no rows at all.
Then I add row again and it shows the new row added along with rest of the rows. The page navigation buttons/links appear back on.
Side note: I have a multi list box with add button to add rows to the grid. Based on the data the rows may contain different widgets like dropdown listing operators and other widgets to allow user to enter/select value for each row.
Hi:
Row addition and deletion in the grid is not realy a "built in" feature. Since the grid has to work under some many different use cases, we leave it to the user to build the (normally small) amount of additional code to support this relying on the specifics of their application.That said, its difficult to diagnose theissues you're having without a much closer look at the source code for your app. Is there some way we could share this so we here at IG can help you?
Thanks,Jim
I can't post the code as such and it will be a lot of work to create a sample without business info of my organization.
But I know when there are more rows this doesn't happens.
I tried different scenarios.
1) when I add 21 rows. the 3rd page gets one row. When I delete that it deletes the row of course, but leaves the page navigation control on to nevigate to page 1 or 2 or the back controls.
2) then I navigated to page 2 using web grid controls. Deleted another 9 rows out of total 20, leaving one row on page 2. page displayed back with one row and controls. I deleted the last row on page 2 the page displayed back without the web grid navigation controls I guess becaue there were just enough rows to have one page but it didn't took me to that page.
I think in your code you have to check if the last row is being delete and it is not the first/only page it should display a page current-1, or something.
I put together the following method and called this afet dataBind(); statement in my delete methods and it fixed the issue:
{
}
if you know of any side effects for this please let me know.
Thanks
fixed a bug in my code and thought to post the correct one here:
without the initial check I added in if statement, if all the rows are deleted the index of -1 results in an exception later in execution thread.
Great - thanks for sharing your solution with the community!Best,Jim