Forum Discussion
1 Reply
- Colin_McCraeCommunity Hero
Whats the problem?
Some of the DB grids (I use TDBGrids in my Delphi application) are actually two part controls. The front end - visible - GUI that you can see, and the back end, DataSource object that contains all the actual info presented in the grid. Not all properties are presented as obviously as you would expect.
eg. (using C# Script) - Grid_Object["DataSource"]["DataSet"]["RecordCount"] - is what I use to get the row count.
They are all sorts of fun to work with! Rows can be present in then DB, but not on the Grid. Same with columns. Column headers are sometimes directly populated, sometimes inherited from the underlying data. You also have to factor in indicator columns which may or may not be present. And then cells can also contain sub-controls such as checkboxes and dropdowns. And which cell is selected is controlled more like a DB pointer than anything else I can think of?
I'm assuming this is a Delphi application? Do you have it compiled with Debug info? If not, there are a whole bunch of properties you won't be able to access. Including, I think, the DataSource property. Which is kind of essential if you want to do anything useful with these grids.
** EDIT **
Are you trying/planning to control this via keyword tests? Having written script to control them, I suspect doing it keyword is going to pretty horrible. They are quite complex controls ....