This is a migrated thread and some comments may be shown as answers.

Hiding commands on batch editable grid

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 29 Oct 2015, 04:44 PM

Hi guys,

 

I've been struggling with this for several hours with no luck. I have this grid with batch editing enabled and I have two buttons that need to be hidden conditionally depending on the value of a property in my ViewModel. I'm using the dataBound event to hide the buttons and everything works fine until I edit one of the cells in the grid. As soon as I change the value on a cell and exit the edit mode the button that was hidden appears again. How can I solve this?

 

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 02 Nov 2015, 09:47 AM
Hi Carlos,

We are not sure about the specifics of your scenario, however, we created an example, based on the provided information, and it works as expected - check the hiding of content of the "Hidden content" column in the Grid's dataBound event.

One possible cause of the problem you describe may be using inline editing and clicking on the Cancel button. In this case you can use the cancel event with a corresponding function as shown in this example. Please make sure to use setTimeout in the body of the onCancel function so that it is not executed before the cancelled table row is re-rendered (the cancel event is fired while the row is still in edit mode, so any custom DOM manipulations will be lost).

I hope this helps. If you are still experiencing any problems, please provide us with some sample code so we can understand better what is your scenaio and suggest the best solution.

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Carlos
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or