Hi,
I am using the radasyncupload in a RadGrid.The MasterTavleView is set up to EditMode="Batch" and i use a GridtemplateColumn for the radasyncupload :
When the user finish to edit a row i can find the RadAsync control in BatchEditCommand event :
The radAsyncControl show me all the file uploaded so i can't get the file uploaded by row. I need to know files uploaded by row to save them in database.
Is there a way to get file uploaded by row or DataKeyNames with EdimtMode="Batch" ?
I am using the radasyncupload in a RadGrid.The MasterTavleView is set up to EditMode="Batch" and i use a GridtemplateColumn for the radasyncupload :
<
telerik:GridTemplateColumn
HeaderText
=
"AttachedFile"
UniqueName
=
"UploadColumn"
>
<
ItemTemplate
>
<
telerik:RadListBox
runat
=
"server"
ID
=
"listBox1"
>
<
ItemTemplate
>
<
a
href
=
"<%# DataBinder.Eval(Container.DataItem, "
Url")%>">Lien <%# DataBinder.Eval(Container.DataItem,"Name")%></
a
>
</
ItemTemplate
>
</
telerik:RadListBox
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadAsyncUpload
runat
=
"server"
D
=
"AsyncUpload1"
OnFileUploaded
=
"AsyncUpload1_FileUploaded"
AllowedFileExtensions
=
"jpg,jpeg,png,gif,pdf"
MaxFileSize
=
"1048576"
MultipleFileSelection
=
"Automatic"
>
</
telerik:RadAsyncUpload
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
When the user finish to edit a row i can find the RadAsync control in BatchEditCommand event :
protected
void
RadGrid1_BatchEditCommand(
object
sender, GridBatchEditingEventArgs e)
{
foreach
(GridBatchEditingCommand command
in
e.Commands)
{
if
((command.Type == GridBatchEditingCommandType.Update))
{
Hashtable newValues = command.NewValues;
if
(newValues !=
null
)
{
RadAsyncUpload asyncUpload = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID +
"_UploadColumn"
).FindControl(
"AsyncUpload1"
)
as
RadAsyncUpload;
//Here i need to get files by row or DataKeyNames
foreach
(var item
in
asyncUpload.UploadedFiles)
{
}
}
}
}
}
The radAsyncControl show me all the file uploaded so i can't get the file uploaded by row. I need to know files uploaded by row to save them in database.
Is there a way to get file uploaded by row or DataKeyNames with EdimtMode="Batch" ?