Hi Tom,
Thank you for using Syncfusion controls.
You can prevent the cursor from moving to the SfDataGrid by enable the SfDataGrid.Enable property. Please refer the below code,
C#:
public Form1()
{
InitializeComponent();
this.sfDataGrid1.DataSource = list;
this.sfDataGrid1.Enabled = false;
}
|
private void ComboBox2_SelectedValueChanged(object sender, EventArgs e)
{
if (comboBox2.SelectedValue.ToString() == "Printer")
this.sfDataGrid1.Enabled = true;
} |
Here, we initially disabled the SfDataGrid and after validating the ComboBox2, enabled the SfDataGrid. You can use this property based on your validation.
Please check the sample and let us know If we misunderstood anything, please modify the above sample based on your requirement and revert us back.
Regards,
Susmitha S