Welcome Guest Search | Active Topics | Sign In | Register

Grid Double Click Column Heading Options
Jeff
Posted: Wednesday, May 28, 2008 9:32:15 AM
Rank: Member
Groups: Member

Joined: 4/3/2008
Posts: 16
Currently when a column heading is doubled clicked the event is processed. Is there a way to find what column header was double clicked?

Thanks
eo_support
Posted: Wednesday, May 28, 2008 9:40:53 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Jeff wrote:
Currently when a column heading is doubled clicked the event is processed.


I am not exactly sure what you mean by "the event is processed"? Can you elaborate on which event processed by who? Thanks
Jeff
Posted: Wednesday, May 28, 2008 9:55:31 AM
Rank: Member
Groups: Member

Joined: 4/3/2008
Posts: 16
The double clicked event on the grid fires when you double click the column headings. When a cell is doubled clicked I open another page according to the contents of the cell. I would like to do the same thing when a column heading is double clicked but I can't get to the properties of the heading that was double clicked unless I know what column the heading is in. The selected cell does not change when the headings are double clicked so I can't use the column of the currently selected cell.
Jeff
Posted: Wednesday, May 28, 2008 10:12:31 AM
Rank: Member
Groups: Member

Joined: 4/3/2008
Posts: 16
One more thing. It is a client side event I process with Javascript.

<eo:Grid ID="grid" ondblclick="return grid_ondblclick()"
eo_support
Posted: Wednesday, May 28, 2008 10:17:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

You can figure out which column has been double clicked by compute the mouse position relative to the top-left corner of the grid. First you can determine whether the click occurs within the header by checking whether Y position is less than ColumnHeaderHeight, if that is true, you can then compute which column is clicked based on each column's width. This only works when columns are not reordered or not horizontally scrolled though.

In the furture, we can probably provide a client side function findColumn to find column based on the current event object. That should be sufficient to cover the case.

Thanks
Jeff
Posted: Wednesday, May 28, 2008 10:44:20 AM
Rank: Member
Groups: Member

Joined: 4/3/2008
Posts: 16
Thanks for your help. I will give that a try. I am still pretty new to all of this so thanks for your patience. By the way I have the grid working very nicely now with the exception that when I scroll to the bottom of the grid it does not display the last row. This is whether you use the keyboard navigation or the scroll bar. I posted something about this a while back but thought I had it fixed. The left right scrolling works fine.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.