Q: How to hide rows based on cell value on initial rendering

1 Answer 133 Views
Filter General Discussions Grid
George
Top achievements
Rank 2
Iron
Iron
Iron
George asked on 15 Aug 2023, 10:23 PM

Hi, 

 

Would love to know how to hide cells based on the value OR order of rows.

 

Here is what I have coming in:

 

 

 

 

It is a merged cell by Staff Name.

 

Here is what I want initially when the grid is populated:

 

Then… If I click on the toggle button, or the row… this would work too it would  expand like this:

 

 

 

Trying to figure out how to filter off of the value TOTAL in the 5th column… then click a button on the 5th column (Pay Code) …and have it fully populated. The merge cell stuff I think I have got. Any idea how I could accomplish this?

 

 

 

Regards,

 George

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 18 Aug 2023, 09:25 AM

Hello George,

Currently, the merging of rows is not yet supported in Kendo Grid. I would suggest taking a look at the following forum thread where the issue is discussed. In the thread, you will also find a Feature Request item that I would encourage you to cast for. 

- https://www.telerik.com/forums/merge-cells-in-a-kendogrid#5674931

Regarding hiding the cells, you can get all the cells using the k-table-td class. Then you can filter the cells with the needed content using the js filter method. Next, you can use jQuery hide()

dataBound: function(){
             	var test = $('.k-table-td').filter(function(index, cell){
                         return $(cell).text() == 10254 || $(cell).text().includes('arnes')
              })
              $(test).hide()
  },

 

In the Dojo example linked here, the targeted cells are first colored in red, just for demonstration purposes. Then after a second, the cells are hidden.

I hope this helps.

Regards,
Neli
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Filter General Discussions Grid
Asked by
George
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Neli
Telerik team
Share this question
or