hlouzek

hlouzek

  • NA
  • 3
  • 0

Trouble accessing data text in datagrid button column

Oct 27 2004 6:36 PM
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.); } }