The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
This is my first post...I hope I am following by all protocols...
I have a datagrid with the first cell containing a "Delete" linkbutton (eg: a ButtonColumn as defined in datagrid's PropertyBuilder).
As I build the data into the grid, I test the current datagrid record to determine if it is already marked as "deleted" ('ExpirationDate' column value less than today's date) such that a deleted record should not have the "Delete" linkbutton 'active' (eg: clickable). In all other cases, the "Delete" linkbutton should be 'active'.
I have tried several of the following statements inside a method executed by the datagrid's "OnItemDataBound" event but find that the links still remain 'active' even though they appear in the typical disabled grey coloring:
--------code snippet start--------
string expdate= ((DataRowView)e.Item.DataItem).Row.ItemArray[4].ToString();
DateTime dt = Convert.ToDateTime(expdate)
if (dt <= DateTime.Today)
{
//next line disables link in cell....but you can still click link
e.Item.Cells[0].Enabled = false;
//next line disables entire row...but you can still click link
e.Item.Enabled = false;
//next line hides link but actually removes 1st cell entirely....giving ugly left shift of current record
e.Item.Controls[0].Visible = false;
}
--------code snippet end--------
Many thanks in advance!
ADAdministrator Syncfusion Team March 22, 2003 11:05 PM UTC
This forum is for questions regarding Essential Grid, not the Windows Forms DataGrid.
Try posting in the Windows Forms FAQ forum or on Microsoft newsgroups.
Stefan
Need More Help?
Get personalized assistance from our support team.