Hi Guys,
Having a heck of a time here.
We have one client who has a grid (radGrid) in which all rows are always in edit mode, and it uses a edit form user control for its edit mode.
I am trying to add a "Update All" button on the main page (just above the grid). In the button click event I need to loop thru all rows of the grid, find the user control and call a method on the user control that will update its data. I expected I would just call the Update button click event directly.
Problem is, no matter how I try, I cannot "find" the user control. Here is what I have tried:
Notice I tried FindControl as well as a custom recursive FindControl method, and I have iterated thru the objects in debug mode and can find the user control nowhere. Am sure im close.. but just can't find the darn things :(
Can anyone give me a kick in the right direction?
Thanks,
Dave
Having a heck of a time here.
We have one client who has a grid (radGrid) in which all rows are always in edit mode, and it uses a edit form user control for its edit mode.
I am trying to add a "Update All" button on the main page (just above the grid). In the button click event I need to loop thru all rows of the grid, find the user control and call a method on the user control that will update its data. I expected I would just call the Update button click event directly.
Problem is, no matter how I try, I cannot "find" the user control. Here is what I have tried:
foreach (GridDataItem dataitem in rgReview.Items) { if (dataitem.ItemType == GridItemType.AlternatingItem || dataitem.ItemType == GridItemType.Item) { GridEditableItem item = (GridEditableItem) dataitem; radGridReviewsUserControl userControl = (radGridReviewsUserControl)item.FindControl(GridEditFormItem.EditFormUserControlID); string test = ""; radGridReviewsUserControl uc = FindControl<radGridReviewsUserControl>(dataitem.Controls); } }Notice I tried FindControl as well as a custom recursive FindControl method, and I have iterated thru the objects in debug mode and can find the user control nowhere. Am sure im close.. but just can't find the darn things :(
Can anyone give me a kick in the right direction?
Thanks,
Dave