S
Svetoslav Vasilev
Hello, i experienced some wiered behaviour from a
DataGrid control. The instance of the control has both
the ItemCommand and PageIndexChanged events assigned
corresponding handler methods.It happened that the
control fires the ItemCommand event handler when I click
over a page number in order to change the current page. I
find this behaviour strange since I used this approach
with many other DataGrids and whenever a page number is
clicked the PageIndexChanged event is fired and handled.
I had to add a check for the CommandName of the command
to be different than "Page" in order to have proper
processing in the ItemCommand event handler.
I would like to get some help on how to overcome this
problem. The DataGrid is hosted in a user web control and
the event handlers are dinamically assigned in the OnInit
() method of that control.
Thanks in advance.
Svetoslav
DataGrid control. The instance of the control has both
the ItemCommand and PageIndexChanged events assigned
corresponding handler methods.It happened that the
control fires the ItemCommand event handler when I click
over a page number in order to change the current page. I
find this behaviour strange since I used this approach
with many other DataGrids and whenever a page number is
clicked the PageIndexChanged event is fired and handled.
I had to add a check for the CommandName of the command
to be different than "Page" in order to have proper
processing in the ItemCommand event handler.
I would like to get some help on how to overcome this
problem. The DataGrid is hosted in a user web control and
the event handlers are dinamically assigned in the OnInit
() method of that control.
Thanks in advance.
Svetoslav