thughesimsuk Member Licensed User Longtime User Mar 12, 2013 #1 So I have a simple spinner set up which works fine, it loops through a database and shows a list of companies. But each company has a company ref, so need to find out what the company ref is on the click event of the spinner. Here is a sample of my code, Code: Copy CompanyList.Initialize("CompanyList") Loop CompanyList.Add(CursorMenu.GetString("Company.Company")) CompanyList.tag = CursorMenu.GetString("Company.CompanyRef") Loop So people recomended this, CompanyList_ItemClick (Position As Int, Value As Object) Which works apart from I am not interested in the position or the value, I need the tag? But the tag only returns the last tag added(so the last company ref). Is there a way I can retrieve a hidden ref from a spinner?? Thanks in advance, Tom
So I have a simple spinner set up which works fine, it loops through a database and shows a list of companies. But each company has a company ref, so need to find out what the company ref is on the click event of the spinner. Here is a sample of my code, Code: Copy CompanyList.Initialize("CompanyList") Loop CompanyList.Add(CursorMenu.GetString("Company.Company")) CompanyList.tag = CursorMenu.GetString("Company.CompanyRef") Loop So people recomended this, CompanyList_ItemClick (Position As Int, Value As Object) Which works apart from I am not interested in the position or the value, I need the tag? But the tag only returns the last tag added(so the last company ref). Is there a way I can retrieve a hidden ref from a spinner?? Thanks in advance, Tom
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2013 #2 You can use a Map to map between the company name and any other data. Upvote 0