asp.net - Finding Control inside RadGrid FormTemplate -
let' have grid,
<telerik:radgrid ........................... ........................... <formtemplate> <asp:textbox id="txtdescription" runat="server" /> </formtemplate> ........................... ........................... ...........................
now in code behind need txtdescription inside datasource1_updating event,
protected void datasource1_updating(object sender, sqldatasourcecommandeventargs e){
is possible?
here how fixed issue. defined editcommand,
protected void radgrid1_editcommand(object sender, gridcommandeventargs e) { viewstate["currentindex"] = e.item.itemindex; }
and in event,
protected void datasource1_updating(object sender, sqldatasourcecommandeventargs e){ var currentindex = (int)viewstate["currentindex"]; var form = radgrid1.items[currentindex].editformitem; var txtdescription= form.findcontrol("txtdescription") radcombobox;
Comments
Post a Comment