Got it to work. I don't understand it, but it works. Below is all I
changed:
Old code in Page_Load:
dgSir.DataBind();
New Code in Page_Load:
if (!IsPostBack)
{
dgSir.DataBind();
}
So, why would the PushButton be affected by a re-binding of the data, but
the LinkButton wouldn't?
Thanks.
Mark
"Maciek Pawlowski" <> wrote in message
news:...
> I have had the same problem. I changed the button type property to
> pushbutton in the property
> builder. However, the event doesn't seem to fire....unless I set the
> enableviewstate of the datagrid to false...
> Am I missing something?
>
> "Saravana" <> wrote in message
> news:#...
> > how did you changed to push button style, did you used buttontype
property
> > to mention it as pushbutton.In that case you can catch event as you do
> with
> > link button style. You can write code for EditCommand event handler.
> > --
> > Saravana
> > Microsoft India Community Star,
> > MCAD,SE,SD,DBA.
> >
> >
> > "Mark" <field027_nospam_@umn.edu> wrote in message
> > news:...
> > > Rather than using a LinkButton for "Edit" and "Delete" in my DataGrid,
I
> > > changed them to a PushButton style. How do you capture the event? It
> > > doesn't appear to work like a LinkButton.
> > >
> > > Thanks in advance!
> > > Mark
> > >
> > >
> >
> >
>
>
|