Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting by Header Columns in a Datagrid stops working

Status
Not open for further replies.

DLLHell

Programmer
May 9, 2003
69
0
0
US
I have a DataGrid with AllowPaging=true where the 1st column in the header is an Icon. Prior to that column being an icon (used to be text), the Sort by header columns worked fine. Now with the Icon in that column, the SortEventHander_OnClick's e.SortExpression value always is the 1st column's SortExpression value, WHEN the Enter key (keyboard) is clicked. Otherwise it works fine when a mouse is used to click on the other Header columns. Is there any way around this problem, I want the sort column that has focus (tabbed to) to be used when the Enter key is pressed.

With AllowPaging=true, the SortEventHandler_OnClick is not even fired when the Enter Key is pressed though one of the header columns has focus. It works fine when clicked on via mouse, though. Shouldn't there be a way to allow SortEventHandler_OnClick to fire in this situation, in datagrids?

I am thinking DHTML as a solution for the above problems but that seems like a lot of work to do if there are actually better datagrid solutions. Anyone have any ideas? Thanks.
 
Correction, 2nd paragraph should have said Allowpaging=false. Here is a corrected post.

I have a DataGrid with AllowPaging=TRUE where the 1st column in the header is an Icon. Prior to that column being an icon (used to be text), the Sort by header columns worked fine. Now with the Icon in that column, the SortEventHander_OnClick's e.SortExpression value always is the 1st column's SortExpression value, WHEN the Enter key (keyboard) is clicked. Otherwise it works fine when a mouse is used to click on the other Header columns. Is there any way around this problem, I want the sort column that has focus (tabbed to) to be used when the Enter key is pressed.

With AllowPaging=FALSE, the SortEventHandler_OnClick is not even fired when the Enter Key is pressed though one of the header columns has focus. It works fine when clicked on via mouse, though. Shouldn't there be a way to allow SortEventHandler_OnClick to fire in this situation, in datagrids?

I am thinking DHTML as a solution for the above problems but that seems like a lot of work to do if there are actually better datagrid solutions. Anyone have any ideas? Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top