Hey, guys (and girls...)!
I'm in trouble with (like it seems to me) a little bug on Hierarchical FlexGrid control...
Let me explain:
I want to merge some content between cells.
I made it many times before, but in the FlexGrid control, not the Hierarchical Flexgrid conrol - for sure, it's first time I using it.
I've attached 2 PNG files that show what I want (IWANTIT.PNG) and what I have for now (ITLOOKSNOW.PNG).
Before you trying to solve this, I will warning you: the MERGECELLS and MERGECOLS(index) or MERGEROWS(index) doesn't seems to function in any way I tested.
And, before you waste your time reading all the thread (I know, it's long, but I try to detail everything I tried) and conclude that I forgot a simple idiot property, go with some assumptions:
- the MSHFlexGrid (I'll call it only "grid" after this point) is attached to a DataEnvironment object;
- the DataEnv is configured to access a SQL Server database, and have three commands in their;
- the commands are in a parent/child relationship (see attached DATAENVIRONMENT.PNG too see its relationships), all of them with a simple SQL SELECT statement ("SELECT FIELD1, FIELD2 FROM TABLE") and correct related to another;
- the BANDDISPLAY property was set to VERTICAL (and this is the exactly behaviour I want; if I use the default HORIZONTAL, I get the data displayed in an uncompreensive form, the lines get too long);
- other properties of grid are initially untouched (I used the default values for them), but I've tried (unsucessfull) change FILLSTYLE and SELECTIONMODE too.
At this point, I need to clarify: if I work with DISCONNECTED grid (put data via TEXTMATRIX / TEXT properties instead of assigning DATASOURCE), the MERGEROW / MERGECOL properties seems to work as expected, but I loose the "plus" and "minus" signs functionality, wich is an undesirable behaviour. If I use the hierarchical data instead (setting DATASOURCE property), MERGEROW / MERGECOL seems not to work properly.
I'll post some of code I've tested before, and IT'S NOT WORKING:
grdTeste.MergeCells = flexMergeFree
grdTeste.MergeCol(0) = True
grdTeste.MergeCol(1) = True
grdTeste.MergeCol(2) = True
grdTeste.Refresh
The above code doesn't work!!!
Then I tried
grdTeste.MergeCells = flexMergeFree
grdTeste.MergeRow(0) = True
grdTeste.MergeRow(1) = True
grdTeste.MergeRow(2) = True
grdTeste.Refresh
and still not working...
So, then I tried
grdTeste.MergeCells = flexMergeRestrictRows
grdTeste.MergeRow(0) = True
grdTeste.MergeRow(1) = True
grdTeste.MergeRow(2) = True
and
grdTeste.MergeCells = flexMergeRestrictColumns
grdTeste.MergeCol(0) = True
grdTeste.MergeCol(1) = True
grdTeste.MergeCol(2) = True
and many other combinations of MERGECELLS settings and MERGECOL/MERGEROW, but neither of them worked as I expected.
If you had the patience to read until this point, I'll congratulate you...
And if you have any idea what I'm doing wrong, or if what I want is impossible to achieve, please tell me. I tried to Google it so many forms, but nothing appears to be usefull...
Best regards,
Sidnei