The error message appears when opening the custom option from the filter icon in RadGridView.
The error message should not appear as there is a text in the textbox. When the enter key is pressed, the textbox value is still not committed which leads to this error. As a workaround, we can create a custom CompositeDataFilterForm override the ProcessCmdKey where we can handle this case.
public class MyCompositeDataFilterForm : CompositeDataFilterForm
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == Keys.Enter)
{
this.Controls[2] as RadButton).Focus();
(this.Controls[2] as RadButton).PerformClick();
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
private void RadGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e)
{
var newForm = new MyCompositeDataFilterForm();
e.Dialog = newForm;
}