Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am using Asp.net , VS2008.

I have gridview in tabcontainer and using item template field with linkbutton (select).

In linkbutton i have assinged CommandName and CommandArgument. after that i am using

GridView1_RowCommandand and GridView1_RowEditing Event and put break point in GridView1_RowCommandand.

but in runtime if i select any row than RowCommand event is not getting in gridview.

how to assign break point in GridView1_RowCommandand in gridview............

Regards
Mukesh
Posted
Comments
Thanks7872 23-Sep-13 1:36am    
Not at all clear. You should post the relevant code and explain what you have done,what you expected and what actually happened. The above description is not clear enough.

Though Your question is not clear i am trying to answer from what i understood...

your link button code in .aspx.cs file should be like...

C#
<asp:linkbutton id="lnkdelete" runat="server" text="Delete" commandname="del" commandargument='<%# Eval("PrimaryKey_ID") %>' >
</asp:linkbutton>


here look at commandname = "del",
if you use commandname "delete" or "edit" it will automatically call the OnRowDeleted or OnRowEdited event
so make sure you are not using this reserved keyword as your commandname otherwise it will call those events and your OnRowCommand Event will not get executed.

AND another thing try to use OnRowCommand1(){} if this works.
please elaborate your question.

Hope This Help
 
Share this answer
 
v3
same problem mukesh..
Have u got any solution for that...??
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900