Radgrid Batch Edit Dynamic Controls

1 Answer 76 Views
DropDownList Grid
Randy
Top achievements
Rank 1
Iron
Randy asked on 29 Sep 2022, 08:55 PM

Hi, I want to have a column in radgrid batch edit and that column can contain either a textbox or dropdown based on a condition of the binding dataset. How can I implement this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 04 Oct 2022, 09:25 AM | edited on 04 Oct 2022, 09:26 AM

Hi Randy,

We haven't implemented this before, but I believe it can be done for the Batch Editing in the Grid.

Firstly, you must get familiar with the Batch Editing functionality, see RadGrid Batch Editing Templates and Specifics.

With BatchEditing you will need to handle everything on the client-side code (JavaScript) and client-event of the Grid. Check out the Working With Templates for more details.

The following examples show how to handle the Batch Editing events manually and Get/Set the Cell/Editor values:

 

Once you are familiar with the way BatchEditing works, you can create Template Columns with at least two COntrols in them. 

Have one of them initially hidden, then create a condition to show/hide the Editor Controls in the Grid cell when it opens for editing. The Knowledge Base articles above demonstrate how to bind different data to the same control based on the selection of another control in another cell. In your case, you will be showing/hiding the Control based on the selection of another one.

I hope this will be helpful.

Regards,
Attila Antal
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
DropDownList Grid
Asked by
Randy
Top achievements
Rank 1
Iron
Answers by
Attila Antal
Telerik team
Share this question
or