in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Editing issue with CheckBox using StartEditing method

Last post 01-31-2008 5:01 AM by calyonfo. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-31-2008 5:01 AM

    Editing issue with CheckBox using StartEditing method

    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

Page 1 of 1 (1 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.