Board index » delphi » Q: Sorting a Databound Grid Or Moving Record's

Q: Sorting a Databound Grid Or Moving Record's

Ok i have a databound grid and i want the user to be able to shift selected
record's up or down ie 1 to 3 or 3 to 1, i've been contemplating on how to
this, is there a better way then having an extra sort field in the database
so when a user move's a record you change the sort value's? i think this
might be time consuming, any other way's?

Thanks

--
Chris Polewczuk
MT/Rush/Ergo 50
http://www.elogik.com

 

Re:Q: Sorting a Databound Grid Or Moving Record's


"Chris" <chris...@videotron.ca> skrev i melding
news:f3QO6.2296$6Y6.605962@weber.videotron.net

Quote
> Ok i have a databound grid and i want the user to be able to shift selected
> record's up or down ie 1 to 3 or 3 to 1, i've been contemplating on how to
> this, is there a better way then having an extra sort field in the database
> so when a user move's a record you change the sort value's? i think this
> might be time consuming, any other way's?

If your displayed dataset relies on actual stored order, and no indexing
whatsoever comes into play, you could try just exchanging the values. I'd
rather suggest a hidden sort field, as non-indexed tables are sometimes
showing odd behaviour when attempting to refresh records from the underlying
table.

--
Bjoerge Saether
Consultant / Developer
http://www.itte.no
Asker, Norway
bjorgeremovet...@itte.no (remove the obvious)

Re:Q: Sorting a Databound Grid Or Moving Record's


the other option might be unbound, it's not just for display it's for
working purposes... ie: a part's grid whereas instead of changing the item's
for oder being to shift items up/down....

Quote
"Bj?rge S?ther" <REMOVE_bsaether@THIS_online.no> wrote in message

news:Dy6P6.448$lM3.7574@news1.oke.nextra.no...
Quote
> "Chris" <chris...@videotron.ca> skrev i melding
> news:f3QO6.2296$6Y6.605962@weber.videotron.net
> > Ok i have a databound grid and i want the user to be able to shift
selected
> > record's up or down ie 1 to 3 or 3 to 1, i've been contemplating on how
to
> > this, is there a better way then having an extra sort field in the
database
> > so when a user move's a record you change the sort value's? i think this
> > might be time consuming, any other way's?

> If your displayed dataset relies on actual stored order, and no indexing
> whatsoever comes into play, you could try just exchanging the values. I'd
> rather suggest a hidden sort field, as non-indexed tables are sometimes
> showing odd behaviour when attempting to refresh records from the
underlying
> table.

> --
> Bjoerge Saether
> Consultant / Developer
> http://www.itte.no
> Asker, Norway
> bjorgeremovet...@itte.no (remove the obvious)

Other Threads