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 » To show hidden cells and get them selected Collapse All
Subject Author Date
BGC Dev Nov 6, 2008 - 10:31 AM

  I have a dialog of fixed height and width , this dialog has profuis-grid  (simple grid) and when the number of cell in the dialog is more than the widht and height of the dialog sroll bar appears .

Now my requirement is say  a user goes about selecting the columns in the grid and if he comes to the end of the screen where the columns are hidden . I want the scroll bar to scroll forward and show the hidden cell and have it seleted .

Is there any default property that can be set to acheive this


BGC Dev Nov 7, 2008 - 7:20 AM

I was looking for answer more in terms of the feature



I looked at the example and commenting the code in the simple grids Ln no 4248 , Commenting this line has does not allow the cells to move forward in the tab when it comes to the end of the screen.

When i try to use this in my code it does not work , Can you please tell me if there is any pre requisite that i should do to get this thing working in my code.


Technical Support Nov 7, 2008 - 3:18 PM

The __ESIS_STH_PIXEL style makes the grid window using pixel-by-pixel scrolling strategy in horizontal direction like list view common control does. The __ESIS_STV_ITEM style makes the grid window using item-by-item scrolling strategy in horizontal direction like list view common control does. Combination of these styles is the most often used. Most of people used to see table-like controls scrollable pixel-by-pixel horizontally and item-by-item vertically.

If you will not specify any __ESIS_STH_*** style, then the grid control will use the __ESIS_STH_NONE scrolling strategy which means do not use horizontal scrolling at all. If horizontal scrolling is disabled, then the grid control with many columns or with wide columns may have some of columns at right part always invisible and there are no chance to scroll horizontally to the right side and see them.

Please note, the grid control have four sets of styles used with SiwModifyStyle(), SiwModifyStyleEx(), BseModifyStyle() and BseModifyStyleEx() methods. The Siw***() abbreviation means Scroll Item Window and these methods are provided by the CExtScrollItemWnd class for defining basic scrollable features of the grid control. The grid control also uses these styles for defining selection model, column/row resizing options and other options. The Bse***() abbreviation means Behavior Sorting Editing. Most of the styles can change behavior of the grid window. So, you should know what you need from the grid control before add any of new styles or comment any of already applied.

Technical Support Nov 7, 2008 - 5:13 AM

The CExtGridBaseWnd::EnsureVisibleColumn and CExtGridBaseWnd::EnsureVisibleRow methods allow you to scroll a grid to make visible appropriate row/column. If you want to make a range of columns visible, you should invoke CExtGridBaseWnd::EnsureVisibleColumn twice: the first time for leftmost desired visible column number and the second time for the right most one. You can invoke this method for the right column the first time and for the left column the second time. If there is not enough space for making the entire desired column range visible, you should choose which invocation should be the last one: for the left column or for the right column. The same is true for the CExtGridBaseWnd::EnsureVisibleRow method and row ranges to make visible. Both methods scroll the grid control and change scroll bar parameters. Both methods change nether the focused cell location nor selected cell ranges in the grid control.

Please note, the CExtGridBaseWnd::FocusSet() method also scrolls the grid window for making new a focused grid cell visible depending on its parameters. This method can also affect the current selection in the grid control. The CExtGridBaseWnd::Selection***() methods do not scroll the grid window. They only modify selected cell range(s). So, you should use combination of these method invocations where the CExtGridBaseWnd::FocusSet method is the last invoked.