BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Professional Edition
 HOWTO: Several grid control questions

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Insert Smilie
   
Message:

* HTML is OFF
* Forum Code is ON

 
   

T O P I C    R E V I E W
mgampi Posted - 04/27/2012 : 06:59:44 AM
Hi;

I'm just exploring the grid control and its usage in dialogs.
Currently I'm experiencing some problems I need help for:

How can I entering edit mode when pressing the enter key the first time and move forward to the next editable cell in column wise order (row1/col1->col2->col3->row1/lastcol->row2/col1->col2->...) when pressing the enter key to take over the changed cell value?

How can the above task also be performed using the TAB/SHIFT-TAB key(s)?

How can I get all selected rows at once?

How can I change the header row height when using multiple header rows?

Thanks in advance

Martin
6   L A T E S T    R E P L I E S    (Newest First)
Support Posted - 12/17/2012 : 03:53:25 AM
Hello,

You may try to handle WM_GETDLGCODE message in your dialog. Try DLGC_WANTTAB value. Try DLGC_WANTALLKEYS | DLGC_WANTMESSAGE value.

Sincerely yours,
sjlou1126 Posted - 12/13/2012 : 8:43:44 PM
I've meet the same problem as mgampi.using the CBCGPGridCtrl in CBCGPDialog.
and i found that in dialog, the key press TAB/ENTER. have been captured by the dialog ,not the GridCtrl.
my temporary solution is using PreTranslateMessage to capture TAB/ENTER message, and call my CBCGPGridCtrl divered class.
mgampi Posted - 04/30/2012 : 07:05:06 AM
Hello;

I used the EasyInput sample to achieve TAB/SHIFT-TAB solution, but this won't work when the grid is inside a dialog. Also the ENTER key closed the dialog and does not forward the focus to the next editable item to start editing immediately.
What do I have to change that I can navigate from cell to cell using the TAB and ENTER key also in this case?

TIA

Matin
Support Posted - 04/28/2012 : 04:33:32 AM
Hello,

The implementation of CBCGPGridColumnsInfoEx class does not support variable height of the header rows. It is possible to merge header items to get some rows larger. For instance, you may have a header with 3 lines: the row 1 may use 2/3 of header height and the row 2 may use 1/3 of header height.

Sincerely yours,
mgampi Posted - 04/27/2012 : 1:32:17 PM
quote:
The height of each header row will be calculated proportionally according to the count of header rows.


Does this mean that its not possible to have multiple header rows with different row height for each header row? E.g. a larger row 1 and a smaller row 2.
Support Posted - 04/27/2012 : 09:36:28 AM
Hello,

quote:
How can I entering edit mode when pressing the enter key the first time and move forward to the next editable cell in column wise order (row1/col1->col2->col3->row1/lastcol->row2/col1->col2->...) when pressing the enter key to take over the changed cell value?

How can the above task also be performed using the TAB/SHIFT-TAB key(s)?
This task is implemented in one of our samples. Please see BCGPGridExample, "Easy Input" tab.


quote:
How can I get all selected rows at once?
The selection is stored as a set of continuous ranges. To retrieve the selected ranges you may use the following methods: GetSelectionCount, GetSelection.
To get the particular row you may use GetRow.

To retrieve all selected items at once please use GetSelectedItems.
There is no method to get all selected rows at once.


quote:
How can I change the header row height when using multiple header rows?
To change the header row height please override CBCGPGridCtrl::OnGetHeaderRect. The height of each header row will be calculated proportionally according to the count of header rows.

Sincerely yours,

BCGSoft Forums © Copyright (c) 1998-2013 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000