PC Review


Reply
Thread Tools Rate Thread

DataGrid column button Question

 
 
=?Utf-8?B?QnJpYW5ESA==?=
Guest
Posts: n/a
 
      23rd Nov 2004
Hi
I have a web form with a Datagrid. Within the data grid I have a Column
button.
If the button is of type "Linkbutton" my VB code-behind will catch the users
"click"
However, if it is set to "Pushbutton" I am unable to trap the users
click. See code Below.
I don't understand what I am missing. why won't the
"Pushbutton" work?

VB code Behind:
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.ItemCommand
'get value of row here
End Sub

HTML:
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 80px; POSITION:
absolute; TOP: 140px" runat="server" Width="484px">
<Columns>
<asp:ButtonColumn Text="Select" ButtonType="PushButton"
CommandName="Select"></asp:ButtonColumn>
</Columns>
</aspataGrid>
</form>
</body>

Thanks
Brian





 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
HyperLink Column and Button Column in a DataGrid =?Utf-8?B?V2FyYW4=?= Microsoft ASP .NET 0 9th Aug 2005 01:00 AM
add a button column to a datagrid Sam Microsoft VB .NET 3 3rd May 2005 11:52 AM
Getting the value out of a button column in a datagrid Amaryllis Microsoft ASP .NET 2 9th Mar 2005 09:37 PM
how to add button column in Datagrid =?Utf-8?B?UmFqaXY=?= Microsoft Dot NET Framework Forms 3 2nd Sep 2004 11:49 PM
DataGrid button column Patrick B. Microsoft VB .NET 1 8th Jan 2004 07:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:57 AM.