in

C1 Community

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

StartEditing - FinishEditing model

Last post 09-16-2004 11:42 PM by newsgroup_archive. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-16-2004 3:03 PM

    StartEditing - FinishEditing model


    Hello,

    I am using NUnit to automate the testing of my grid. So far I
    have been successful with editing text boxes and combo-boxes,
    but I can't get checkboxes to work.

    I am purposely calling StartEditing and FinishEditing to
    exercise my ValidateGrid event handler and AfterEdit event
    handler. Using the Start/Finish editing methods is the only way
    to get those events to fire and to have valid editor controls.

    My problem is that I call StartEditing on a checkbox cell and
    it returns true. But the Editor member is still null. So I
    can't set the state of the checkbox that I want before calling
    FinishEditing().

    How can I set the checkbox in the grid such that the
    ValidateEdit and AfterEdit events fire? By just setting the
    cell data to true/false, it won't cause these events to fire.

    Thanks,
    Aaron

    Click here to view the original newsgroup article (read only).

  • 09-16-2004 11:42 PM In reply to

    Re: StartEditing - FinishEditing model

    Hi Aaron

    > I am using NUnit to automate the testing of my grid. So far I
    > have been successful with editing text boxes and combo-boxes,
    > but I can't get checkboxes to work.

    Try using SendKeys.Send(" "). That will simulate a key press and change the
    check box, firing all the usual events.


    Click here to view the original newsgroup article (read only).

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