value of a cell of selected row
-
You asked this question before and I gave you the answer. The reason why it could not have worked for you is most likely your setting a row's state as Selected wrong. My question therefore: how do you select the row, in other words, what code do you exectue in the application, so that it recognizes your desired row as .SelectedRow. Looking at it very hard or highlighting is not the right way. Usually, where you actually do Select a row, getting data from it is really, really easy.
string something = Gridview1.SelectedRow.Cells[0].Text;
Honestly, do post some more information, maybe some code of your own if you want people's replies to be relevant.
var question = (_2b || !(_2b));
-
You asked this question before and I gave you the answer. The reason why it could not have worked for you is most likely your setting a row's state as Selected wrong. My question therefore: how do you select the row, in other words, what code do you exectue in the application, so that it recognizes your desired row as .SelectedRow. Looking at it very hard or highlighting is not the right way. Usually, where you actually do Select a row, getting data from it is really, really easy.
string something = Gridview1.SelectedRow.Cells[0].Text;
Honestly, do post some more information, maybe some code of your own if you want people's replies to be relevant.
var question = (_2b || !(_2b));
Thank you Greg Chelstowski; I tried your code and there:
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewRow row = GridView1.Rows[GridView1.SelectedIndex];
string strValCell = row.Cells[2].Text;
}//and
public void GridView1_SelectedIndexChanged(Object sender, EventArgs e)
{TextBox1.Text = GridView1.SelectedRow.Cells\[2\].Text; }
but it doesn't work " any result" and if i do
public void GridView2_SelectedIndexChanged(Object sender, EventArgs e)
{
TextBox tb = GridView1.SelectedRow.FindControl("id0") as TextBox;
if (tb != null)TextBox1.Text = tb.Text; else TextBox1.Text = "no data"; }
I have always "no data"