The examples I've found thus far have shown accessing the EditForm (which is a seperate UserControl in PopUp edit mode) via events that have the GridCommandEventArgs... I took a quick stab at trying to find the UserControl via the GridItemEventArgs (as I would be using if I need to reference the UserControl during the ItemCreated / ItemDataBound events) but I ran into issues...
From the other examples I've used this code for retrieving the UserControl from the GridCommandEventArgs type:
I tried to follow the same pattern above (i.e. during the ItemDataBound event when the Item is a GridEditFormInsertItem/GridEditFormItem) but didn't quite get what I was needing to do from there...
I'm trying to make a utility function in my base class where it is overloaded with both EventArg types and simply returns my user control....
From the other examples I've used this code for retrieving the UserControl from the GridCommandEventArgs type:
| Args: [GridCommandEventArgs e] |
| Code: object eeditFormUserControl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID); |
I tried to follow the same pattern above (i.e. during the ItemDataBound event when the Item is a GridEditFormInsertItem/GridEditFormItem) but didn't quite get what I was needing to do from there...
I'm trying to make a utility function in my base class where it is overloaded with both EventArg types and simply returns my user control....