Jump to content

[HELP] remove row


Recommended Posts

Posted (edited)

hello , can someone tell me where the problem

addEventHandler("onClientGUIClick",resourceRoot,function()
            if ( source == removeserial ) then
            selected = guiGridListGetSelectedItem(GridBan)
        if selected ~= -1 then
            guiGridListRemoveRow ( GridBan,selected  )
           data = guiGridListGetItemText(GridBan, selected,1)
            triggerServerEvent("removeserial",localPlayer,data)
            end    
        end
    end)


 

Edited by Talis
Posted

Is it not removing the row? Btw, if you remove the row before getting the data out of it, the data will be different than it is supposed to be.

  • Thanks 1
Posted
addEventHandler("onClientGUIClick",resourceRoot,
function()
	if ( source == removeserial ) then
        selected = guiGridListGetSelectedItem(GridBan)
        if selected ~= -1 then
           	data = guiGridListGetItemText(GridBan, selected,1)
        	triggerServerEvent("removeserial",localPlayer,data)
            guiGridListRemoveRow (GridBan,selected)
		end    
    end
end)

This should do it I think.

  • Thanks 1

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