Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > PushButton event

Reply
Thread Tools

PushButton event

 
 
Mark
Guest
Posts: n/a
 
      07-02-2003
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


 
Reply With Quote
 
 
 
 
Saravana
Guest
Posts: n/a
 
      07-03-2003
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
>
>



 
Reply With Quote
 
 
 
 
Maciek Pawlowski
Guest
Posts: n/a
 
      07-03-2003
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
> >
> >

>
>



 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      07-03-2003
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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding a PushButton Event Bryan G ASP .Net 1 04-02-2004 08:51 PM
Bug in DataGrid - ItemCommand event does not fire for ButtonColumnif ButtonType="PushButton" Nick Gilbert ASP .Net Datagrid Control 4 12-16-2003 06:39 AM
Bug in DataGrid - ItemCommand event does not fire for ButtonColumnif ButtonType="PushButton" Nick Gilbert ASP .Net 2 12-15-2003 08:10 AM
Solving DataGrid's PushButton Problem Curtis Hatter ASP .Net 1 10-17-2003 09:41 PM
PushButton v. LinkButton in a DataGrid Mark ASP .Net 1 07-03-2003 05:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57