D
DanG
Howdy,
In a UserControl, I have a DataGrid containing textboxes. The
textboxes have AutoCallBack=true, and onTextChanged="TextChanged". The
parent control does a LoadControl("Child.ascx") in its Page_Load. The
first time (only) that the UserControl appears, the onTextChanged event
won't fire.
When a textbox first displays with "aaa", the user changes the value to
"bbb", and clicks tab. First, the parent Page_Load runs, and then the
UserControl Page_Load runs, and the textbox changes back to "aaa". :-o
Repeating the steps a second time, the user enters "ccc" and clicks
tab. This time, the parent Page_Load runs, the UserControl Page_Load
runs, and then the TextChanged function is called, which successfully
processes the "ccc". All subsequent updates work fine.
Why doesn't the onTextChanged event fire the first time??? I've stared
at this for three days already. I could use a clue. I read somewhere
to try setting the DataGrid to EnableViewState=false, but that didn't
help.
Cheers
Dan
In a UserControl, I have a DataGrid containing textboxes. The
textboxes have AutoCallBack=true, and onTextChanged="TextChanged". The
parent control does a LoadControl("Child.ascx") in its Page_Load. The
first time (only) that the UserControl appears, the onTextChanged event
won't fire.
When a textbox first displays with "aaa", the user changes the value to
"bbb", and clicks tab. First, the parent Page_Load runs, and then the
UserControl Page_Load runs, and the textbox changes back to "aaa". :-o
Repeating the steps a second time, the user enters "ccc" and clicks
tab. This time, the parent Page_Load runs, the UserControl Page_Load
runs, and then the TextChanged function is called, which successfully
processes the "ccc". All subsequent updates work fine.
Why doesn't the onTextChanged event fire the first time??? I've stared
at this for three days already. I could use a clue. I read somewhere
to try setting the DataGrid to EnableViewState=false, but that didn't
help.
Cheers
Dan