Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Button columns in web datagrid
Message
From
30/07/2003 16:40:45
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Button columns in web datagrid
Miscellaneous
Thread ID:
00815118
Message ID:
00815118
Views:
49
I'm using ASP.Net to create a Webform.

In my web form I have a data grid named datagrid1. I have created a Button Column in the data grid. The Help files says that I have to create an event handler in my web page for this button column.

I am unsure how to do this.

When a user clicks on any row in my datagrid button column, I want to capture the row they clicked and perform a task.

In my Webform I created a few methods such as:

private void datagrid1_Command(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//I do stuff here.
}

private void datagrid1_Delete(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//I do stuff here.
}

However, when I click on any button column, my Webform refreshes but none of my code is run.

The name I entered in the textbox for my Command Name in the button column dialog is Delete.

What am I missing when trying to use button columns in a data grid?

Thanks,

Jerry
Next
Reply
Map
View

Click here to load this message in the networking platform