MrNorth
Apr 2nd, 2004, 01:45 AM
I have an application where I have split the different functions in user controls, one for search and one for "add new/change"
Im using the infragistics web tabs, and that workds great... Now I have a problem...
On the search user control, I have a datagrid with a template button comumn, which says "change".
When I click change I want the tab with the "add new/change" UC to load with the new data...
PROBLEM... At design time I can't make a reference to the ultra web tab... and I need that so I can change tab index programmatically... and also in the data grid button event I am calling a method which need references to the controls in the "add new/change" UC...
I can get the reference to those controls by iterating through the control tree in the tab control, but I still need to have a reference to the tab control in order for the whole thing to work...
Anyone that has any ideas how to solve this??? That is the main problem with user controls... when I add logic to it that almost always need references to something outside the user control.. like a button click etc..
how can I work around this?
Recap: I have a button in the user control.. when I click the button I need to do something with a control that is placed on the same aspx page as the user control... HOW!!! That control is unknown in the scope of the UC, how can I make it known????
EDIT:
In order to rephrase a bit... How do I affect something outside the user control??? Like a textbox on the webform where I have placed the user control?
kind regards
Henrik
Im using the infragistics web tabs, and that workds great... Now I have a problem...
On the search user control, I have a datagrid with a template button comumn, which says "change".
When I click change I want the tab with the "add new/change" UC to load with the new data...
PROBLEM... At design time I can't make a reference to the ultra web tab... and I need that so I can change tab index programmatically... and also in the data grid button event I am calling a method which need references to the controls in the "add new/change" UC...
I can get the reference to those controls by iterating through the control tree in the tab control, but I still need to have a reference to the tab control in order for the whole thing to work...
Anyone that has any ideas how to solve this??? That is the main problem with user controls... when I add logic to it that almost always need references to something outside the user control.. like a button click etc..
how can I work around this?
Recap: I have a button in the user control.. when I click the button I need to do something with a control that is placed on the same aspx page as the user control... HOW!!! That control is unknown in the scope of the UC, how can I make it known????
EDIT:
In order to rephrase a bit... How do I affect something outside the user control??? Like a textbox on the webform where I have placed the user control?
kind regards
Henrik