- Documentation
- Client functions
- guiGridListAddRow
Function
guiGridListAddRow
Adds a row. You can pass the texts of the following cells right away as extra arguments.
Syntax
int guiGridListAddRow(gui-gridlist gridList [, mixed ...])Arguments
gridListgui-gridlist- The list.
...mixed, optional- Cell texts.
Returns
Row index (from 0).
Example
local cars = { { 411, "Infernus", 95000 }, { 541, "Bullet", 70000 } }
for _, c in ipairs(cars) do
local row = guiGridListAddRow(list, c[2], "$" .. c[3])
guiGridListSetItemData(list, row, 1, c[1])
end