Results 1 to 7 of 7

Thread: mouseover grid column

  1. #1
    Ext User
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    21

    Question mouseover grid column

    Hi,
    I need to know how to trigger a function on mouseover a specific grid column,so that i can use get the row number of that column in the function.

    Thanks,
    Sai Dasika.

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    You need to start using the "Search" facility at the top of *this* page as this has been covered several times. Take a look at http://www.extjs.com/forum/showthread.php?t=77730

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    And in fact that idea has been expanded to pass events through to the Column class to make that observable:

    http://www.extjs.com/forum/showthrea...560#post379560

    So then you can just add a "mouseover" listener to your column definition.

  4. #4
    Ext User
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    21

    Question couln't complete the problem

    Hi,
    couldn't complete my doubt due to some problem this thread got submitted. I'll put it differently.

    I have a grid with six columns. One column data is a big string.I need to have this shortened like this..

    data="Hello i want this data to have only 30 characters and the whole data should be shown on mouseover".

    this should become --->"Hello i want this data to have only 30 characters..." and on mouse over the whole data should be displayed.

    We considered another column containing the whole data,but is taking a large load time.SO,the same record should be shown like the above and on mouse over it is used to show the whole data.

  5. #5
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    So every time the user moves the mouse over that "data" cell you are going to make another call to your server to get the full text...??? Yikes, that could be painful.

    If it is taking too long to load the data, perhaps consider using paging...
    Last edited by fay; 2 Mar 2010 at 3:35 AM. Reason: Added link

  6. #6
    Ext User
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    21

    Question No

    I am not going to make a new server call. i send a json with the whole string.But in the grid the whole string should not appear as in my example. i am able to mouseover the cell and get the data.

    original data in json sent from the server
    data="The string is too large so it should be truncated and displayed in the grid"

    Data to be shown in the grid in the column is

    "The string is too large so it...." -->I should be able to mask the data in the grid like this..

    So,that in the grid it shows a truncated data but i should be able to retrieve the whole data in the tooltip.

    Thanx,
    Sai Dasika

  7. #7
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    Add a renderer for your "data" column, something like:

    Code:
    function renderData(value, cell, record, rowIndex, colIndex, store)
    {        
      cell.attr = 'ext:qtip="' + value + '"';
      return Ext.util.Format.ellipsis(value, 30, false);
    };

Posting Permissions

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