We are using NUnitForms framework for Gui testing. But when we want to use the StartEditing method, the CheckBox Editor is always Null. We also use DataType bool in the column.
_grid.Cols[0].DataType = typeof(bool);
Here is the example of our StartEditing usage:
private bool EditingCell<EditorType>(int aRowIndex, string aColumnName, string aPropertyName, object aValue)
where EditorType : Control
{
bool lResult = Properties.StartEditing(aRowIndex, Properties.Cols[aColumnName].Index);
EditorType lEditor = Properties.Editor as EditorType;
if (lEditor != null)
{
PropertyInfo lProperty = typeof(EditorType).GetProperty(aPropertyName);
if (lProperty != null)
{
lProperty.SetValue(lEditor, aValue, null);
}
}
lResult &= Properties.FinishEditing();
DoEvents(SHORT_WAITING_TIMEOUT);
return lResult;
}
The thing is, I need to set true or false value even if the checkbox is already checked.
Ref. of the same issue: http://helpcentral.componentone.com/CS/forums/p/36763/102052.aspx#102052
Thanks