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

[Solved] Get Edit Template Control

1 Answer 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 15 Mar 2008, 09:01 PM
Hi,

I'm creating a RadGrid for managing images as well as RadUpload controls in the EditTemplate of a GridTemplateColumn.  What I'm trying to do is capture the upload controls in the insert event, but they return null.  Would you please show me how to get them?

    protected void rgRotator_ItemInserted(object sender, EventArgs e)
    {
        RadGrid rgRotator = (RadGrid)sender;
        RadUpload ruThumbnail = (RadUpload)rgRotator.FindControl("ruThumbnail");
        RadUpload ruLarge = (RadUpload)rgRotator.FindControl("ruLarge");
    }

Thanks,

Jeff

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 18 Mar 2008, 08:14 AM
Hello JJ,

Let me start with a note about "insert event". ItemInserted is raised after the item has been inserted in the underlying datasource and only in case of Automatic DataSource Operations. However, if you are looking for an event to insert data in the datasource it should be InsertCommand. In InsertCommand event handler you can use this:

RadUpload ruThumbnail = (RadUpload)e.Item.FindControl("ruThumbnail");

You can find more information here: Help topic, Online Example.

Hope this helps.

All the best,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
JJ
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or