XLQP Gen1
ElementsNavigation & windows

AddDataTable

Adds a searchable row-and-column data table.

AddDataTable

What it does

Adds a searchable row-and-column data table.

When to use it

Use it for structured records such as players, servers, inventory, logs, or configuration entries.

ElementFunction:AddDataTable(TableConfig)

local PlayerDataTable = GroupPlayers:AddDataTable({
    Name = "Player Data",
    Searchable = true,
    SearchPlaceholder = "Filter players...",
    Height = 230,
    Columns = {
        {Name = "Player", Key = "Player", Width = 1.7},
        {Name = "User ID", Key = "UserId", Width = 1},
        {Name = "Team", Key = "Team", Width = 1.1}
    },
    Rows = {},
    Callback = function(row)
        Library:MakeToast({
            Title = "Player selected",
            Content = tostring(row.Player) .. " · " .. tostring(row.UserId),
            Variant = "Info",
            Icon = "users",
            Time = 2
        })
    end
})

Behavior and return value

Call this method on the compatible section, tab, panel, or element container shown by the signature. Store the returned value when you need to update, read, or destroy the element later.

Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.