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.
I have an editable grid which consists of columns of type "dropdown" and "text".Now if the user selects the cell and press delete key the value in the cell gets deleted.
The issue is:
1. Text box cell type:To restirct deleting the cell value,i have used the following code:
private void dgAnalysis_CurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs e)
{
if((e.Text == "") || (e.Text == DBNull.Value.ToString()))
{
MessageBox.Show("Null is not the valid value." );
e.Cancel = true;
}
}
Now sometimes this code runs and somtimes allow me to come out of the cell without any error.
2.ComboBox Cell Type : I have set the drop down "ExclusiveChoiceList" property to true.
a)Select the value from drop down.
b)set focus to some other cell
c)Bring the focus to cell in step a.
d)Press Delete Key.
The value will be deleted from the cell.Also note that the value is not deleted from the combo box.
Can you suggest the solution to restrict delete in above two cases.
ADAdministrator Syncfusion Team September 16, 2004 12:22 PM UTC
Try handling the grid.Model.ClearingCells event, and set e.Handled = true and e.Result = false if e.RangeList contains a cell you do not want to delete.