1

这是我正在使用的代码,但项目索引现在是它跳转的正确行索引,所以我认为我的代码错误。欢迎任何帮助!谢谢

protected void FailureRadGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "RowClick" && e.Item is GridDataItem)
    {
        FailureSourcePanel.Visible = true;
        EmployeeInputPanel.Visible = true;
        GridDataItem item = (GridDataItem)FailureRadGrid.MasterTableView.Items[e.Item.];
        FailureDescriptTextBox.Text = item["FullDescrip"].Text;
        FailureCouponID.Text = item["CouponID"].Text;
        FailureProductTextBox.Text = item["Product"].Text;
        FailureUnitLabel.Text = item["Unit"].Text;
        FailureValueTextBox.Text = item["Value"].Text;
    }


}
4

1 回答 1

0

你可以做类似的事情

var editedItem = (GridEditableItem)e.Item;
FailureDescriptTextBox.Text =  editedItem["FullDescrip"].Text;
于 2012-07-13T17:09:14.730 回答