I'm using a telerik RadGrid, with a UserControl edit form. When the
InsertCommand event fires, I get the user control, and find edit
controls on it, but there Text properties are all string.Empty. I
suspect this has something to do with ViewState, but I don't know where
to begin looking.
protected void jobGrid_InsertCommand(object source, GridCommandEventArgs e) |
{ |
var editControl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as JobEditControl; |
SqlJobProvider.InsertJob(GetFieldValues(editControl)); |
} |
private Dictionary<string, object> GetFieldValues(UserControl editControl) |
{ |
string tb = (editControl.FindControl("aspText") as TextBox).Text; |
Here tb == "", even when in the browser it contains a value.