|
|
|
start date: Wed, 22 Aug 2007 14:48:32 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
Aamir Ghanchi
|
|
2
Ladislav Mrnka
|
|
3
Ladislav Mrnka
|
Sorting custom paged gridview resets PageIndex
hi,
I have a gridview which is bound to ObjectDataSource which in turn
reads from a business objects methods for custom paged data. When
PageIndex is set to any value other than 0 and one of the column
headers is clicked for sorting, the pageindex gets reset to 0. I tried
to debug it . the PageIndex property of gridview stays the same in the
Sorting event of gridview, but I see it changes to 0 in the Selecting
event of the ObjectDatasource.
Just wondering if any one else came across such a behavior.
Any leads will be appreciated.
Thanks in advance.
Date:Wed, 22 Aug 2007 14:48:32 -0700
Author:
|
RE: Sorting custom paged gridview resets PageIndex
Hi Aamir,
from my point of view, this is expected behaviour. Sorting event is raised
when databinding takes place = state of component is reseted. You can store
page index somewhere before selecting event and set it again in GridView's
DataBound event handler.
Regards,
Ladislav
"Aamir Ghanchi" wrote:
> hi,
>
> I have a gridview which is bound to ObjectDataSource which in turn
> reads from a business objects methods for custom paged data. When
> PageIndex is set to any value other than 0 and one of the column
> headers is clicked for sorting, the pageindex gets reset to 0. I tried
> to debug it . the PageIndex property of gridview stays the same in the
> Sorting event of gridview, but I see it changes to 0 in the Selecting
> event of the ObjectDatasource.
>
> Just wondering if any one else came across such a behavior.
> Any leads will be appreciated.
> Thanks in advance.
>
>
Date:Thu, 23 Aug 2007 00:38:00 -0700
Author:
|
RE: Sorting custom paged gridview resets PageIndex
I am sory sorry, I have mistyped name of event. Selectiong event is raised
when databinding takes plase...
Best regards,
Ladislav
"Ladislav Mrnka" wrote:
> Hi Aamir,
> from my point of view, this is expected behaviour. Sorting event is raised
> when databinding takes place = state of component is reseted. You can store
> page index somewhere before selecting event and set it again in GridView's
> DataBound event handler.
>
> Regards,
> Ladislav
>
>
>
> "Aamir Ghanchi" wrote:
>
> > hi,
> >
> > I have a gridview which is bound to ObjectDataSource which in turn
> > reads from a business objects methods for custom paged data. When
> > PageIndex is set to any value other than 0 and one of the column
> > headers is clicked for sorting, the pageindex gets reset to 0. I tried
> > to debug it . the PageIndex property of gridview stays the same in the
> > Sorting event of gridview, but I see it changes to 0 in the Selecting
> > event of the ObjectDatasource.
> >
> > Just wondering if any one else came across such a behavior.
> > Any leads will be appreciated.
> > Thanks in advance.
> >
> >
Date:Thu, 23 Aug 2007 00:46:00 -0700
Author:
|
|
|