For the convenience of the user, I'm trying to insert into the Grid
CalendarEdit
.
While thinking about 2 options:
Make it so that all lines would have
CalendarEdit
.
Problem : I create a column of the required format :TDateColumn = class(TColumn) protected function CreateCellControl: TStyledControl; override; end; function TDateColumn.CreateCellControl: TStyledControl; begin Result := TDateCell.Create(grid); Result.Parent := grid; end;
I add it to the
Grid
:procedure TForm1.FormCreate(Sender: TObject); var cec: TDateColumn; begin cec:=TDateColumn.Create(grid1); grid1.AddObject(cec); end;
everything shows ok. But when linked with
liveBindings
:LinkGridToDataSource1.Columns.Items[LinkGridToDataSource1.Columns.Count-1].MemberName:='date';`
the component disappears, and a plain text string appears. I found out that during
liveBindings
in TLinkGridToDataSourceColumns the type of the column is once again indicated and there it stands as Default, I donβt understand how to add / create the type of column I need.To do so, when clicking on a cell on top of it, the control was drawn, and when clicked, it would disappear to another location and the value would fall into the
Grid
.
Problem : I did not find how to determine the coordinates and dimensions of a specific cell to draw on top of it.