DgsGridListSetRowAsSection

From Multi Theft Auto: Wiki

This function sets whether the row is section.

Syntax

string dgsGridListSetRowAsSection( element gridlist, int row [, bool enable = false, bool enbaleClickAndSelect = false ] )

Required Arguments

  • gridlist: The dgs grid list you want to set.
  • row: The row index of the grid list.

Optional Arguments

  • enable: Whether the section mode enabled or not.
  • enableClickAndSelect: Whether enable click and select.

Returns

Returns true if succeed, false otherwise

Example

DGS = exports.dgs
local playerList = DGS:dgsCreateGridList (346, 163, 433, 403, false )  --Create the grid list element
local column = DGS:dgsGridListAddColumn( playerList, "Player", 0.5 )  --Create a players column in the list
local row = DGS:dgsGridListAddRow ( playerList )
DGS:dgsGridListSetItemText ( playerList, row, column, "Player Name" )
DGS:dgsGridListSetRowAsSection ( playerList, row, true )

for id, player in ipairs(getElementsByType("player")) do
	local row = DGS:dgsGridListAddRow ( playerList )
	DGS:dgsGridListSetItemText ( playerList, row, column, getPlayerName ( player ) )
end 

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D