Forum Discussion
Thanks Colin_McCrae and baxatob for your replies and your interests,
The solution I am trying to test is not developped by our company, so like you I have no idea what classname they use or what Magics xpa is based on, accoding to what I've seen in object properties I guess it is a custom grid because every time I scroll down to the end list the grid looks for more older data and fill the grid so it an infinite scrolling and I think that make magics xpa grid a custom component.
the properties that I get gives me the columns count and the rows count(using the property virtualItemCount), but what I think is that methods like wValue or ClickCell used some Row count in their implemtation so without having the property wRowCount those methods cannot work.
I think as a solution I can hard code row count value suing vertualItemCount's value, To do this i wrote ;
Grid.wRowCount = Grid.VirtualItemsCount;
and i think that i do it wrangly because it gives me error, baxatob please can you help me to do it right
No-no-no!
Just use VirtualItemsCount property instead of wRowCount
- Colin_McCrae10 years agoCommunity Hero
That will check a single row (using the single loop in your original snippet).
It you want all cells, you'll need a nested loop.
(Pseudocode)
Loop Rows (Using item count)
Loop Columns (Using column count)
Get Cell/Item Value(Row, Column)
End Columns Loop
End Rows Loop
- yassine10 years agoOccasional Contributor
Please baxatob can you give me a short script to well inderstand what i sould do and thanks in advance
- baxatob10 years agoCommunity Hero
Try this one:
function Main () { var Grid, Row, Col; Grid = Aliases.yassineTableControlAlias; for (Row=0; Row < Grid.VirtualItemsCount; Row++) for (Col=0; Col < Grid.wColumnCount; Col++) Log.Message (Grid.wValue(Row, Col).ToString().OleValue) } - yassine10 years agoOccasional Contributor
The problem with that snippet as I think is that the wValue or ClickCell method is based somehow with the rowCount property,
- baxatob10 years agoCommunity Hero
Please click on Call Stack tab of your log, then double click on the first row and make a screenshot of the source code.