Markeloff Posted February 6, 2015 Share Posted February 6, 2015 Hello, I wonder how to sort a gridlist using an edit box? I have a gridlist with two columns, item and amount. I want to show for example item X only in the gridlist when I write X in the edit box it must clear the grid and add back rows with X text as item. Link to comment
Arnold-1 Posted February 6, 2015 Share Posted February 6, 2015 put the things that set the stuff in the gridlist in a function, and execute it onEditboxUpdate with an if statement checking if X is in the editbox Link to comment
Markeloff Posted February 6, 2015 Author Share Posted February 6, 2015 I didn't understand.. Gridlist looks like Item Amount M4 150 Pistol 190 M4 180 Sniper 50 Pistol 150 Sniper 250 For example, I write just 'M' in the edit box and the gridlist should output only Items and its amounts starting with M (M4 for example) Link to comment
Tomas Posted February 6, 2015 Share Posted February 6, 2015 viewtopic.php?f=91&t=42082 Link to comment
Anubhav Posted February 7, 2015 Share Posted February 7, 2015 or: If empty then ( change it so tat is adds items again, loop through the table then add them all again. Remember to clear it. ). Get gridlist's row, and loop ( for i=0, gridlistrow do ) then get the text of column if it's there then keep it else remove it. And for edit change, onClientGUIChanged Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now