E
Eagle
I have tried just about everything that I can understand.
I have 2 user controls on a form. One user control has a drop down list,
and the 2nd user control has a datagrid, that is editable.
When the drop down list is changed, I need the 2nd user control to be
refreshed with new information. That's fine, I can rebind the grid in the
page_load. However, rebinding the grid in the Page_Load, prevents the edit
from working, as the edit causes a postback, which rebinds the grid and
returns it to normal. If I rebind the grid only on not postback, then the
drop down list doesn't cause the 2nd control to reflect the new information.
I don't understand the raise event feature -- when I watch the stack, the
2nd control always loads first, so how can it grab data from the 1st control
when it hasn't even loaded yet. Seems very backward to me, if the drop down
list is on the 1st control, and the user clicks the drop down list to change
its value, why would the 2nd control load first, rendering the
dropdownlist's select index changed event useless. And the form itself
loads last! So even if I raise the event and grab it with the form, since
the 2nd control is already loaded, then it still doesn't force the 2nd
control to reload with the new value.
What am I missing? Can you be very explicit in your explanation with some
samples, as I have read many many samples that I do not understand.
Thank you very much.
I have 2 user controls on a form. One user control has a drop down list,
and the 2nd user control has a datagrid, that is editable.
When the drop down list is changed, I need the 2nd user control to be
refreshed with new information. That's fine, I can rebind the grid in the
page_load. However, rebinding the grid in the Page_Load, prevents the edit
from working, as the edit causes a postback, which rebinds the grid and
returns it to normal. If I rebind the grid only on not postback, then the
drop down list doesn't cause the 2nd control to reflect the new information.
I don't understand the raise event feature -- when I watch the stack, the
2nd control always loads first, so how can it grab data from the 1st control
when it hasn't even loaded yet. Seems very backward to me, if the drop down
list is on the 1st control, and the user clicks the drop down list to change
its value, why would the 2nd control load first, rendering the
dropdownlist's select index changed event useless. And the form itself
loads last! So even if I raise the event and grab it with the form, since
the 2nd control is already loaded, then it still doesn't force the 2nd
control to reload with the new value.
What am I missing? Can you be very explicit in your explanation with some
samples, as I have read many many samples that I do not understand.
Thank you very much.