Jump to content

Get Text from Selected row in Specific Column in GridList


Zuher Laith

Recommended Posts

Hi
As it says in the Title, i have a problem with this ..

I looked up on the Wiki and used guiGridListGetItemData, I read the example provided, didn't make it for what I need .

function BuyDrink ( button )
    if button == "left" then
	local nRow, nColumn = guiGridListGetSelectedItem( GridList ) 
	if nRow ~= -1 and nColumn ~= - 1 then
		
		local row, col = guiGridListGetSelectedItem ( GridList )
		local selected = guiGridListGetItemData ( GridList, row, col ) -- This Gives "nil" output
		outputChatBox ( "You Bought " .. tostring(selected) ) -- Output the Text from selected row of the first Column only

	end
    end
end

Basically I want the Text of my first column selected row, not an int .
I hope I made it clear to understand

Any help is appreciated .

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