Event firing problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a datagrid, whose sort command event does not get fired first time
around. It takes 2 clicks to sort the grid.
This is the first time that I have encountered this problem. Any pointers on
why it is behaving this way?

Regards,
Piyush
 
Hi,

I have a similar problem where event are not fired the first time. I have
two buttons and a datagrid on a form. The datagrid has a link button column
and the first click does not fire the event for the link button and the
buttons on the form. I can see that the page does postback except it does
not raise the event. Any idea why? And , data binding is done only if it is
not postback.

TinaD
 
Hi,

I found the reason for my datagrid problem; it was an id I failed to set on
the page load of the user control. Moving the MyGrid.ID line below out side
of the if statement seems to correct my problem. And my other problem with
the regular buttons also solved.

If Not Page.IsPostBack Then
GetData()
BindGrid()
MyGrid.ID = "hgrid" 'this was the problem line
Else
GetHGridSession()
End If
Piyush, I hope you have resolved your problem by now, if not check for the
grid id value.
 
Back
Top