I am trying to get the values from the RadGrid insert form and then insert those values from the form elements into a SQL database using a stored procedure. When I run the following code using the RadGrid insert command sub, empty values are inserted to the database.
Here is the code:
Protected Sub rg_InsertCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles rg.InsertCommand
Dim item As GridEditFormInsertItem = CType(e.Item, GridEditFormInsertItem)
Dim name As RadTextBox = TryCast(item.FindControl("txtName"), RadTextBox)
Dim str As String = name.Text
End Sub