Hello Reggie,
Actually the core of this example is in these two methods:
Private Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles RadGrid1.ItemCommand
If (e.CommandName = RadGrid.EditCommandName) Then
Session("changeEditForm") = Nothing
End If
If (e.CommandName = "UploadFile" AndAlso TypeOf e.Item Is GridDataItem) Then
e.Item.Edit = True
Session("changeEditForm") = True
RadGrid1.Rebind()
End If
If (e.CommandName = "Close") Then
RadGrid1.EditIndexes.Clear()
RadGrid1.Rebind()
End If
End Sub
Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.WebControls.GridItemEventArgs) Handles RadGrid1.ItemCreated
If (TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode) Then
If (Not Session("changeEditForm") Is Nothing) Then
Dim formItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
formItem.EditFormCell.Controls.Clear()
formItem.EditFormCell.Controls.Add(New System.Web.UI.HtmlControls.HtmlInputFile)
formItem.EditFormCell.Controls.Add(New LiteralControl("<br/>"))
Dim uploadButton As Button = New Button
uploadButton.Text = "Upload file"
uploadButton.CommandName = "Upload"
formItem.EditFormCell.Controls.Add(uploadButton)
Dim closeButton As Button = New Button
closeButton.Text = "Close"
closeButton.CommandName = "Close"
formItem.EditFormCell.Controls.Add(closeButton)
End If
End If
End Sub
and you can easily use them in VS.NET 2005.
Regards,
Stephen,
the
telerik team