[CLOSED] Tooltip / Renderer for Grid Header Column

  1. #1

    [CLOSED] Tooltip / Renderer for Grid Header Column

    Hi,

    just a short question. We have a Grid with lots of data.

    The common problem: small value in cell but large description in header.



    Now, is there a way to have mouse over tooltip in the grid header, is there a custom renderer
    for the header.

    Within cell its easy and done. But how get a QTip into the grid column header.


    Thanks.
    Last edited by Daniil; Dec 02, 2010 at 9:32 AM. Reason: [CLOSED]
  2. #2
    Now, is there a way to have mouse over tooltip in the grid header,
    Hi,

    Here is an example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] {"test11", "test12", "test13"},
                    new object[] {"test12", "test22", "test23"},
                    new object[] {"test13", "test32", "test33"}
                };
                store.DataBind();
            }
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="test1" />
                                <ext:RecordField Name="test2" />
                                <ext:RecordField Name="test3" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Header="Test1" DataIndex="test1" />
                    <ext:Column Header="Test2" DataIndex="test2" />
                    <ext:Column Header="Test3" DataIndex="test3" />
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
        <ext:Tooltip 
            runat="server" 
            Target="={GridPanel1.getView().mainHd}" 
            Delegate=".x-grid3-hd-inner" 
            TrackMouse="true">
            <Listeners>
                <Show Handler="this.body.update(this.triggerElement.childNodes[1].nodeValue);"/>
            </Listeners>
        </ext:Tooltip>
        </form>
    </body>
    </html>
    See also
    https://examples1.ext.net/#/Miscella...l_Row_Tooltip/
    https://examples1.ext.net/#/Miscella..._Cell_Tooltip/
  3. #3
    Quote Originally Posted by csharpdev View Post
    is there a custom renderer
    for the header.
    There is no renderer for header's cells. Generally speaking, it's a little bit complicated to change headers on the fly (without re-rendering).
  4. #4
    Quote Originally Posted by csharpdev View Post
    Within cell its easy and done. But how get a QTip into the grid column header.
    I forgot about Column's ToolTip property:)

    Example
    <ext:Column Header="Test" DataIndex="test" Tooltip="Test"/>
  5. #5
    Perfect. Thanks. Solved.

Similar Threads

  1. [CLOSED] Grid Tooltip with Renderer
    By peter.campbell in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 16, 2012, 1:07 PM
  2. [CLOSED] Tooltip in the Grid Header
    By majunior in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 02, 2011, 12:59 PM
  3. Grid Column Renderer
    By karthik.arian03 in forum 1.x Help
    Replies: 8
    Last Post: Feb 11, 2011, 6:34 AM
  4. [CLOSED] number renderer in grid column
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 05, 2010, 10:01 AM

Tags for this Thread

Posting Permissions