Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: How to: fire rowclick event of GridPanel ????

  1. #1
    Sencha User
    Join Date
    Jul 2010
    Posts
    61

    Default How to: fire rowclick event of GridPanel ????

    I want to simulate a click in the first row right after the grid is loaded

    to do so I thought I could use

    rowclick : ( Grid this, Number rowIndex, Ext.EventObject e )

    but what should I put in Ext.EventObject?

    the variable grid as in "grid = new Ext.grid.GridPanel" ?

    if yes, what should I put in GRID ??

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

    Default

    Can't you just call the handler routine?

    Unless you have multiple, unknown handler attached, in which case, call the fireEvent method. It's documented!

    And you don't need to pass an event unless one of your handlers uses it!

    Obviously, the grid is the grid you are firing the event from!

  3. #3
    Sencha User
    Join Date
    Jul 2010
    Posts
    61

    Default

    hey thx!!!

    another question, wich css should I alter to get my first row always in a different color no matter what??

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

    Default

    Poke the DOM. I think the first row does have a special class, so you'll have to look to see what.

    Then just add a rule to your inn-house stylesheet.

  5. #5
    Sencha User
    Join Date
    Jul 2010
    Posts
    61

    Default

    im sorry, im a little newbie, and from Brazil, so I didnt get what "Poke the DOM" really means...
    can you help me?

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

    Default

    Right click it in Firefox (of course you have Firebug) and choose "Inspect Element"

    This also works in Chrome.

    IE should be your last browser of choice for development. Ensure it runs on IE (You'll probably have to fix stuff), but don't develop with it.

  7. #7
    Sencha User
    Join Date
    Jul 2010
    Posts
    61

    Default

    ok i got it.

    in firebug, my right side I have the DOM tab, but what should i look for in there:?

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

    Default

    right click on that first row.

    Each row is a <table> inside a <div> You can see the elements there.

    There'll be a class like x-grid3-first-row or something like that. Look around. Explore.

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

    Default

    It's the HTML tab you want, not the DOM tab.

    On the right side there is styling info.

  10. #10
    Sencha User
    Join Date
    Jul 2010
    Posts
    61

    Default

    man, this is so cool!

    but i couldnt find any that reffers to the first row,

    inside the code however I looked for "first" and found x-grid3-cell-first

    but the grid doesnt use it? I altered in my style like this>

    .x-grid3-cell-first {font-weight: bold;}

    it didnt do anything

Page 1 of 4 123 ... LastLast

Similar Threads

  1. GridPanel's rowclick event didn't work in firefox 3.0
    By rajeshin in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 11 May 2009, 1:03 AM
  2. Replies: 7
    Last Post: 12 Feb 2009, 1:39 AM
  3. SOLVED [2.1] HOWTO fire a rowclick event on a grid?
    By T-Co in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 2 Jul 2008, 11:01 PM
  4. [2.0??] rowclick listener on GridPanel
    By aspcanada in forum Ext 2.x: Bugs
    Replies: 3
    Last Post: 2 Mar 2008, 1:47 AM
  5. need example of a gridPanel rowclick !!
    By funz51 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 9 Feb 2008, 11:18 AM

Posting Permissions

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