View Full Version : DataGridColumn Save Sorting question
dragonslayer300814
07-11-2008, 08:55 PM
Hello everyone, I has a question. Ok, so I have a DataGrid, but it's dataprovider is updated say every 15 seconds automatically. Now, when a user selects to sort a column in ascending order it works fine, unitil, the dataprovider get's updated, then the user will have to click the header again to make it sort correctly. Very annoying! I cannot for the life of me figure out what to do. I'm not a new user to actionScript, but I'm definitely no expert. If anyone has any ideas that would be great! Thanks.:eek:
dragonslayer300814
07-23-2008, 07:48 PM
Well I fixed it. It only took me like 5 days, but I fixed it. lol I'm not going to put the soln. up here, b/c it's too long. If you would like to know how, then you can message me, and I will tell you the details. But I had to save how the grids were sorted in an array whenever the header was released, but I saved the grid state right before it was updated(which is every 15 seconds or when the user clicks on the grid) then I update the data, then call a header_release event to resort the new data, and then set the data properties. This is what I've noticed about actionScript. If you want something simple, you are going to spend a lot of time coding it yourself b/c it usually doesn't provide functions to do that. But if you want something more complex, it's usually done for you. So I guess give/take. lol;)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.