Forum Discussion
It looks like you are assigning a row object to "CurrentRow".
Then you are trying to use that stored object to set the "ActiveRecord" property of "ListOfMTOsGrid".
I'm not familiar with this particular type of grid, but it strikes me that the "ActiveRecord" is likely to be an integer rather than an object? As I say, just a guess.
Also, DataGrid type object often have an underlying DataSet or RecordSet object with a lot of pointers in there and the front facing GUI (the grid object you see) is only a facing. The actual current row/column pointers are stored and controlled by the DataSet/RecordSet object in the backgound. You have to interact with this in order to trigger changes in the front faving Grid object.
Also, when the user clicks a row, it may well be setting off event triggers which won't happen if you try and assign the current row directly.
Certainly, this is my experience with Delphi DataGrids. Not sure about your one, but you might want to have a dig around it's properties and if you find anything like DataLink, DataSet, RecordSet or something like that, then you have an underlying data layer you may need to consider.
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)
Related Content
Recent Discussions
- 4 days ago
- 4 days ago