Re: Sorting Columns

2015-03-04 Thread ha...@exformedia.se
@lists.runrev.com Sent: Tue, Mar 3, 2015 6:33 am Subject: Sorting Columns I have a data grid and one of the columns has numbers with commas included. If I use the property inspector and select the header column I can choose sort by text or numeric. Due to the commas neither of the sort types gives me

Re: Sorting Columns

2015-03-04 Thread JB
to use LiveCode use-livecode@lists.runrev.com Sent: Tue, Mar 3, 2015 6:33 am Subject: Sorting Columns I have a data grid and one of the columns has numbers with commas included. If I use the property inspector and select the header column I can choose sort by text or numeric. Due

Re: Sorting Columns

2015-03-03 Thread Sri
-revolution.278305.n4.nabble.com/Sorting-Columns-tp4689614p4689631.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe

Re: Sorting Columns

2015-03-03 Thread dunbarx
/Sorting-Columns-tp4689614p4689636.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences

Re: Sorting Columns

2015-03-03 Thread Geoff Canyon
On Tue, Mar 3, 2015 at 8:18 AM, dunb...@aol.com wrote: function goodNumber var repeat for each char tChar in var if var is in 0123456789 then put tChar after temp end repeat return temp end goodNumber It's worth checking, but this might be faster (but less robust): function

Re: Sorting Columns

2015-03-03 Thread JB
Thanks Bob! Any explanation is helpful since I am fairly new to data grids. The commas are thousands delimiters. John Balgenorth On Mar 3, 2015, at 4:13 PM, Bob Sneidar bobsnei...@iotecdigital.com wrote: dgData returns an array. dgText returns delimited text. if the commas are thousand

Re: Sorting Columns

2015-03-03 Thread JB
Thank you, for the info and code. John Balgenorth On Mar 3, 2015, at 2:16 PM, Geoff Canyon gcan...@gmail.com wrote: On Tue, Mar 3, 2015 at 8:18 AM, dunb...@aol.com wrote: function goodNumber var repeat for each char tChar in var if var is in 0123456789 then put tChar after temp end

Re: Sorting Columns

2015-03-03 Thread Bob Sneidar
dgData returns an array. dgText returns delimited text. if the commas are thousand delimiters, then strip them. I’ve often thought of trying to implement a “displayAs functionality for Datagrids, like Excel does, where the value is one thing but the display is another. Your situation really

Re: Sorting Columns

2015-03-03 Thread JB
). 2. Don't forget to set itemDel to tab Regards, Sri. -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Sorting-Columns-tp4689614p4689631.html Sent from the Revolution - User mailing list archive at Nabble.com

Re: Sorting Columns

2015-03-03 Thread dunbarx
if var is in 0123456789 then put tChar after temp end repeat return temp end goodNumber Craig Newman -Original Message- From: JB sund...@pacifier.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Tue, Mar 3, 2015 6:33 am Subject: Sorting Columns I have a data

Sorting Columns

2015-03-03 Thread JB
I have a data grid and one of the columns has numbers with commas included. If I use the property inspector and select the header column I can choose sort by text or numeric. Due to the commas neither of the sort types gives me a correct sort. Do I need to make another array and strip the

Re: Sorting Columns

2015-03-03 Thread JB
to use LiveCode use-livecode@lists.runrev.com Sent: Tue, Mar 3, 2015 6:33 am Subject: Sorting Columns I have a data grid and one of the columns has numbers with commas included. If I use the property inspector and select the header column I can choose sort by text or numeric. Due