Hi,
Im using GridSwitchColumn for my SfDataGrid, and what I want is when I click that
GridSwitchColumn before the value change, i want to check first if some data is true or note, if true, I want to cancel editing. Or in short, is disable editing in some row & column based on some value of the data.
but the problem is when i use
CurrentCellBeginEdit event, its doesn't trigerred. help me please. Thanks
here is my code:
public KonfirmasiBarangRepairStep2()
{
InitializeComponent();
viewModel = BindingContext as KonfirmasiBarangRepairStep2ViewModel;
viewModel.InitPage = true;
barangRepariGrid.CurrentCellBeginEdit += barangRepariGrid_CurrentCellBeginEdit;
}
private void barangRepariGrid_CurrentCellBeginEdit(object sender, Syncfusion.SfDataGrid.XForms.GridCurrentCellBeginEditEventArgs e)
{
int rowIndex = this.barangRepariGrid.ResolveToRecordIndex(e.RowColumnIndex.RowIndex);
var record = this.barangRepariGrid.View.Records[rowIndex];
if ((record.Data as T_REPAIR_DET).KONFIRMASI_F_B_O == true)
{
(record.Data as T_REPAIR_DET).KONFIRMASI_F_B = true;
e.Cancel = true;
}
}