datagrid page event not firing

C

C. Ramsey

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top