Question

Good day!

I've found some issue related to GridControl coded ui-tests in VS2010. In it's pure state GridControl tests perfectly, but if I add some extra-functionality, then tests fail.

I want to create GridView editable checkbox column for multi-select options. It is convenient for me that this column is bound to datatable column "B_Checked". DevExpress GridControl designed so that it pushes data to underlying datasource on row change. I want to change that behaviour. DevExpress recommends to use repositoryItemCheckEdit1_EditValueChanged event - > PostEditor() to resolve such case

   private void repositoryItemCheckEdit1_EditValueChanged(object sender, EventArgs e)
    {
        this.gridView1.PostEditor();
        this.gridView1.UpdateCurrentRow();
    }

In that case all changes on multi-select column commits to datasource immediately, but ui tests stop working ((. It doesn't recognize changes made to column state, so if you check all rows, for example, on playback you wouldn't see it.

Has someone encountered that issue?

Was it helpful?

Solution

OK. The only solution that worked for me is to override DoChangeFocusedRowInternal method of GridView so that it always throws FocusedRowChanged event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top