hi i have a problem regarding to datagrid in aspdotnet.i
have a datagrid in my application.i have to place
add,edit,delete buttons or links what ever it may be.
now the problem is if i click on add button then the page
has to redirected to another form called "xyz.aspx" and if
i click on edit button the page has to redirected to
another form called "abc.aspx".i am phasing the problem
that if where ever i click on the datagrid the cursor goes
to gv1_SelectedIndexChanged event.please tell me the
solution about the code.
Answer Posted / anant anand gupta
You can use the ItemCommand event of the datagrid.
give each command button a 'CommandName'
And 'CommandArgument' if required. CommandArgument you can
assign at the time of ItemDataBound (or RowDataBound) event
of the DataGrid. In the event handler method you can check
for the command name and perform the required task.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the new navigation controls in asp.net 2.0?
Is it possible to develop a single web application using ASP.NET webforms and ASP.MVC?
How to deploy/publish webservices?How many ways?Plz explain me
What is the difference between trace and debug in asp.net?
What is the difference between a default skin and a named skin?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
How to use multiple scriptmanager controls in a web page?
What is a web pool?
What is strong-typing versus weak-typing?
How does the cookies work in asp.net?
What are the 3 levels at which content pages can be attached to Master Page?
What is the difference between c# and .net?
Can we have multiple master pages in asp net?
What is the procedure to create the environment for asp.net? : asp.net mvc
What is difference between asp state management and asp.net state management? How can we pass info between 2 asp.net pages?