1. #1
    Touch Premium Member sean's Avatar
    Join Date
    Mar 2007
    Location
    Ashburn VA
    Posts
    120
    Vote Rating
    0
    sean is on a distinguished road

      0  

    Default setting ids on grid rows...

    setting ids on grid rows...


    hello all,

    is there a way to specify an id on the <tr> elements that are rendered in the grid body, ie the grid rows? i would like to do this at render time and it doesn't appear that the templates used in the grid view take a configuration option for this. i do specify an id on my Store but i don't think this is used by the gridview. i would appreciate any input. btw: the reason i need this is to support testing with selenium.

    thanks,
    sean

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    If you specify a column renderer in one of your ColumnModel colmn defs, I think the 3rd param is the <TR>.

  3. #3
    Touch Premium Member sean's Avatar
    Join Date
    Mar 2007
    Location
    Ashburn VA
    Posts
    120
    Vote Rating
    0
    sean is on a distinguished road

      0  

    Default


    i'll look into that nige. when i looked at the grid view last night all the template to generate the markup are predefined in the grid view. i came up with a solution using the gridview.getBodyTable().rows combined with the backing store which worked. however after a column sort i'm back to square one. my thought here was to handle the store's 'datachanged' event that is fired after a sort but it looks like at that point in time the grid doesn't contain the sorted rows.

    sean

  4. #4
    Touch Premium Member sean's Avatar
    Join Date
    Mar 2007
    Location
    Ashburn VA
    Posts
    120
    Vote Rating
    0
    sean is on a distinguished road

      0  

    Default


    ok the solution to resetting the ids after a sort is to handle the 'refresh' event on the grid's view. worked like a champ and fast too. would be nice to do this at render time of the table so that i don't incurr the cost of iterating the rows. oh well, i'm good for now.

    sean

Similar Threads

  1. Setting the bg color of an entire row or cell in the grid
    By arnair in forum Ext 1.x: Help & Discussion
    Replies: 12
    Last Post: 16 Mar 2010, 9:52 AM
  2. [Grid] Setting Row Styles/Class
    By KaiDream in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 23 Feb 2007, 11:38 PM
  3. Setting a class for a grid column?
    By kjordan in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 21 Jan 2007, 11:23 AM
  4. getting selected rows in a grid
    By ericwaldheim in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 9 Oct 2006, 10:58 AM
  5. Get the rows that are in a grid
    By rodiniz in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 6 Oct 2006, 7:01 AM

Thread Participants: 1