ContributionsMost RecentMost LikesSolutionsRe: "Unexpected error from external database driver (1)" in TestComplete following MS update KB4041676 This is a know Microsoft Problem with the Jet Engine, that Microsoft say they are working on. https://support.microsoft.com/en-gb/help/4041676/windows-10-update-kb4041676 Re: Using Infragistics WPF xamDataGrid, how do you add a child row to a parent row Hi After some trial and error if I added in the following lines using WaitWPFObject that waits for various objects in the calling tree. e.g. call Aliases.RHICOMS_SAM.HwndSource_ShellWindow.ShellWindow.LayoutRoot.Grid.XamDockManager.DocumentContentHost.TabbedDocumentSplitPane.SplitPane.ztabGroupMainRegion.ContentpaneComponentsClasses.ModuleComponentsDimensionsView.Grid.XamDockManager.SplitPane.ComponentClassesContentPane.ComponentClassesGrid.Grid.RecordListControl.DataRecordPresenter4.DockPanel.DataRecordCellArea.ContentItemGrid.WaitWPFObject("CellValuePresenter") call Aliases.RHICOMS_SAM.HwndSource_ShellWindow.ShellWindow.LayoutRoot.Grid.XamDockManager.DocumentContentHost.TabbedDocumentSplitPane.SplitPane.ztabGroupMainRegion.ContentpaneComponentsClasses.ModuleComponentsDimensionsView.Grid.XamDockManager.SplitPane.ComponentClassesContentPane.ComponentClassesGrid.Grid.RecordListControl.DataRecordPresenter4.DockPanel.DataRecordCellArea.ContentItemGrid.CellValuePresenter.WaitWPFObject("XamTextEditor") before setting xamTextEditor2 then it works. Thank you for the guidance. Regards Bill Simpson Re: Using Infragistics WPF xamDataGrid, how do you add a child row to a parent row Hi As additional info, below is the recorded vbScript code as I cannot see the attached file that went with the original post Sub TestAddingChildRow Dim grid Dim grid2 Dim xamDataGridEx Dim recordListControl Dim xamTextEditor Dim button ' display the xamDataGrid Set grid = Aliases.RHICOMS_SAM.HwndSource_ShellWindow.ShellWindow.LayoutRoot Call grid.Grid2.ApplicationRibbon.ClickItem("Configuration|Component Classes") Call Delay(1901) Set grid2 = grid.Grid.XamDockManager.DocumentContentHost.TabbedDocumentSplitPane.SplitPane.ztabGroupMainRegion.ContentpaneComponentsClasses.ModuleComponentsDimensionsView.Grid Set xamDataGridEx = grid2.XamDockManager.SplitPane.ComponentClassesContentPane.ComponentClassesGrid Set recordListControl = xamDataGridEx.Grid.RecordListControl Call recordListControl.Drag(1128, 24, -5, 205) Call Delay(1433) ' go to last row on the grid and add the new parent row Call xamDataGridEx.ClickNewRowCell("Component Class") Call Delay(1146) Set xamTextEditor = recordListControl.DataRecordPresenter.DockPanel.DataRecordCellArea.ContentItemGrid.CellValuePresenter.XamTextEditor ' type in value to the parent row which becomes row 216 Call xamTextEditor.Keys("zzzzzz my new row") Call Delay(1647) ' save the grid changes Set button = grid2.Header.btnSave button.ClickButton Call Delay(1188) Call xamDataGridEx.ClickCellR(216, "Component Class") Call Delay(933) ' right click popup menus adds a child row Call xamDataGridEx.PopupMenu.Click("Add New SubComponent") Call Delay(1422) xamDataGridEx.Expand(216) Call Delay(1423) ' now we click in the cell on the new child row Call xamDataGridEx.wChildView(216).wChildView(0).ClickCell(0, "Sub Class") Call Delay(3423) Dim xamTextEditor2 Call Delay(3423) 'xamTexteditor2 should be on child row cell, but Object Spy browser values are as follows ' with the result that the "my new subrow" updates the incorrect row ' or we get an error thatt the object "XamTextEditor" does not exist. Set xamTextEditor2 =Aliases.RHICOMS_SAM.HwndSource_ShellWindow.ShellWindow.LayoutRoot.Grid.XamDockManager.DocumentContentHost.TabbedDocumentSplitPane.SplitPane.ztabGroupMainRegion.ContentpaneComponentsClasses.ModuleComponentsDimensionsView.Grid.XamDockManager.SplitPane.ComponentClassesContentPane.ComponentClassesGrid.Grid.RecordListControl.WPFObject("DataRecordPresenter", "", 5).WPFObject("DockPanel", "", 1).WPFObject("DataRecordCellArea", "", 1).WPFObject("ContentItemGrid").WPFObject("CellValuePresenter", "", 1).WPFObject("XamTextEditor", "", 1) Call Delay(992) Call xamTextEditor2.Keys("my new subrow") Call Delay(5150) button.ClickButton End Sub Using Infragistics WPF xamDataGrid, how do you add a child row to a parent row Attached is a sample recorded and playback script of adding a row to an Infragistics xamDataGrid, then adding a child row. With the expected results of a parent row related to the child row. The result of playback is Unable to find the object WPFObject("CellValuePresenter", "", 1). The recording appears to be referencing the XamTextEditor cell of the parent row, and not the child row cell. The object spy browser appears to also reference the same object. Either the CellValuePresenter or the XamTextEditor object is incorrect. Regards Bill Simpson SolvedRe: Setting the current active row on an Infragistics XAMDataGrid Hi Thanks for this solution as it works for the test I was putting together around Infragistics XamDataGrid.. Re: Setting the current active row on an Infragistics XAMDataGrid Hi Colin Thanks for the ideas, on solving this. As you say there are multiple objects and pointers to get to the data or method that you need to find. Setting ActiveRow would work within the XamDataGrid development world, but does not appear assignable from TestComplete. Problem is there are so many fields, properties and methods that just generally need an "Object" that it takes ages to find the ones that you can interact with that fires all the correct events so that the UI and the underlying data objects are in sync This is a WPF app under test the uses MVVM, and there are a large number of nested objects. TestComplete is not that quick in running in debug mode, to get to the breakpoints and examine the locals and watch variables. The solution subsequently suggested by HKosova appears to get me past that problem ListOfMTOsGrid.ClickRowIndicator(row) Setting the current active row on an Infragistics XAMDataGrid I would like to be able to set the current active row on a XamDataGrid. I can find the row by searching for the "Testcomplete Import 1" data value in the datacolumn "Description" on the XamDatGrid called "ListOfMTOsGrid" Set ListOfMTOsGrid = Griddemo.Find("NativeClrObject.Name", "ListOfMTOsGrid", 50) row = ListOfMTOsGrid.FindRow("Description", "Testcomplete Import 1") if row = -1 then Log.Message("Row not found") Runner.Halt end if ' the above commands gets the row index I am looking for. ' the following does not work? CurrentRow = ListOfMTOsGrid.FindId(row) Set ListOfMTOsGrid.ActiveRecord = CurrentRow Regards Bill Simpson Solved