feroz minnadad
Top achievements
Rank 1
feroz minnadad
asked on 24 Sep 2009, 09:56 AM
Hi,
I am Feroz. I am using telerik radgrid for my application. I need to add fileupload control dynamicaly to columns in radgrid.
Please give any suggestions.
Thanks in advance.
Regards
Feroz
4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 24 Sep 2009, 10:26 AM
Hello Firoz,
You can try out the following code to add an upload control dynamically to a template column:
aspx:
c#:
Thanks
Princy.
You can try out the following code to add an upload control dynamically to a template column:
aspx:
| <telerik:GridTemplateColumn UniqueName="TemplateColumnUniqueName" HeaderText="Upload"> |
| <ItemTemplate> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
c#:
| protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem gridItem = (GridDataItem)e.Item; |
| FileUpload upload = new FileUpload(); |
| upload.ID = "FileUpload1"; |
| gridItem["TemplateColumnUniqueName"].Controls.AddAt(0, upload); |
| } |
| } |
Thanks
Princy.
0
feroz minnadad
Top achievements
Rank 1
answered on 24 Sep 2009, 10:44 AM
Hi Princy,
Thanks for replying,
For me the RadGrid control itself has to be created in the code behind file(dynamically).
So please help me
Thanks
M.S. Feroz.
Thanks for replying,
For me the RadGrid control itself has to be created in the code behind file(dynamically).
So please help me
Thanks
M.S. Feroz.
0
Accepted
Princy
Top achievements
Rank 2
answered on 24 Sep 2009, 10:58 AM
Hi Feroz,
Check out the following help document to understand how to create the grid programatically or add Template columns programatically and add controls to the template column:
Programmatic creation
Regards
Princy.
Check out the following help document to understand how to create the grid programatically or add Template columns programatically and add controls to the template column:
Programmatic creation
Regards
Princy.
0
feroz minnadad
Top achievements
Rank 1
answered on 24 Sep 2009, 11:08 AM
Hi Princy,
Thanks for your suggestion.
But I had already created radgrid dynamically. I need to add a fileupload control dynamically to that dynamically created radgrid columns.
So Please give any suggestions.
Regards
Feroz
Thanks for your suggestion.
But I had already created radgrid dynamically. I need to add a fileupload control dynamically to that dynamically created radgrid columns.
So Please give any suggestions.
Regards
Feroz