DGS Grid List: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client}} Back To DGS ==Sotring== * DGS Grid List fixed sorting problem <syntaxhighlight lang="lua"> loadstring(exports.dgs:dgsImportFunction())() local gridlist = d...")
 
No edit summary
Line 14: Line 14:
local row = dgsGridListAddRow(gridlist)
local row = dgsGridListAddRow(gridlist)
dgsGridListSetItemText(gridlist,row,1,i)
dgsGridListSetItemText(gridlist,row,1,i)
dgsGridListSetItemText(gridlist,row,2,i-1)
dgsGridListSetItemText(gridlist,row,2,i-1) --No Bugs
end
end
end)
end)
----------------No Bugs
</syntaxhighlight>
</syntaxhighlight>

Revision as of 06:46, 20 July 2018

Template:Client Back To DGS

Sotring

  • DGS Grid List fixed sorting problem
loadstring(exports.dgs:dgsImportFunction())()
local gridlist = dgsCreateGridList(100,100,400,400,false)
dgsGridListAddColumn(gridlist,"test1",0.4)
dgsGridListAddColumn(gridlist,"test2",0.4)

----------------Click the column to enable the built-in sorting.
addCommandHandler("addRow",function()
	for i=1,20 do
		local row = dgsGridListAddRow(gridlist)
		dgsGridListSetItemText(gridlist,row,1,i)
		dgsGridListSetItemText(gridlist,row,2,i-1) --No Bugs
	end
end)