Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
9
Reply
How to get selected row cell value in 'RowCommand'?
Azaad Abbas
Apr 7 2015 3:43 AM
2.5k
Reply
by command name iam getting 'complaintId' and also want to get 'userId' which is other cell..then how?
protected void gridComplaintSearch_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "CompVIEW")
{
int row = Convert.ToInt32(e.CommandArgument);
Session["compUid"] = row;
int custId = Convert.ToInt32(gridComplaintSearch.SelectedRow.Cells[4].Text); /*Here throwing an error: Object reference not set to an instance of an object.*/
Response.Write("<script> window.open( '../Update Pages/ComplaintUpdate.aspx','_blank' ); </script>");
Response.Write("<script>window.opener.location.href = window.opener.location.href </script>");
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
9
)
Next Recommended Forum
System.Web.HttpUnhandledException
How to do this C# question?? Please someone help me..