-1

I try to select the row from grid and show it in text box to make update and delete to the row.

I have tried this code with DataGrid. It worked, but when I use it in infragistics webdatagrid it gives me null

protected void WebDataGrid1_SelectedIndexChanged(object sender, DataGridViewCellEventArgs e)
{
   txtCode.Text = WebDataGrid1.Rows[e.RowIndex].Items[1].Value.ToString();
}

There is no error massage but data does not show in text box.

gawi
  • 2,843
  • 4
  • 29
  • 44

1 Answers1

0

try this

   protected void WebDataGrid1_SelectedIndexChanged(object sender,DataGridViewCellEventArgs e)
   {
       txtCode.Text = WebDataGrid1.Rows[e.RowIndex].call[1].Value.ToString();
   }