Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Button columns in web datagrid
Message
From
31/07/2003 08:41:24
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00815118
Message ID:
00815339
Views:
8
Thanks, that makes sense now.

Jerry



>Hi Jerry,
>
>You need to add OnEditCommand="datagrid1_Command" and OnDeleteCommand="datagrid1_Delete" to your html page where it defines the DataGrid. This is where it ties the DataGrid to the custom methods that you created.
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform