Hello. I have set up a TAdvStringGrid like so:
grdData.FixedCols := 3;
grdData.RowCount := 3;
grdData.InsertRow(1);
grdData.FilterEdit.Row := 1;
grdData.FilterEdit.Enabled := true;
grdData.FilterEdit.CaseSensitive := false;
grdData.FilterDropDownAuto := true;
grdData.FilterDropDownCheck := true;
grdData.FilterDropDownColumns := fdAll; // Allow filtering on FIXED cols
grdData.Options := grdData.Options - [goRowSelect] + [goColSizing, goColMoving];
This is what the grid looks like at runtime with some data in it:
There are some changes to the default behaviour that we would like to achieve:
- The1st column (checkbox) is ReadOnly/disabled. How can I make this column editable? I have a workaround with this code in the OnCellClick event:
if (ACol = COL_CHECKBOX) and (ARow > 1) then
begin
grdData.GetCheckBoxState(COL_CHECKBOX, ARow, blnCheckbox);
grdData.SetCheckBoxState(COL_CHECKBOX, ARow, not blnCheckbox);
end;
but the column still looks disabled and will confuse our users.
-
The fixed columns are not movable which is what we want, however the fixed columns are not resizable. Is this achievable?
-
I am unable to sort or filter on fixed columns. We would like the fixed columns to behave like the others in this regard.
According to the Developer’s Guide, setting FilterDropDownColumns to fdAll should allow the user to filter on a fixed column but it seems to make no difference in my app. -
A "nice to have" would be to have the cell background colour of fixed cells be white like 'normal' cells.
Regards and thanks in advance