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
Which is the parent class of the ASP.NET server control?
Explain the difference between panel and groupbox classes using .net?
List the major built-in objects in asp.net?
What kind of data can be stored in viewstate?
How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.
What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?
How do you sign out from forms authentication?
What does asp stand for in asp.net?
What is the Intermittent crashing of application in production?
Difference between response.redirect and server.transfer?
What's the ASP.Net Application life cycle?
What is asp net objects?
How Can assign alias name for ASP.NET Web API Action?
What I need to create and run an asp.net application?
Explain the asp.net page life cycle.