根据aspxgridview中一行中的另一个单元格值禁用单元格

时间:2012-12-31 10:58:07

标签: c# asp.net devexpress aspxgridview

我的代码:

protected void ASPxGridView1_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableDataCellEventArgs e)
{
    if (e.DataColumn.FieldName == "col7name")
    {
        // Here I can disable the same cell by the following code:
        if ( < condition > )
        {
            e.Cell.Enabled = false;
        }
        // But my question is that how to disable another cell in the same row.
    }
}

如何根据devexpress aspxgridview中的另一个单元格值禁用同一行中的另一个单元格?

1 个答案:

答案 0 :(得分:0)

我使用了e.GetValue("fieldname")并实现了我的目标。