multiple edit columns in telerik radgrid

I have a telerik-radgrid where I use an editcolumn. For the edit-column I use a webusercontrol, I created. This works fine.

But know there should be two editlinks. Depending on which he chooses, i want to show a different usercontrol.

when i create two GridEditCommandColumns i get an error, because of two columns with the same id "EditButton"

I don't want to put the whole content of the usercontrols into one and show just the content needed, although this would work. But the controls are quite big and it wouldn't be fine to work with it afterwards.

How can I use two Edit-Columns in one radgrid?

Thank you

Answers


I found it out myself

I created a GridButtonColumn with the command Edit and a GridEditCommandColumns where i assign one of my usercontrols to it.

when it comes to the EditCommand-Event I do following:

if (((LinkButton)e.CommandSource).Text == "Edit1") //The Title of EditColumn 1
{
    rgCases.MasterTableView.EditFormSettings.UserControlName = "WebUC1.ascx";
}
else
{
    rgCases.MasterTableView.EditFormSettings.UserControlName = "WebUC2.ascx";
}

Need Your Help

One or more parameters required to run the report have not been specified

printing reportviewer rdlc

I'm trying to print a RDLC file directly without showing Microsoft Report Viewer, I have followed the MSDN's example but now, every time I call the "Render" method of my instance of LocalReport cla...

Kendo UI for JSP- DataSource Servlet or RESTful service

kendo-ui telerik telerik-grid

I am new to Kendo UI framework. I would like to know whether I could use normal Servlets or RESTful service instead of Spring Controller for Kendo UI for JSP?