Jump to content

guiGridList removing selection


KariiiM

Recommended Posts

Hey guys,

Anyone know which function can i use to remove the selection of an row when i hit another GridList? I am using 2 Tables and adding GridList in each table but when i selecte to buy item from second GridList it buy from the first grid and second one.

Thanks in advance

Link to comment
onClientGUIClick > guiGridListSetSelectedItem(gridlist, 0, 0)?? If not, please explain better.

Well, im scripting a simple shop ,using tables and guiGridLists ,But when i selecte an item in Table 1 then i go to Table 2 to buy something from this table, After clicking on buy button i buy from Table 1 & 2 in same time i mean all selected gridlists, i want if i selected the gridlist or clicked on another table the first selected item be removed.

Link to comment

maybe this?

function clicked () 
local row, col = guiGridListGetSelectedItem (yourgrid) 
if source == yourgrid then 
if guiGridListGetItemText (yourgrid, row, col) == "nameoftherowgrid" then 
guiGridListRemoveRow(yourgrid,nameoftherowgrid) 
end 
end 
end 
addEventHandler("onClientGUIClick", root, clicked) 
  

Edited by Guest
Link to comment
maybe this?
function clicked () 
local row, col = guiGridListGetSelectedItem (yourgrid) 
if source == yourgrid then 
if guiGridListGetItemText (yourgrid, row, col) == "nameoftherowgrid" then 
guiGridListRemoveRow(yourgrid,nameoftherowgrid2) 
end 
end 
end 
addEventHandler("onClientGUIClick", root, clicked) 
  

This function just remove rows not selected rows :P

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...