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. 2 3325
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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: asad |
last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom
paging bcoz data is too heavy so pls tell me how can i use custom paging in
ASP.NET
Thanks
|
by: John A Grandy |
last post by:
In regard to a GridView that must support searching, filtering, sorting, and
paging ...
There is a tradeoff in performing the sorting and paging in the database
versus to creating a CLR sort...
|
by: castron |
last post by:
Hello All,
I have a grid view that allows sorting, paging, editing, etc.
Under On Load event, if I check: if(!IsPostBack){ DisplayData(); }, the Edit portion works fine. However, the Sorting...
|
by: pupilstuff |
last post by:
hi guys i just want to perform custom paging in which at the footer of the grid view ,there must be a pager 'pervious/next with numeric'
this is what i did
in aspx page
<asp:GridView...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |