Jump to content


Photo

Re-sort the last sorted column


  • Please log in to reply
7 replies to this topic

#1 Morten Johansen

Morten Johansen
  • Members
  • 22 posts

Posted 19 April 2008 - 01:54 PM

Hi Berg.

I have a Listview and a NextGrid on my form. The Listview is used for customers, and the NextGrid is used for items. When the user selects a customer, it clears the NextGrid and adds the items for the selected customer. Now, if the user has sorted the NextGrid in a special way, it doesn't automaticly re-sort the items I add.

Ex. If the user choose to sort the NextGrid by the first column, it sorts fine. But when the user chooses another customer from the Listview, my program clears the NextGrid and adds the new items. Now the list in the NextGrid isn't sorted by the first column, but the first column looks like it is.

My question is:
Is there a procedure to re-sort list by the last used sorting column?


In advance, thanks.

From
Morten Johansen
Denmark

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 19 April 2008 - 06:03 PM

Hello Morten,

Maybe calling NextGrid1.Resort may help?

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Morten Johansen

Morten Johansen
  • Members
  • 22 posts

Posted 19 April 2008 - 06:07 PM

QUOTE (Boki (Berg) @ Apr 19 2008, 07:03 PM) <{POST_SNAPBACK}>
Hello Morten,

Maybe calling NextGrid1.Resort may help?

Best regards


I found that an hour after I wrote this post. But thanks anyway ;)

Well I found this:

if NextGrid1.SortedColumn <> nil then
NextGrid1.SortedColumn.Resort;

But would NextGrid1.Resort be better? and wouldn't it need a "if" stement?

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 19 April 2008 - 06:09 PM

Hello Morten,

NextGrid.Resort first check which column is sorted and then sort column again smile.gif

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Morten Johansen

Morten Johansen
  • Members
  • 22 posts

Posted 19 April 2008 - 06:14 PM

QUOTE (Boki (Berg) @ Apr 19 2008, 07:09 PM) <{POST_SNAPBACK}>
Hello Morten,

NextGrid.Resort first check which column is sorted and then sort column again smile.gif

Best regards


Okay. Thanks.

Btw, I use version 4.0.1, so I was wondering. If I upgrade to the latest version, do I then need to re-write some of my code? and would I miss some features? And if I run the setup downloaded from your website, does it then automaticly upgrade?
And what about the Editors (like NxNumberEdit)? Does it upgrade them too?

For the record, I use the freeware edition ;) Great work, by the way biggrin.gif

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 19 April 2008 - 06:16 PM

Hello,

I hope that you will have no any compatibility problems, but you will need to uninstall old version first and then install new one.

Next Editors will be updated too.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 Morten Johansen

Morten Johansen
  • Members
  • 22 posts

Posted 19 April 2008 - 06:18 PM

QUOTE (Boki (Berg) @ Apr 19 2008, 07:16 PM) <{POST_SNAPBACK}>
Hello,

I hope that you will have no any compatibility problems, but you will need to uninstall old version first and then install new one.

Next Editors will be updated too.

Best regards


So I just uninstall the old version and then install the new?

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 19 April 2008 - 06:57 PM

Hello Morten,

I think that this will be all needed.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users