Posted 17 January 2024, 11:26 pm EST
- Updated 17 January 2024, 11:49 pm EST
Sorry, with my previous comment I overwrote the comment that I had first created. So, this is what I wrote before:
We found another way to reproduce the error with .631. In my original sample, I reset “Rows.Count” to “Rows.Fixed”. Here, the crash is fixed. But it still happens if “Cols.Count” is set to “Cols.Fixed”:
this.c1FlexGrid1.Cols.Count = this.c1FlexGrid1.Cols.Fixed; //Actually: "0"
this.c1FlexGrid1.Cols.Count = 1;
See attached reworked sample: start Windows Narrator, then double click in the grid to reproduce the error.
AutomationProviderTest_Version2.zip
The exception is:
Starting the exe from Explorer
System.ArgumentNullException: Value cannot be null. (Parameter 'provider')
at System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationEvent(AutomationEvent eventId, IRawElementProviderSimple provider, AutomationEventArgs e)
at C1.Win.Accessibility.UiAutomationExt.RaiseUiaEvent(IRawElementProviderSimple provider, AutomationEvent uiaEvent, AutomationEventArgs uiaArgs)
at y.a(Int32 A_0, Int32 A_1)
at C1.Win.FlexGrid.C1FlexGridBase.OnSelChange(EventArgs e)
at AutomationProviderTest611.MyFlexGrid.OnSelChange(EventArgs e) in C:\Users\wknauf\Desktop\AutomationProviderTest\AutomationProviderTest631\MyFlexGrid.cs:line 16
at C1.Win.FlexGrid.C1FlexGridBase.as()
at C1.Win.FlexGrid.C1FlexGridBase.OnGridChanged(Object sender, GridChangedEventArgs e)
at C1.Win.FlexGrid.C1FlexGrid.OnGridChanged(Object sender, GridChangedEventArgs e)
at au.a(GridChangedTypeEnum A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4)
at au.a(GridChangedTypeEnum A_0)
at a6.a(C1FlexGridBase A_0, CellRange A_1, Boolean A_2, Boolean A_3, Boolean A_4)
at a6.a(C1FlexGridBase A_0, CellRange A_1, Boolean A_2, Boolean A_3)
at a6.a(GridChangedTypeEnum A_0)
at au.a(GridChangedTypeEnum A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4)
at C1.Win.FlexGrid.ColumnCollection.a(Int32 A_0, Boolean A_1)
at C1.Win.FlexGrid.ColumnCollection.a(Int32 A_0)
at C1.Win.FlexGrid.ColumnCollection.set_Count(Int32 value)
at AutomationProviderTest611.Form1.c1FlexGrid1_DoubleClick(Object sender, EventArgs e) in ....\AutomationProviderTest\AutomationProviderTest631\Form1.cs:line 28
Starting the sample from Visual Studio:
Value cannot be null. (Parameter 'provider') (System.ArgumentNullException)
at System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationEvent(AutomationEvent eventId, IRawElementProviderSimple provider, AutomationEventArgs e)
at C1.Win.Accessibility.UiAutomationExt.RaiseUiaEvent(IRawElementProviderSimple provider, AutomationEvent uiaEvent, AutomationEventArgs uiaArgs)
at y.a(Int32 A_0, Int32 A_1)
at C1.Win.FlexGrid.C1FlexGridBase.OnSelChange(EventArgs e)
at AutomationProviderTest611.MyFlexGrid.OnSelChange(EventArgs e) in C:\Users\wknauf\Desktop\AutomationProviderTest\AutomationProviderTest631\MyFlexGrid.cs:line 16
at C1.Win.FlexGrid.C1FlexGridBase.as()
at C1.Win.FlexGrid.C1FlexGridBase.OnGridChanged(Object sender, GridChangedEventArgs e)
at au.a(GridChangedTypeEnum A_0)
at a6.a(C1FlexGridBase A_0, CellRange A_1, Boolean A_2, Boolean A_3, Boolean A_4)
at a6.a(GridChangedTypeEnum A_0)
at au.a(GridChangedTypeEnum A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4)
at C1.Win.FlexGrid.ColumnCollection.a(Int32 A_0, Boolean A_1)
at AutomationProviderTest611.Form1.c1FlexGrid1_DoubleClick(Object sender, EventArgs e) in ...\AutomationProviderTest\AutomationProviderTest631\For
Best regards
Wolfgang