how to find the front grid from N numberof grids one behind another in vb.net

hi friends,
my doubt is in vb.net regarding the flexgrid...
its regarding windows application...
i have a form which may contain  N Number of grids one behind another...
but i am not creating the grid dynamically...
that grids may be in the panel.
from that form while execution, i want to know which grid is in front and visible to the user when i click a button or any other control...

expecting the answer from u guys,
friendly...
LVL 1
corpuslabsAsked:
Who is Participating?
 
allallallConnect With a Mentor Commented:
what about adding these grids to an array (call it aoFlexgrid).
Then use this function:

(vb code - i do not know vb.net)
function GetActiveGrid() as flexgrid
for i=0 to ubound(aoFlexgrid)-1
   if aoFlexgrid(i).Visible then
         GetActiveGrid=aoFlexgrid(i)
         Exit Function
   end if
next
end function

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.