This is a migrated thread and some comments may be shown as answers.

Get grid position for hover over

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 04 Mar 2009, 03:13 AM
I wish to be able to tell the user where are row in the grid is when they mouse over. Kind of like bread crumbs.

If the grid is grouped by a few columns sometimes it is not possible to tell which group you are in because the group headers are scrolled off the grid.

If I added a RadToolTip to the item template of a column is it possible to extract the information about the rows position in the grid?

ie "This row is in: Group1>>Group2"

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 07 Mar 2009, 09:51 AM
Hi Aaron,

There is no client function that can give you the group index of a given item.

The way to attach a tooltip to the grid's items is in the page or the grid's pre-render event as follows:

        foreach (GridDataItem gridItem in RadGrid1.MasterTableView.GetItems(GridItemType.AlternatingItem,GridItemType.Item))  
        {  
            foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)  
            {  
                if (column is GridBoundColumn)  
                {  
                    gridItem[column.UniqueName].ToolTip = "Item's group index is: " + gridItem.GroupIndex;  
 
                }  
            }  
        } 

However, while testing the code I noticed that the group index for the first two items in each group is the same - which is not correct. We are currently investigating the bug and will do our best to get it fixed for the next release which is due very soon (mid March).

Excuse us for any inconvenience this might have caused you.

Best Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Aaron
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or