Hi,
Can any body please provide solution for the below Issue:
We have to retreive the summary value from the nested sub-sub grid.
Below code snippet used to get the summary field value for the parent grid (Single grid).
MsgBox("Summary Value: " + objUltra.GetNAProperty("Rows.SummaryValues[0].Value").ToString())
So how to get the summary value from the Nested sub-sub Grids. Please provide sample code snippet for the same.
Kindly let us know, If you need any more information.
Thanks & Regards,
Vijay Jadi.
Hello Ammar,
Thank you very much. Its working fine now.
As we are busy with regressions i didn't get the chance to test this. Now i tested this and its working fine as expected.
I will be in touch with you if we need any further assistance. Thanks once again.
Hi Vijay,
I'm not sure why my previous suggestion didn't work even though the rows structure seems to match my expectation. The only reason might be due to filtering applied to the grid or hidden rows. Anyway I thought about another way to do this and that is to use the active row of the grid, here is how you can do it:
- Record clicking on the row selector of the first row in the collection where the summary value you want is defined (From your screenshot that will be the row where "Cause of Loss = Acquisition"
- once that row is active you can get the summary value by:
AMS_Globalvariables.strresult = AMS_Globalvariables.objUltra.GetNAProperty("ActiveRow.ParentCollection.SummaryValues[0].Value").ToString()
This should work out fine
Regards,
Ammar
I have tried with the below code you have provided, however it throws an exception with message "Rows property not found".
AMS_Globalvariables.strresult = AMS_Globalvariables.objUltra.GetNAProperty("Rows[0].Rows[0].Rows.SummaryValues[0].Value").ToString()
Please find the attached detailed screen shots for both log test result and Nested Grids.
Kindly let me know, if you any more information.
Vijay.
according to the screenshot, the the summary is located on the rows collection of the first child of the first root child (Rows[0].Rows[0].Rows) (assuming the there is no rows before the one in the screenshot)
when you specified Rows[2] this means the second root row. which I think its eithercdoes not exist or does not have summaries. So try this to get the summary you highlighted in the screenshot:
Let me know how it goes
Thanks for the reply.
I have tried with the code snippet you have provided using different index to retreive the summary value.
Below the code i have used to get the summary value from the third child grid shown in the attached screen shot "Summary-Value-Screen-shot.docx" for your reference. How ever it trows an execpetion with the message "Index was outside the bounds of array".
AMS_Globalvariables.strresult = AMS_Globalvariables.objUltra.GetNAProperty("Rows[2].Rows.SummaryValues[0].Value").ToString()
Please let me know, if you need any more information.