Use this event...
MyGrid.HtmlCommandCellPrepared += MyGrid_HtmlCommandCellPrepared;
...like so:
private void MyGrid_HtmlCommandCellPrepared(object sender,
ASPxGridViewTableCommandCellEventArgs e)
{
if (e.CommandColumn.Caption == "Delete")
{
if(e.KeyValue.ToString() == ((User)Session["User"]).Username)
{
e.Cell.Controls.Clear();
}
}
}
No comments:
Post a Comment