This is a migrated thread and some comments may be shown as answers.

Adding a row to a RadGrid

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MatFindlay
Top achievements
Rank 1
MatFindlay asked on 11 Aug 2008, 06:46 PM
I'm attempting to use a RadGrid that will allow a user to enter a new row. I have the CommandItemTemplate created, and I have everything wired up so that the proper server side method is being run when I click the insert button. The problem is I'm not getting any of the data I'm trying to add. The row has one editable column, and in that column's EditItemTemplate is a RadComboBox. When I run through the InsertCommand method, no matter what I selected in that combo box, the selected index I get is -1.

To grab the combo box, I'm using:

protected void TrackGrid_InsertCommand(object source, GridCommandEventArgs e) {   
GridEditableItem editedItem = e.Item as GridEditableItem;
RadComboBox titleBox = editedItem["Title"].FindControl("RadComboBox1") as RadComboBox;       
}

Is there some other way I should be trying to grab this data?

1 Answer, 1 is accepted

Sort by
0
MatFindlay
Top achievements
Rank 1
answered on 11 Aug 2008, 07:43 PM
Figured I should point out that the method I included is not the entire method... But using the debugger in VS shows that the RadComboBox in that method contains nothing for the selected item.
Tags
Grid
Asked by
MatFindlay
Top achievements
Rank 1
Answers by
MatFindlay
Top achievements
Rank 1
Share this question
or