Show/Hide Row in DhtmlxGrid 6.4.2

Hi,

I want to show/hide some rows in the grid. For that right now I am using rowCss property and based on some condition I apply the css to hide the row.

We need selection functionality as well in the grid. In the below example, I have applied rowCss for 3rd row to make it hidden. Now you can see in the demo 3rd row is hidden but when i click on any cell of 3rd row it is showing selection on the 4th row in the grid due to the hidden row existence.

https://snippet.dhtmlx.com/f0c6eajc

This is may be handled if we use any in built functionality for hide/show row in dhtmlxgrid.

I am using dhtmlx suite version 6.4.2. Is there any work around or solution in latest versions? Please let me know.

I think you need to use the filter() method of DataCollection API for filtering grid.data:
https://docs.dhtmlx.com/suite/data_collection__api__filter.html

Example (show/hide row with id:3):
https://snippet.dhtmlx.com/jra283et

1 Like

Unfortunately currently there is no hide/show row mechanics in the dhtmlxGrid.
As proldapru have mentioned the only solution is to use the datacollection filteration to hide the records of your grid.

Ok @sematik , Actually I have multiple different conditions for hiding and showing rows at so many places, so I will try to use filtering the data feature for now.

@proldapru, Thanks for giving the possible solution.

Hello Arpita in the dtmlxSuite 7.0 we have finally added the hide/shiow rown mechanics.
So now you are able to use the showRow()/hideRow() methods to control the rows visibility in your data.

1 Like