flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From modjkl...@comcast.net
Subject Re: programmatic sort for Spark datagrid, accounting for sort triangle state
Date Thu, 02 May 2013 18:54:16 GMT
Thanks Mark, I'm already doing that. 


In my case, when I click on a column in a spark datagrid that does NOT sort, I observe: 


GridSortEvent.SORT_CHANGE does not fire 
GridSortEvent.SORT_CHANGING does not fire 
GridEvent.GRID_CLICK does fire 


and for those columns that sort fine, I observe all these events fire. 



----- Original Message -----
From: "Kessler CTR Mark J" <mark.kessler.ctr@usmc.mil> 
To: users@flex.apache.org 
Sent: Thursday, May 2, 2013 11:18:59 AM 
Subject: RE: programmatic sort for Spark datagrid, accounting for sort triangle state 

If your update your dataProvider... try a refresh to force the changes to show in the datagrid.


myArrayListCollection (changed data, or add filter, or add sort). 

Maybe like a 

myArrayListCollection.getItemAt(0).MyField = "New Value"; 
myArrayListCollection.refresh(); 


-Mark 


-----Original Message----- 
From: modjklist@comcast.net [mailto:modjklist@comcast.net] 
Sent: Thursday, May 02, 2013 2:12 PM 
To: users@flex.apache.org 
Subject: Re: programmatic sort for Spark datagrid, accounting for sort triangle state 

Thanks Mark, maybe I am seeing this bug. What I see in my app is that as I update the dataprovider
for the datagrid, there's usually one column that does not sort when clicked on it. It doesn't
relate to frequency of clicking, or the "3rd" click though. 

----- Original Message ----- 
From: "Kessler CTR Mark J" <mark.kessler.ctr@usmc.mil> 
To: users@flex.apache.org 
Sent: Thursday, May 2, 2013 11:01:32 AM 
Subject: RE: programmatic sort for Spark datagrid, accounting for sort triangle state 

The gist of it was something like every 3rd header click within a certain duration of time...
it wouldn’t update the sort display. It literally wouldn't react to it. I have a backup
from a few months ago where I recreated the bug by accident. 

If there is enough interest, I could create test code to demonstrate the click bug. But it
would take me a few hours to extract it from our test environment backups and scrub proprietary
code away from it. 

-Mark 

-----Original Message----- 
From: modjklist@comcast.net [mailto:modjklist@comcast.net] 
Sent: Thursday, May 02, 2013 1:05 PM 
To: users@flex.apache.org 
Subject: Re: programmatic sort for Spark datagrid, accounting for sort triangle state 

Hi Mark, can you include a link to the "click bug" or describe what it is? 

----- Original Message ----- 
From: "Kessler CTR Mark J" <mark.kessler.ctr@usmc.mil> 
To: users@flex.apache.org 
Sent: Thursday, May 2, 2013 9:57:08 AM 
Subject: RE: programmatic sort for Spark datagrid, accounting for sort triangle state 

I've gone down the road of the sort arrows many times. Manipulating the datagrid.columnHeaderGroup.visibleSortIndicatorIndices
never seemed to work for me. It really is inconsistent and the columns themselves have a to
change with the sortDescending to get the direction. Then there is that click bug that makes
some of the sort arrows not update properly. 

For an application developer it may be easier to create a modified GridColumn that includes
a new custom sort property. Then modify the skin to check for that property and the sortDescending
to get the direction. Just use preventDefault to disable the internal sort arrows 


-Mark 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message