Get grid position for hover over

2 posts, 0 answers
  1. Aaron
    Aaron avatar
    22 posts
    Member since:
    Nov 2008

    Posted 03 Mar 2009 Link to this post

    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"
  2. Tsvetoslav
    Tsvetoslav avatar
    1823 posts

    Posted 07 Mar 2009 Link to this post

    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,
    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.
Back to Top