Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
How to get the recordcount of Child items.
posted

Hi,

I have a XamDataGrid that is divided in to categories.

And each category is then further subdivided into Child and GrandChild items. I am able to get the record count of categories/parent by using XamDataGrid("Grid").RecordCount

Now I need to get the recordcount  for each Child.

This is what I was using for retreiving data in the Child cell:

 Name = WpfWindow("WpfWindow").XamDataGrid("Grid").GetCellData("{0}{0}[1]")

Any help greatly appreciated.

Thanks,
Suseela

 

Parents
  • 7695
    Offline posted

    TestAdvantage for WPF, has the concept of Active data area, which is if there is an active is cell is the data area that the cell is part of, otherwise it is the root level. So to get the record count of a child region you need to first expand the the parent record of the child, then activate a cell in that data area, then Record count will be correct, such as:

    WpfWindow("WpfWindow").XamDataGrid("WPFGrid").ExpandRecord "{0}"
    WpfWindow("WpfWindow").XamDataGrid("WPFGrid").ActivateCell "{0}[0]"
    MSGBOX WpfWindow("WpfWindow").XamDataGrid("WPFGrid").RecordCount

    Hope this helps,

     

     

Reply Children