## SORT msflexgrid with decimal and negative and positive number

sal21
PlatinumLounger
Posts: 4440
Joined: 26 Apr 2010, 17:36

### SORT msflexgrid with decimal and negative and positive number

i just have in ciolumn 1 this:

0,45
0,7
-0,47
-11,80
0,5
ecc...

how to sort the value?
Tks

HansV
Posts: 78991
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

### Re: SORT msflexgrid with decimal and negative and positive number

I assume that you populate the flexgrid from a recordset. Can't you sort the recordset?
Best wishes,
Hans

sal21
PlatinumLounger
Posts: 4440
Joined: 26 Apr 2010, 17:36

### Re: SORT msflexgrid with decimal and negative and positive number

HansV wrote:
29 May 2024, 20:01
I assume that you populate the flexgrid from a recordset. Can't you sort the recordset?
Sorry...

I need to sort the

HansV
Posts: 78991
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

### Re: SORT msflexgrid with decimal and negative and positive number

Best wishes,
Hans

sal21
PlatinumLounger
Posts: 4440
Joined: 26 Apr 2010, 17:36

### Re: SORT msflexgrid with decimal and negative and positive number

HansV wrote:
29 May 2024, 21:25
No Pro.
If i resolve post the solution here.
As usuale.

SpeakEasy
5StarLounger
Posts: 600
Joined: 27 Jun 2021, 10:46

### Re: SORT msflexgrid with decimal and negative and positive number

Code: Select all

``````Private Sub MSFlexGrid1_Click()
If MSFlexGrid1.Row = 1 Then MSFlexGrid1.Sort = flexSortGenericAscending
End Sub``````

sal21
PlatinumLounger
Posts: 4440
Joined: 26 Apr 2010, 17:36

### Re: SORT msflexgrid with decimal and negative and positive number

SpeakEasy wrote:
30 May 2024, 11:08

Code: Select all

``````Private Sub MSFlexGrid1_Click()
If MSFlexGrid1.Row = 1 Then MSFlexGrid1.Sort = flexSortGenericAscending
End Sub``````
I Test, now and work!
tks bro