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

RadGrid find source row ID

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 17 Oct 2014, 05:22 PM
I'd like to go beyond using a template for editing a row in a radgrid, so I'm showing a user control. I do like the formatting of the radGrid for Edit and Insert buttons.

I can bring up the user control with no problems -

protected void rgv_ItemCommand(object sender, GridCommandEventArgs e)
{
string Cmd = e.CommandName.ToString();

if (Cmd == "Edit" || Cmd == "InitInsert")
                ProviderEdit.Visible = true;
else
                ProviderEdit.Visible = false;
}
First, what editmode should I use to suppress the automatic template?
Second, how do I pull in the ID of the table row to pass to the control for an edit?





           

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 22 Oct 2014, 09:12 AM
Hi Bill,

In order to use a User Control as EditForm for RadGrid you need to set the EditFormSettings.EditFormType property to WebUserControl. Also you need to set the UserControlName to the name of the User Control that will be used for editing. If you would like to see the functionality in action check out the following demo:

Try using similar approach and you would be able to implement the functionality you are looking for.


Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Bill
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or