Results 1 to 2 of 2

Thread: Controlling when tooltips appear in a grid

  1. #1
    Sencha User
    Join Date
    Jun 2016

    Default Controlling when tooltips appear in a grid

    I have a grid that has a column whose cells are editable using a custom control. This control has its own tooltip for explaining what to enter into it. What I would like to do is display a tooltip over a cell in that grid column if its contents are in error, but only when the cell is not being edited. Otherwise, the tooltip for the grid cell shows up in front of the tooltip for our custom control.

    Our code has a global variable that we use to indicate when a grid cell is currently being edited, but using that doesn't seem to work to suppress the grid's error tooltip. The global variable is set at the beginning of the column's beforeedit listener and at the end of its edit listener and whenever a row is added to or deleted from the grid. Also, when a row is added to the grid, the handler for adding the row will start the editor for the cell in the column in question.

    The code that I'm using to generate the error tooltip looks something like this:
    renderer: function(value, metaData)
        var displayValue = getDisplayValueFunction(value);
        if (displayValue == null || displayValue == "")
            if (!gridInEdit)
                var errorText = "You must enter something here.";
                metaData.tdAttr = 'data-qtip="' + errorText + '"';
            metaData.tdStyle = "border-style: solid; border-color: red; border-width: 1px 1px 1px 1px";
            metaData.tdAttr = 'data-qtip=""';
            metaData.tdStyle = "border-style: none;";
        return displayValue;
    (The getDisplayValueFunction() call in the above code replaces the actual function call that we use and is just for illustrative purposes here. Ditto for the error text.)

  2. #2
    Sencha - Support Team
    Join Date
    Jul 2010
    Houston, Tx


    You could use a variation of the follow and update the tip or return false based on the cell info:

Similar Threads

  1. Controlling Grid Column Widths
    By jbeaven in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 22 Apr 2014, 12:20 PM
  2. Controlling grid widths through css
    By ngd in forum Sencha Ext JS Q&A
    Replies: 1
    Last Post: 11 Dec 2013, 10:42 AM
  3. Controlling Grid row height when there are larger image inside.
    By MoimHossain in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 4 Jan 2011, 12:35 PM
  4. Controlling Grid scrollbar
    By darkling235 in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 25 Jan 2010, 8:47 AM
  5. Controlling Row Height in 2.1 Grid
    By mrollins in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 18 Feb 2008, 11:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts