How to disable the entire Grid when there is no data?

1 Answer 905 Views
Grid
CHIHPEI
Top achievements
Rank 2
Iron
Iron
Iron
CHIHPEI asked on 27 Oct 2021, 08:15 AM
Hi,

Is there any way to disable the entire grid?
the scenario is when the page was browsed in the first time,
I used a parameter with if statement to jumpover the grid from showing cloumns.
After the user enters the search parameter, the grid showed up with data.
What if there is no data, how can I disable the entire grid?

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 27 Oct 2021, 09:44 AM

Hi CHIHPEI,

You can disable the Grid component, by adding the k-state-disabled class to it.

Here is a Dojo example demonstrating the usage of the mentioned CSS class. The same approach can be used in the context of UI for ASP.NET Core. You can dynamically add/remove the k-state-disabled class when the Grid has/doesn't have data.

Let me know if you need further assistance with the current ticket.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
CHIHPEI
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Petar
Telerik team
Share this question
or