Hi
How to set a fixed or max col width of this grid ?
thx
Hi
How to set a fixed or max col width of this grid ?
thx
You typically don't as this is based on a HTML table where table size automatically adapts to cell content. If you want to override this default behavior, force a width via CSS that you can set per cell via the event OnGetCellClass.
can you give me a sample please ?
There is not a sample that shows exactly this.
Define a CSS class
colw1 { width: 150px; }
and
procedure TfrmLoginForm.WebTableControl1GetCellClass(Sender: TObject; ACol,
ARow: Integer; AField: TField; AValue: string; var AClassName: string);
begin
if acol = 1 then
AClassName := 'colw1';
end;
good, but the problem is that i must define different cols width every time and i cant create my many class CSS ... i need something to set on the fly ...i hope clear
You seem to rather need the TWebStringGrid functionality that has a grid.ColWidths[colindex] property.
i use webdbtablecontrol
The only solution that exists is the solution via CSS.