Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtTreeGridWnd. Cell Selection Collapse All
Subject Author Date
Ivan Surzhenko Apr 22, 2008 - 2:09 AM

I like select some cell of CExtTreeGridWnd from code. I have HTREEITEM of it cell. How I can do it?

Technical Support Apr 23, 2008 - 4:38 AM

The CExtGridWnd::Selection***() methods should be used for working with selections both in CExtGridWnd and CExtTreeGridWnd. Please note that in the CExtGridWnd, its methods use plain row indices while in CExtTreeGridWnd, HTREEITEM row handles are used in the vertical direction. You should use the CExtTreeGridWnd::ItemGetByVisibleRowIndex() and CExtTreeGridWnd::ItemGetVisibleIndexOf() methods for performing conversions. The CExtTreeGridWnd::ItemGetByVisibleRowIndex() method can convert any valid plain row number in the range 0 to CExtGridWnd::RowCountGet()-1 into the corresponding HTREEITEM. The CExtTreeGridWnd::ItemGetVisibleIndexOf() method can return plain row indices of tree rows which do not have collapsed parent rows or otherwise it returns a negative index value.