R
rohan_p
I'm trying to make a generic class that will manage an editable datagrid.
Part of the functionality of the class is that it shouldn't need to know the
names or types of the input fields - they will get passed in inside a panel,
and it will loop through the panel's control collection to extract the data
and create SP parameters on the fly.
This is OK for inputing (since the input fields are not part of the
datagrid) and deleting, but I've run into a problem when trying to edit a row
- I can't find a way of finding out the names of the controls. I can't even
find out if the controls are in some sort of container.
Of course, usually you find the edit mode controls by using Findcontrol(),
but you need to know the control's name. Looping through the controls or
items collection of the DataGrid doesn't seem to work.
The only alternative I can think of is to extrace the data in the page and
store it in some sort of data structure, and pass this in, but it isn't what
I had in mind.
Is there any way to get references to the EditItem controls at runtime?
Part of the functionality of the class is that it shouldn't need to know the
names or types of the input fields - they will get passed in inside a panel,
and it will loop through the panel's control collection to extract the data
and create SP parameters on the fly.
This is OK for inputing (since the input fields are not part of the
datagrid) and deleting, but I've run into a problem when trying to edit a row
- I can't find a way of finding out the names of the controls. I can't even
find out if the controls are in some sort of container.
Of course, usually you find the edit mode controls by using Findcontrol(),
but you need to know the control's name. Looping through the controls or
items collection of the DataGrid doesn't seem to work.
The only alternative I can think of is to extrace the data in the page and
store it in some sort of data structure, and pass this in, but it isn't what
I had in mind.
Is there any way to get references to the EditItem controls at runtime?