Hello!
I'm trying to create a TwebDbGrid thati is 100% width and has 2 columns, one 60% of the grid and the second 40%.
I tried to use the ElementClassName ".container" for the grid and ".col-9" and ".col-6" for the columns, but that's not working. Tried also with and without dots, seemingly no difference.
How do I set the width of the grid to be always 100% and the columns?
At this moment, columns in TWebDBGrid have an absolute width (in pixels). A % setting is at this moment unfortunately not supported.
Ok, thank you.
I will try to do it via.Width of the columns. I tought that bootstrap would do the job :)
Is there a way to get the form width during the creation or showing up?
from.ClientWidth during form's OnShow should do it.
For documentation purposes, here's what it worked for me:
procedure TfrmLokacija.WebFormShow(Sender: TObject);
begin
gridView.ColWidths[0] := Round(gridView.Width * 0.6);
gridView.ColWidths[1] := Round(gridView.Width * 0.4);
end;
Thank you again for helping! :)