C# “选定行到文本框”
我尝试从网格中选择行,并将其显示在文本框中,以对该行进行更新和删除 我已经用DataGrid尝试了这段代码。它工作了,但当我在infragistics webdatagrid中使用它时,它给我空值C# “选定行到文本框”,c#,asp.net,infragistics,webdatagrid,C#,Asp.net,Infragistics,Webdatagrid,我尝试从网格中选择行,并将其显示在文本框中,以对该行进行更新和删除 我已经用DataGrid尝试了这段代码。它工作了,但当我在infragistics webdatagrid中使用它时,它给我空值 protected void WebDataGrid1_SelectedIndexChanged(object sender, DataGridViewCellEventArgs e) { txtCode.Text = WebDataGrid1.Rows[e.RowIndex].Items[1]
protected void WebDataGrid1_SelectedIndexChanged(object sender, DataGridViewCellEventArgs e)
{
txtCode.Text = WebDataGrid1.Rows[e.RowIndex].Items[1].Value.ToString();
}
没有错误信息,但数据不会显示在文本框中。试试这个
protected void WebDataGrid1_SelectedIndexChanged(object sender,DataGridViewCellEventArgs e)
{
txtCode.Text = WebDataGrid1.Rows[e.RowIndex].call[1].Value.ToString();
}