Jump to content

[HELP] Adding rows in gridlist from table


Recommended Posts

Hello guys, I am trying to add rows with info in a gridlist from a table, but I don't really know how to do it...

local items = { 
    {"Infernus", 2}, 
} 
donItemsList = guiCreateGridList(24, 98, 257, 351, false, mainWindow) 
donBItemName = guiGridListAddColumn(donItemsList, "Item Name", 0.9) 
guiGridListAddRow(donItemsList) 
guiGridListSetItemText(donItemsList, 0, 1, "Item 1", false, false) 

The "2" means that the "Infernus" item will be on the second tab from the gridlist.

Thanks.

Link to comment
  
  
    local items = { 
        {"Infernus", 2}, 
    } 
  
    donItemsList = guiCreateGridList(24, 98, 257, 351, false, mainWindow) 
    donBItemName = guiGridListAddColumn(donItemsList, "Item Name", 0.9) 
  
    for index, value in ipairs (items) do  
        guiGridListAddRow(donItemsList) 
        guiGridListSetItemText(donItemsList, index, value[2], value[1], false, false) 
    end 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...