User (Old forums)MemberMarch 29, 2006 at 1:08 amPost count: 23064
i am finding a way to know if my current selected row is in parent grid or not.
i have this line of code:
mGrid = s.get_CurrentRow().get_parentgrid().ParentDataRow
which should return null meaning my current row is in the parentgrid. but when i ran the code above, it throws an exception error.
so, i tried to do this:
if isnull(s.get_CurrentRow().get_parentgrid().ParentDataRow) then
the above doesn’t throw an exception error but instead of going to code1 (as the object is null) it goes to my else statement.
any other way to know that my current row is the parent grid?
am using testcomplete to record scripts and the above line of code will help me expand a treeview inside the grid. not sure if am making any sense.. but still, hope anyone can help me..
Imported from legacy forums. Posted by amberrv (had 2808 views)Xceed SupportMemberMarch 29, 2006 at 9:10 amPost count: 5658
Verify that the row has a parent grid but that parent grid has no parents :
if( ( row.ParentGrid != null ) && ( row.ParentGrid.ParentGrid == null ) )
// Row is in root grid.
Imported from legacy forums. Posted by Vince [Xceed] (had 303 views)User (Old forums)MemberMarch 29, 2006 at 6:04 pmPost count: 23064
hi, isn’t that what my code does?
it checks if the current row is the root grid. if returns null then it means it is else goes to my else statement.
i don’t know why but the script above doesn’t recognize that the object is null that’s why i can’t get it to go to the next line of code.
btw, am using vbscript so if ever, please do the scripts using it? ta again!
Imported from legacy forums. Posted by amberrv (had 321 views)User (Old forums)MemberMarch 31, 2006 at 10:45 amPost count: 23064
I’m a little confused about your question, the code mentioned above by Vince should have worked fine to determine if the row is indeed in the “root” grid. Can you send us details about the environment you are using along with the version of your Xceed.Grid.Dll? Please send us the details here :
We will be able to investigate further with more details.
Imported from legacy forums. Posted by Matt (had 3924 views)
- You must be logged in to reply to this topic.