المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Getting the cells data when clicked on it in gridview asp.net



C# Programming
11-10-2009, 07:21 AM
Hey guys I have a problem in retriving the cell data from the gridview...Though I had tried with selected index change and row commands........the value it gives is just null...........here is the code

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int row_index = int.Parse(e.CommandArgument.ToString());//gives index of the row

string _commandName = e.CommandName;

Label1.Text = Info_DGV.Rows[row_index].Cells[1].Text.ToString();



}