TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Azaad Abbas
NA
221
41.5k
How to get selected row cell value in 'RowCommand'?
Apr 7 2015 3:43 AM
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>");
}
}
Reply
Answers (
9
)
System.Web.HttpUnhandledException
How to do this C# question?? Please someone help me..