DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us