TWebGridPanel

Hello,


i'm having issues with the TWebGridPanel.
I can add columns, rows, etc. and controls to these.
The problem is, i can not manipulate the position of said controls inside the grid. 
When adding controls, it just starts filling them from the top left. 
In the ControlCollection, the TControlCollectionItem gets added when adding a Control. Each Item has column and row property, changing those does not have any apparent effect.

Am I missing something here?

This is modeled after the VCL TGridPanel, i.e. behavior wrt design-time filling of the control is identical. When adding controls, these add from left to right, top to bottom.

Not sure what exact behavior you want different?

allright, so that was my misconception.

the column and row property made it look like you could determine the controls position in the grid, which would honestly be very handy in my opinion.

Thanks for your answer.

I need to dinamically add controls to my web core form, the controls are FNC (TTMSFNCWidgetDistributionIndicator and TTMSFNCChart mainly) and I can find a way to position/align it correctly, in the form there is a TWebResponsivegrid I already use for some text... 


I tried with a webgridpanel and it works (but not responsive) with design time FNC controls but I don't know how to correctly add the controls dinamically to the webgridpanel (better a responsivegrid). 
Could you help? 

I'm aligned to all latest versions.... another problem is my ide (Tokyo 10.2) doesn't not complete when I'm writing 

This sample code snippet shows how you can dynamically insert controls in a TWebGridPanel:


var
  i: integer;
  edt: TWebEdit;
begin
  WebGridPanel1.BeginUpdate;
  for i := 0 to 9 do
  begin
    edt := TWebEdit.Create(Self);
    WebGridPanel1.AddControl(edt);
  end;
  WebGridPanel1.EndUpdate;
end;
1 Like

Thanks... aahhh  I was dealing with ControlCollectionItem.Add....  


tctrlitem := WebGridPanel1.ControlCollection.Add;
tctrlitem.Control := TTMSFNCWidgetDistributionIndicator.Create(self);

and it doesn't work... 

any option to have it in a responsivegrid instead?

grazie

It is identical


var
  i: integer;
  edt: TWebEdit;
begin
  WebResponsiveGridPanel1.BeginUpdate;
  for i := 0 to 9 do
  begin
    edt := TWebEdit.Create(Self);
    WebResponsiveGridPanel1.AddControl(edt);
  end;
  WebResponsiveGridPanel1.EndUpdate;
end;

came across another issue with the WebGridPanel in combination with the Kanbanboard from the FNC Components.


Adding a Kanbanboard to a WebGridPanel works fine, but as soon as the Align property gets set to top or client for example, it gets shown as seen here: https://imgur.com/a/Xb0Ndch 
It works better with the AlignLeft, shown in the 2nd picture.

workaround: adding a TWebPanel to the TWebGridPanel works.

so its -> Kanbanboard on a TWebPanel on a TWebGridPanel

That is strange. We will investigate.