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

Custom paging

0 Answers 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
El
Top achievements
Rank 1
El asked on 14 Jan 2010, 09:15 PM
I am trying to customize the paging of the radgrid but i hit the dead end.

Inside the NeedDataSource event handler i have these two lines:

RadGrid1.VirtualItemCount = Catalog.ItemCount(Me.txtSearch.Text.Trim, _ 
                                                                    txtRangeFrom.Text, txtRangeTo.Text, _ 
                                                                    IIf(cmbDepartments.SelectedValue <> "", cmbDepartments.SelectedValue, 0), _ 
                                                                    IIf(cmbCategories.SelectedValue <> "", cmbCategories.SelectedValue, 0), _ 
                                                                    0) 
 
 
RadGrid1.DataSource = Catalog.GetProducts(Me.txtSearch.Text.Trim, _ 
                                                                     txtRangeFrom.Text, txtRangeTo.Text, _ 
                                                                     IIf(cmbDepartments.SelectedValue <> "", cmbDepartments.SelectedValue, 0), _ 
                                                                     IIf(cmbCategories.SelectedValue <> "", cmbCategories.SelectedValue, 0), _ 
                                                                     0, Me.RadGrid1.CurrentPageIndex + 1, 10) 

But it seems i am missing something because when i move through the pages after 10 or 20 pages it appears empty althrough it says that there are more pages remaining.

Also when i add some search criteria it does affect the items shown up in the grid itself but not the pager which still refers to the previously counted items/pages.

For instance if i enter search term "test" and click the search button calling RadGrid.Rebind method it affects only the first page of the grid but the pager does not change at all.

Am i missing something e.g. maybe i should replace the code for setting virtualItemCount property in another event?

Thanks

No answers yet. Maybe you can help?

Tags
Grid
Asked by
El
Top achievements
Rank 1
Share this question
or