Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
Trouble accessing data text in datagrid button column
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
hlouzek
19y
1.7k
1
Reply
Hi I have a datagrid with one of the columns as a buttoncolumn and the others as bound columns. I also have an onitemcommand and when i select it I'd like to display the contents of the buttoncolumn. However the syntax: Response.Write(e.Item.Cells[0].Text); does not work for the buttoncolumn. However if i change the Cells[?] to one of the bound columns, it works just fine! Thanks for any help, sam here's some of my code: public void Grid_Command(object sender, DataGridCommandEventArgs e) { if (((LinkButton)e.CommandSource).CommandName == "gotoLotHistory") { Response.Write(e.Item.Cells[0].Text); //Response.Redirect("http://x3vision/visioncs/lothistory.aspx?lot=" + e.Item.); } }
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Need small code please
drop downs on C# Forum