QTip on cell not having any content

  1. #1

    QTip on cell not having any content

    Following is code snippet I'm trying to use:

    <script type="text/javascript">
     function CreateQtipForGrid(metadata, qTitle, qTip){
        metadata.attr += " ext:qtitle='" + qTitle + "'" + " ext:qtip='" + qTip + "' + ext:hide='false' ";    
    }
    </script>
    
    <ext:GridPanel 
                                    ID="cGridSearchAndMatchIssuer" 
                                    runat="server" 
                                    StoreID="cStoreSearchAndMatchIssuer" 
                                    StripeRows="true"
                                    TrackMouseOver="true"
                                    BodyBorder="false"
                                    AutoExpandColumn="BloombergIssuerName">
    <ColumnModel runat="server">
                                    <Columns>
                                            <ext:Column Header="Issuer Name" DataIndex="BloombergIssuerName" ColumnId="BloombergIssuerName" Width="250" Sortable="true"/>                                
                                            <ext:Column Header="Bloomberg Issuer Id" DataIndex="BloombergIssuerId" Sortable="true" Width="110" />
                                            <ext:Column Header="Domicile" DataIndex="MapCompanyDomicile" Sortable="true" >
                                              <Renderer Fn="function(value, metadata, record){if(!String.isNullOrEmpty(record.data.MapCompanyCIS))
                                                                                        {
                                                                                        CreateQtipForGrid(metadata, '', 'please contact Production Support.');
                                                                                        
                                                                                        }
                                                                                        return value;
                                                                                    }"/>                                      
                                            </ext:Column>
                                                                                
                                            
                                         </Columns>
                                         
                                    </ColumnModel>
    ............
    ............
    ............
    ............
     </ext:GridPanel>
    The Tooltip gets rendered on the desired column but is missing for some cells of the column which have no content. I need to display tip irrespective of content of cell
    Last edited by Daniil; Dec 21, 2010 at 4:45 PM. Reason: Please use [CODE] tags
  2. #2

    QTip on cell not having any content

    I'm trying to add tooltip using QTip on column of gridpanel. But tip is not visible on cell which don't have any text. Is this a constraint of qtip or is there a workaround possible for this?
  3. #3
    Hi,

    Please post any technical support questions on the Help forum (or Premium help for premium members). I'm moving this thread to the Help forum.
  4. #4
    Quote Originally Posted by mansi752 View Post
    I'm trying to add tooltip using QTip on column of gridpanel. But tip is not visible on cell which don't have any text. Is this a constraint of qtip or is there a workaround possible for this?
    Hi,

    Please clarify what way do you add QTip for cells?
  5. #5
    Please wrap code in [CODE ] tags, see
    http://forums.ext.net/showthread.php...ing-New-Topics
  6. #6
    There is an issue how you create attr string. There are redundant single quotes.

    Here is a full working sample.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.IsAjaxRequest)
            {
                Store store = this.Store1;
                store.DataSource = new object[] 
                { 
                     new object[] { "test11", "test12", "test13" },
                     new object[] { "test21", "test22", "test23" },
                     new object[] { "test31", "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 id="Head1" runat="server">
        <title>Coolite 0.8.X Example</title>
    
        <script type="text/javascript">
            var myRenderer = function(value, metadata, record, qtip, qtitle) {
                metadata.attr += " ext:qtip=" + qtip + " ext:qtitle=" + qtitle;
                return value;
            }
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        <ext:Store ID="Store1" runat="server">
            <Reader>
                <ext:ArrayReader>
                    <Fields>
                        <ext:RecordField Name="test1" />
                        <ext:RecordField Name="test2" />
                        <ext:RecordField Name="test3" />
                    </Fields>
                </ext:ArrayReader>
            </Reader>
        </ext:Store>
        <ext:GridPanel 
            ID="GridPanel1" 
            runat="server" 
            StoreID="Store1" 
            AutoHeight="true">
            <ColumnModel ID="ColumnModel1" runat="server">
                <Columns>
                    <ext:Column Header="Test1" DataIndex="test1" />
                    <ext:Column Header="Test2" DataIndex="test2">
                        <Renderer Handler="return myRenderer(value, metadata, record, 'qtip', 'qtitle');" />
                    </ext:Column>
                    <ext:Column Header="Test3" DataIndex="test3" />
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
        </form>
    </body>
    </html>

Similar Threads

  1. ext:qtip and delay before disappearing
    By Rod in forum 1.x Help
    Replies: 8
    Last Post: Nov 13, 2013, 4:23 AM
  2. [CLOSED] Center GridPanel cell column content
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 04, 2012, 10:24 AM
  3. Replies: 12
    Last Post: Jun 05, 2011, 8:08 PM
  4. How to add ext:qtip to image?
    By dbassett74 in forum 1.x Help
    Replies: 4
    Last Post: May 11, 2009, 5:26 PM
  5. [CLOSED] GridPanel: modify cell-content from listener (script)
    By andreas.seitz in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 21, 2009, 12:00 PM

Tags for this Thread

Posting Permissions