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

[Solved] Problem in Rad Grid(Urgent Helm me)

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
pradeep
Top achievements
Rank 1
pradeep asked on 21 May 2009, 05:46 AM
In Rad Grid ( Edit form setting ) how to  Find Text box and File upload  ID in Click of Button

Urgent Please help me Telerik Team........


its very-2 urgent

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 May 2009, 06:24 AM
Hello Pradeep,

I hope that the button that you have mentioned is placed inside the EditForm of your grid. If so, you can try the following code to access the textbox and fileupload controls within the edit form on click of the button:
aspx:
<EditFormSettings EditFormType="Template" > 
        <FormTemplate> 
            <asp:TextBox ID="txtEdit"  runat="server"></asp:TextBox> 
            <asp:FileUpload ID="FileUpload1" runat="server" /> 
            <br /> 
            <asp:Button ID="Button" runat="server" OnClick="Button_Click" Text="Find" /> 
        </FormTemplate> 
</EditFormSettings> 

c#:
protected void Button_Click(object sender, EventArgs e)  
    {  
        Button btn = (Button)sender;  
        GridEditFormItem editFormItem = (GridEditFormItem)btn.NamingContainer;  
        TextBox txtbx = (TextBox)editFormItem.FindControl("txtEdit");  
        FileUpload upload = (FileUpload)editFormItem.FindControl("FileUpload1");  
  
  
    }  

Thanks
Princy.
Tags
Grid
Asked by
pradeep
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or