delphiscrollbarscrollabletmstms-web-core

How do I make a TWebTableControl scrollable in TMS WEB Core?


I have a TWebTableControl component on my form with hundreds of rows in it, but I'm only seeing a couple of the rows and I'm not able to scroll in the table component as there isn't a scrollbar and the mouse wheel doesn't do anything.

This is my DFM code for the TWebTableControl component:

object tblUsers: TWebTableControl
  AlignWithMargins = True
  Left = 19
  Top = 67
  Width = 1374
  Height = 846
  Margins.Left = 5
  Margins.Top = 5
  Margins.Right = 5
  Margins.Bottom = 5
  Align = alClient
  BorderColor = clSilver
  ChildOrder = 1
  ElementHeaderClassName = 'table thead-dark'
  ElementTableClassName = 'table table-hover table-bordered table-striped table-sm'
  ColCount = 4
end

And then I'm dynamically loading almost a thousand rows into it. All the rows are definitely loaded into the table, because I can see them when I "inspect element" on the web page.

Here you can see that my rows are being cut off and it's not scrollable:

Delphi TWebTableControl

How can I make the TWebTableControl scrollable?


The documentation says there is a ScrollVertical boolean property on it, but I don't see this property:

Delphi Object Inspector - ScrollVertical


Solution

  • Okay. This took a while to find, but there is a ScrollVertical boolean property, but you can't find it by searching for it like I did.

    I ended up going through every single property one by one and eventually found it manually.

    It is a sub-property within the Options property:

    Delphi TWebTableControl ScrollVertical Property


    Enabling ScrollVertical from there works. I can now scroll in my table 😁