Problem with select rows contiguous and disjunct

When I add the property disjunctrowselect to true to the grid then clicking on the fixed cell of each column to select the column no longer selects that column alone but instead it selects the whole grid. If I remove the statement AdvColumnGrid1.MouseActions.disjunctrowselect:=true then I can select the column but I cannot select disjunct rows with Ctrl key. I need to be able to select multiple contiguous rows, disjunct rows with Ctrl key, multiple contiguous cols and multiple contiguous cells. Please help.


procedure TForm1.FormCreate(Sender: TObject);
 var col, row: byte;
 var fnt     : TFont;
begin
 AdvColumnGrid1.RowCount := 20;
 AdvColumnGrid1.ColWidths[0] := 20;
 AdvColumnGrid1.FixedRows := 1;
 AdvColumnGrid1.FixedCols := 1;
 AdvColumnGrid1.Options := AdvColumnGrid1.Options + [goRowSizing, goEditing, goColSizing, goColMoving];
 AdvColumnGrid1.MouseActions.ColSelect:=true; //allow selecting a range of cols by dragging over the fixed cells
 AdvColumnGrid1.MouseActions.RowSelect:=true;
 AdvColumnGrid1.MouseActions.disjunctrowselect:=true; // allow selecting disjunct rows
 AdvColumnGrid1.MouseActions.RangeSelectAndEdit:= true;  //allow continuous selection of cells
 AdvColumnGrid1.ReadOnly[1,10]:= true;  //set cell at col 1 row 10 Read Only

 fnt:= TFont.Create;
 fnt.Name:= 'COURRIER';
 fnt.Size:= 14;
 fnt.Style:= [fsBold];
 fnt.Color:= clBlue;

 for col:=1 to AdvColumnGrid1.ColCount-1 do
  begin
   // fill up the contents of all the cells on the grid
   for row:=1 to AdvColumnGrid1.RowCount-1 do
    begin
     AdvColumnGrid1.AllCells[col,row]:= inttostr(col) + ',' + inttostr(row);
    end; // row loop

    // Set the labels for each column
    AdvColumnGrid1.AllCells[col,0]:= inttostr(col) + ',' + inttostr(0) + ' long label long';
    AdvColumnGrid1.WordWraps[col,0]:=true;
    AdvColumnGrid1.AutoSizeRow(0);          
    AdvColumnGrid1.Alignments[col,0]:=taRightJustify;    
    AdvColumnGrid1.Fonts[col,0]:=fnt;

  end; 

  fnt.free;

 AdvColumnGrid1.SetColumnOrder;

end;

procedure TForm1.AdvColumnGrid1CanEditCell(Sender: TObject; ARow,
  ACol: Integer; var CanEdit: Boolean); //event handler to set col 3, row 3 and row 5 Read Only
begin
 CanEdit:= not (ACol in [3]) and not (ARow in [3,5]);
 If AdvColumnGrid1.ReadOnly[ACol,ARow] then CanEdit := false;
end;

//this procedure is to allow the move of a column by doing Shift-key drag
procedure TForm1.AdvColumnGrid1ColumnMove(Sender: TObject; ACol: Integer;
  var Allow: Boolean);
begin
  Allow := GetKeyState(VK_SHIFT) and $8000 = $8000;
end;

Thanks.
This effect is caused by the 'disjunctrowselect' and is a normal behavior.
When using  ColSelect=true, RowSelect=true, disjunctrowselect=true and RangeSelectAndEdit= true
together this causes conflicts.

I understand there is a conflict with these settings since when I remove the disjunctrowselect=true, the col selection works fine. Are you saying that with TMS, we cannot achieve the capabilities of contiguous row selection + disjunct row selection + contiguous col selection + contiguous cell selection? 

As Nancy already explained, if you set disjunct row selection, that configures the grid to always select entire rows. That means that when you select via column selection one cell in a column, it automatically selects the entire row.

Hi Bruno,

Is there a different way to offer selection of disjunct rows and not setting the property disjunctrowselect:=true? It's a must for our app to offer all capabilities described above. 
Thanks and have a good weekend.

Hi Bruno,

Would you have some time to answer my question please? 
Thanks.

Sorry, disjunct row selection is only enabled with grid.MouseActions.DisjunctRowSelect

Not sure why TMS cannot pertmit disjunct column selection by clicking on column headers/titles, while allowing disjunct rows selection AS_WELL by clicking on a non-header/column title. Should not be that hard to implement. TopGrid has been allowing this for years. 



As already explained, this specific capability is currently not built-in. In the 17 years we offer this grid, it is the first time there is apparently a need for this. We'll consider this when working on a new release.