DataTable

TsgcHTMLComponent_DataTable — a higher-level data table that wraps a Grid and Pagination inside a card with a search toolbar, page-size selector, export button and row count, in Delphi, C++ Builder and .NET.

TsgcHTMLComponent_DataTable

Bind a dataset, set a page size and toolbar options, then read the HTML property — the inner Grid and Pagination are exposed if you need finer control.

Component class

TsgcHTMLComponent_DataTable

Renders

Bootstrap 5 card with toolbar, <table> + pagination

Family

Data & Tables

Languages

Delphi, C++ Builder, .NET

Bind a dataset, set the toolbar, render it

Set a Title and toolbar flags, call LoadFromDataSet with a page size, then read HTML. Reach the inner Grid to tune columns.

uses
  sgcHTML_Component_DataTable;

var
  oTable: TsgcHTMLComponent_DataTable;
begin
  oTable := TsgcHTMLComponent_DataTable.Create(nil);
  try
    oTable.Title := 'Customers';
    oTable.ShowSearch := True;
    oTable.ShowExport := True;
    oTable.ShowRowCount := True;
    oTable.SearchPlaceholder := 'Search customers...';

    oTable.Grid.Striped := True;
    oTable.LoadFromDataSet(qryCustomers, 25);

    WebModule.Response := oTable.HTML;   // card + table + pagination
  finally
    oTable.Free;
  end;
end;
// includes: sgcHTML_Component_DataTable.hpp

TsgcHTMLComponent_DataTable *oTable = new TsgcHTMLComponent_DataTable(NULL);
try
{
  oTable->Title = "Customers";
  oTable->ShowSearch = true;
  oTable->ShowExport = true;
  oTable->ShowRowCount = true;
  oTable->SearchPlaceholder = "Search customers...";

  oTable->Grid->Striped = true;
  oTable->LoadFromDataSet(qryCustomers, 25);

  String html = oTable->HTML;   // card + table + pagination
}
__finally
{
  delete oTable;
}
using esegece.sgcWebSockets;

var table = new TsgcHTMLComponent_DataTable();
table.Title = "Customers";
table.ShowSearch = true;
table.ShowExport = true;
table.ShowRowCount = true;
table.SearchPlaceholder = "Search customers...";

table.Grid.Striped = true;
table.LoadFromDataSet(qryCustomers, 25);

string html = table.HTML;   // card + table + pagination

Key properties & methods

The members you reach for most often.

Dataset binding

LoadFromDataSet(aDataSet, aPageSize) fills the inner grid and sets pagination from the record count; DataSource drives a live refresh.

Toolbar

ShowSearch with SearchPlaceholder and SearchAction, ShowExport, ShowPageSize with PageSizes, and a Title heading make up the toolbar.

ShowRowCount prints the visible-rows summary next to the pagination control at the bottom of the card.

Inner Grid

Grid exposes the full TsgcHTMLComponent_Grid — set Striped, Bordered, columns, sort/filter and more directly on it.

Pagination

Pagination exposes the TsgcHTMLComponent_Pagination instance for CurrentPage, PageSize and TotalItems.

Layout

TableID identifies the card and inner table; ToolbarClass overrides the default toolbar row classes.

Keep exploring

All sgcHTML ComponentsBrowse the full feature matrix of 60+ components.
Download Free TrialThe 30-day trial ships the 60.HTML demo projects.
PricingSingle, Team and Site licenses with full source code.

Ready to Get Started?

Download the free trial and start building web UIs in Delphi, C++ Builder and .NET.