Hello,
I’m trying to count the items (rows) in a DataGrid in a desktop app and save the count as a value in my script, but all my attempts haven’t worked. How can I do it? I would be really grateful for any advice.
Hello,
I’m trying to count the items (rows) in a DataGrid in a desktop app and save the count as a value in my script, but all my attempts haven’t worked. How can I do it? I would be really grateful for any advice.
Hi Michaela (or do you prefer Tress?),
Which Library are you using for the desktop app? Also which OS are you using?
Depending on the library it might not be easy/possible.
Also sometimes with desktop apps it’s easier to get a count from a status bar (if one exists) than to get the row count. But it depends on your application.
Dave.
Hi Dave,
I am using the FlaUI library (but I also tried RPA and White Library) on Windows. There is no status bar or other component that shows the count of items in the DataGrid. I tried to create a list of items from the DataGrid and then save the length of this list, but I’m not sure if these steps will work.
(and you can call me Michaela or Trees—it’s completely up to you)
Hi Trees,
Well the good new is FlaUI libraryis the one most likely to be able to give you a row count, it has a keyword Get Grid Rows Count that should help.
It’s been nearly 5 years since I used this Library, and I don’t use Windows much anymore, so hopefully someone else can jump in and help you with any questions If not, I’ll try my best to help.
If you haven’t already, it’s probably a good idea to review the XPath explanation and to install FlaUI Inspect
Dave.