Hey guys,
I'm using a RadGrid as my input form and everything is working to open a blank record in the editform and fill it out.
I'm using a button outside the grid to kick off the insert command. This is the code that I have to kick off the update command in another grid...
but it doesn't work by changing the command to Insert. The error I'm getting is in regards to the itemIndex which makes sense because it shouldn't have an index yet.
Can you show my how to get reference to the InsertItem using an outside button so I can kick off the Insert command?
Thanks =)
I'm using a RadGrid as my input form and everything is working to open a blank record in the editform and fill it out.
I'm using a button outside the grid to kick off the insert command. This is the code that I have to kick off the update command in another grid...
GridItem[] items1 = RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem);
for
(
int
i = 0; i < items1.Length; i++)
{
int
itemIndex = items1[i].ItemIndex;
if
(RadGrid1.EditItems[0].ItemIndex == itemIndex)
{
(items1[i]
as
GridEditableItem).FireCommandEvent(
"Update"
, String.Empty);
}
}
but it doesn't work by changing the command to Insert. The error I'm getting is in regards to the itemIndex which makes sense because it shouldn't have an index yet.
Can you show my how to get reference to the InsertItem using an outside button so I can kick off the Insert command?
Thanks =)