Results 1 to 6 of 6

Thread: Modern toolkit grid getRowClass() equivalent

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    127
    Answers
    3

    Default Answered: Modern toolkit grid getRowClass() equivalent

    Is there any equivalent to the getRowClass() method in the Modern toolkit? I'm looking for a way to dynamically set the class of each row in the grid based on a specific value in the record. I've looked through the documentation but can't find anything. If I missed it, just point me in the right direction and I'll take it from there. Thanks.

  2. There are a few ways, the simplest would be to use a viewmodel: https://fiddle.sencha.com/#view/editor&fiddle/25rd

  3. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    There are a few ways, the simplest would be to use a viewmodel: https://fiddle.sencha.com/#view/editor&fiddle/25rd

  4. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    127
    Answers
    3

    Default

    Thank you Evant, this seems like a good solution

  5. #4
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    10

    Default

    Hi, thx for solution but i need to set the background color for records with special data in the record (maybe each row red if foo == 'a'). Have you got a sample for this case? Thank you for reading

  6. #5
    Sencha Premium User
    Join Date
    Mar 2010
    Location
    Atlanta, GA
    Posts
    55

    Default

    Expanding on Evants Code


  7. #6
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    10

    Default

    Thank you, great help

Similar Threads

  1. Add filter to modern toolkit grid
    By akiroussama in forum Ext JS 6.x Q&A
    Replies: 6
    Last Post: 19 Feb 2019, 2:46 PM
  2. getRowClass() equivalent in Modern Toolkit?
    By gsoc2014 in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 29 Aug 2017, 12:01 PM
  3. [OPEN] Modern toolkit Grid with BufferedStore
    By BCE in forum Ext JS 6.x Bugs
    Replies: 3
    Last Post: 9 Feb 2017, 12:43 PM
  4. Replies: 1
    Last Post: 13 Dec 2016, 2:21 PM
  5. Grid in Modern toolkit
    By aruti in forum Ext JS 6.x Q&A
    Replies: 4
    Last Post: 5 Aug 2016, 10:45 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
  •