TDBAdvGrid "grouping"

I'm wondering if it is possible to obtain with an a TDBAdvGrid the following thing:

as you can see in the "ID Campione" column there is only one value for  the whole group, and at the end of the group there is a black line to divide it from the next one.
the blank row values under the column "ID Campione" have the same value of the first non blank row above them.

Could you help me?

Did you try to set grid.PageMode = false and call grid.Group(columnindex of ID Campione) ?

Hi Bruno,

yes I've tryed but i obtain only that the column id campione become the "header" of the Group and the "tree column" of the Group will be showed.

I would that the column remain in it's original position, and that a black line is showed at the end of the group.

My goal is to remove a twwdbgrid that is present on my project and replace it with a TDBAdvGrid with minimal impact over the users of the software.

Also I've noticed that twwdbgrid have a very easy system to configure and edit column of the grid while the system adopted with TDBAdvGrid is less easy. But this is only a problem for the programmer non for the final user. :)

Then this is not really grouping, i.e. you do not have a collapse-able node.

In TDBAdvGrid, what you could do is use OnGetCellBorder() to force a black border when the value in column ID Campione changes and you could use the OnGetDisplText() event to make the text in column ID Campione blank when it is the same as in the previous row.

Something like:

procedure TForm4.DBAdvGrid1GetDisplText(Sender: TObject; ACol,
  ARow: Integer; var Value: string);
  if (ARow > 1) and  (ACol = GroupCol) then
    if DBAdvGrid1.GridCells[ACol,ARow - 1] = DBAdvGrid1.GridCells[ACol,ARow] then
      Value := '';