Author Topic: How to modify a grid row as it renders?  (Read 2424 times)

pgridEval

  • Newbie
  • *
  • Posts: 5
    • View Profile
How to modify a grid row as it renders?
« on: June 19, 2018, 04:52:47 am »
Since rendering of rows is done dynamically as the user scrolls there needs to be a way to modify the row. For example, the necessity to add classes. For example, in my test use-case I am tracking which row a user last clicked. This row receives the "selected" class. The user scrolls and suddenly the class is gone because the row renders from the start.

As a result, the only way for the pqGrid to work correctly is to be able to modify row as it renders. How is this done?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to modify a grid row as it renders?
« Reply #1 on: June 19, 2018, 07:35:26 am »
Directly manipulating DOM of grid is not recommended.

Grid has own API to add/remove classes, attributes, etc.

Examples:

https://paramquery.com/pro/demos/row_class

https://paramquery.com/pro/demos/condition_style

https://paramquery.com/pro/demos/comments

https://paramquery.com/pro/demos/render_cells