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

Prod Eval Question - RadGrid Paging

1 Answer 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jen
Top achievements
Rank 1
Jen asked on 10 Nov 2010, 09:53 PM

Hi all,

I had a quick question regarding the RadGrid paging. I currently have a VirtualItemCount that I set when the grid is loaded. The user can delete rows from the grid by selecting a series of checkboxes and clicking on a delete button. I have been able to reload the grid and also reset the page index to 0. The problem is that that total number of items is still the old number. If I page forward, the item count is refreshed with the correct count.

RadGrid1.DataSource = data.LawFirm_GetBrokerRelationships(lawFirmID, RadGrid1.PageSize, pageIndex).ToList();

 

 

 

if (rebind)

 

{

RadGrid1.CurrentPageIndex = 0;

RadGrid1.Rebind();

}

 

 


int
rowCount = data.LawFirm_GetBrokerRelationships(lawFirmID, null, null).FirstOrDefault().BrokerRelCount;

 

RadGrid1.VirtualItemCount = rowCount;

Any idea what I may doing wrong?
Thanks,
Jennifer

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 12 Nov 2010, 10:51 AM
Hello Jen,

As far as I understand you are using Custom Paging for your RadGrid control. If this is the case, in the server-side method where the delete operation happens, you should update the VirtualItemCount property of the grid with the correct value (that is, the old one minus the delete items) and then call the grid's Rebind() method.

Hope it helps.

Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jen
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or