I am having trouble with a datagrid as part of a
composite web control. In CreateChildControls, I rebind
the datagrid to a datatable in a session variable if the
page is posted back. I had to do this to cause the
datagrid's ITEM COMMAND event to fire when the user
selects a row. However, doing that causes the PAGE INDEX
CHANGED event to NOT fire when the users selects page 1;
the event does fire if the user selects pages 2, 3,
4...n. If, in debug, I cause the rebind to not occur in
the CreateChildControls routine, the PAGE INDEX CHANGED
event does fire when the user selects page 1. Can
someone explain? Also, how do I tell which event from
which control was fired on the postback? If I knew that,
I suppose I could not rebind if the PAGE INDEX CHANGED
event occurred.
Alan Corbett \(.NET MVP\) - 25 Sep 2003 21:13 GMT
For firing of Events, take a look at:
RaisePostBackEvent
-Alan
> I am having trouble with a datagrid as part of a
> composite web control. In CreateChildControls, I rebind
[quoted text clipped - 11 lines]
> I suppose I could not rebind if the PAGE INDEX CHANGED
> event occurred.