Click to See Complete Forum and Search --> : Datagrid pageing


sans_tosh
January 6th, 2003, 02:24 AM
Hi All,

I have set the paging property of datagrid to true in my web application. Its correctly showing the number of links but the problem is that to view the contents of the page i have to click the page link twice, for ex: say i want to go to page 2, then on the page link '2' i have to click twice then only the contents od page 2 is displayed.
can anybody please tell me why this is happening.

thanks,
santosh

Dreamon
January 6th, 2003, 12:34 PM
It would surely help if you posted some code. :)

Thanks.

sans_tosh
January 7th, 2003, 07:15 AM
Hi ,

That problem got solved, but theres a new problem I have Used one Combobox and on change of it, in the server side i am applying an filter to the Dataview and binding it to the Datagrid.
On selection of only one value in the Combobox i get an Error which States as below, for the rest of the values in the combobox the filter is working fine and datagrid is getting binded properly.

The Error Message:
" Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. "

please tell me why i am getting this error.

thanks,

Dreamon
January 7th, 2003, 10:55 AM
I'm not 100% sure (I haven't had time to try it out yet), but you could try to set the CurrentPageIndex in the DataGrid to 0 at the top of the code in the EventHandler for the DropDownList (ComboBox).

As I said, I'm not sure, but I hope this helps you out.

pareshgh
January 7th, 2003, 12:30 PM
yeah
in combobox before selecting u should always check the index value and the total items. suppose if it is empty and server tries to get it then it would be a problem.

Paresh

sans_tosh
January 8th, 2003, 02:01 AM
Thanks for the reply,

It would be great if you can elobarate on this please.

Thanks,
santosh