Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Sorting custom paged gridview resets PageIndex

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aamir Ghanchi - 22 Aug 2007 22:48 GMT
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.
Ladislav Mrnka - 23 Aug 2007 08:38 GMT
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

> hi,
>
[quoted text clipped - 9 lines]
> Any leads will be appreciated.
> Thanks in advance.
Ladislav Mrnka - 23 Aug 2007 08:46 GMT
I am sory sorry, I have mistyped name of event. Selectiong event is raised
when databinding takes plase...

Best regards,
Ladislav

> Hi Aamir,
> from my point of view, this is expected behaviour. Sorting event is raised
[quoted text clipped - 18 lines]
> > Any leads will be appreciated.
> > Thanks in advance.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.