I went ahead and made the method public and that resolves the problem I was having.
Here is what I am doing.
I have a calendar control that is used by 2 different text boxes and is displayed by the popup control. During the Calendar SelectionChanged event I save the SelectedDate of the calendar control and call the control extenders Commit method with the saved date. I then use GetCurrentExtenderInfo to get the targetBehaviorID and use FindControl to locate the proper textbox. Once I have that I set the Text property on the textbox.
Now when the update panel that contains the GridView uses DataBind the proper information is populated in the Grid. Had I not manually set the Text property on the text box then invalid data was being used and the DataBind would return invalid results.
- The GridView is in a different update panel than the PopupControlExtender.
- The DateSource used by the GridView is querying via a stored proc with the data coming from 3 text box controls. 2 of which are used by the popup control extender.
- The GridViews update panel has ControlValue Triggers on all 3 text boxes.
I am thinking that this situation would be fairly common and am wondering if perhaps I went about it incorrectly.
What I have seen is that when DataBind is called the values that the control extender sets are not updated soon enough.
Is there a better way to do this.
I am planning on adding a GetCurrentControl method, like GetCurrent to the toolkit to return the control that caused the popup to occur. It would function like GetCurrent only it would find the control that matches the behaviorID , minues the leading _.