column(cell) tooltip showing in wrong position after swap

7 posts, 0 answers
  1. PG
    PG avatar
    36 posts
    Member since:
    Jul 2007

    Posted 01 May 2008 Link to this post

    Since Bulgaria is in holiday I'm also sending this question (from a support ticket) to this forum.

     After swapping columns, the tooltip still shows in the old column position.

    I set the tooltip in:

    RadGrid1_ItemDataBound

    using:

    ((TableCell)e.Item.Cells[12]).ToolTip= "something";

    The problem is when the user swaps(moves) that column (lets say column number 12 with column number 14), then the tooltip doesn't move(migrate) with the column. The tooltip will show (when the user hovers the cursor) in the wrong column (column 12) instead of the new position (14).

    Is there a way to make the tooltip show in the new column position?

    Thank you.

    = "something";The problem is when the user swaps(moves) that column (lets say column number 12 with column number 14), then the tooltip doesn't move(migrate) with the column. The tooltip will show (when the user hovers the cursor) in the wrong column (column 12) instead of the new position (14).Is there a way to make the tooltip show in the new column position?Thank you.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 May 2008 Link to this post

    Hi,

    Try to set the ToolTip for the cell using the UniqueName Property. Because of features such as column reordering and grouping, the index of individual columns can change on the client. This means that using indexes to access individual cells in the Cells collection of a row is not a reliable method of obtaining a cell in a particular column.

    To provide a reliable way of locating the cell in a particular column, each column in the grid has a UniqueName property of type string. Using the UniqueName property of a column lets you reliably locate a column even when its index changes.

     You can also refer the following help articles.
    Adding tooltips for grid items
    Accessing cells and rows

    Hope this helps..
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. PG
    PG avatar
    36 posts
    Member since:
    Jul 2007

    Posted 02 May 2008 Link to this post

    Shinu,

    Thank you for your reply. I did change it to use the column unique name, but when I move the column the tooltip will not show in the new position, instead it will still show in the column old position.

    The column move is a client event, do I need to force it to run RadGrid_ItemBound in the server code to re-asign the tooltip every time I do a column move(or swap)?

    This is the code:

    protected void RadGrid1_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
    {

    if(e.Item is GridDataItem)
    {

    if (e.Item != null)
    {
    GridDataItem gridItem = (GridDataItem)e.Item;

    if(!(gridItem["RouteNote"].Text.Equals(" ")))
    {
        gridItem["CountRouteNotes"].ToolTip = gridItem["RouteNote"].Text;
    }
    else
    {
        gridItem["CountRouteNotes"].ToolTip = " ";
    }
    }
    }
    }



  5. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 04 May 2008 Link to this post

    Check whether setting ClientSettings -> ReorderColumnsOnClient = false addresses the issue with the wrong tooltip position after column reorder/swap. To simulate client performance ajax-enable the grid with RadAjaxManager or RadAjaxPanel.

    Kiara
  6. PG
    PG avatar
    36 posts
    Member since:
    Jul 2007

    Posted 16 May 2008 Link to this post

    From what I'm reading in your web site, the settings for the columns don't get moved when the user moves(swaps) columns in the client side (without re-binding). For example, if column A has a header aligned to the left, and column B has its header aligned to the right. If you swap on the client side (without re-binding) the grid, then the header for column A will still be aligned to the left and column B's header will still be aligned to the right.

    Same with the tooltips, if A has a tooltip and B has no tooltip. After you swap column A with B, column A will still have the tooltip and B no tooltip. Instead of moving the tooltip to column B.

    Do you know when this will be fixed in the RadGrid? Is there a new version coming?

    Thank you,
    PG.
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 17 May 2008 Link to this post

    Hello PG,

    We will add fix for this in our second service pack (we just released our first service pack). I have added 1000 Telerik points to your account.

    Best wishes,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. PG
    PG avatar
    36 posts
    Member since:
    Jul 2007

    Posted 19 May 2008 Link to this post

    Vlad,

    Thank you for the reply and thanks for the points.

    Pablo
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017