Order data items in a list or grid

  • Thread starter Thread starter Eric Eckberg
  • Start date Start date
E

Eric Eckberg

I have been searching for a solution or example and just can't find one.

My application uses lookup tables to populate a combobox. The lookup table
is maintained by the user. For instance, the status of an employee (active,
terminated, medical leave, military leave, etc.). The lookup table contains
three fields: iID (auto numbering primary key); cDescription (the text);
iOrder (the order to display the records in the combobox).

Here's my dilemma: I want to use up/down arrow buttons in the maintenance
form to rearrange the order of the records. I'm currently using
ComponentOne's TrueDBGrid control, but I'm willing to switch to something
else. I like tdbgrid because it allows for doing the data entry right on
the grid.

Does anyone know of an example with source code that contains this
functionality?

I'm truly amazed that there isn't a sample that does this somewhere.

Thanks,
Eric

Eric Eckberg
 
Hi Eric,

I'm not completely following your problem, but have you posted to
news2.componentone.com, ng componentone.public.net.tbdgrid? (I assume you
have the .net version of the grid.) I have it also and used it extensively;
I have gotten great help at that ng.

HTH,

Bernie Yaeger
 
Bernie,

I was posting here first because I'm not stuck with using the ComponentOne
component. If I can find an example that uses any kind of list/dbgrid
control, then I can take it from there.

In my list, all that is displayed to the user is the description field. I'd
like for them to be able to add an item, then use the up arrow to position
it in the list at the desired location. Behind the scenes, the iOrder field
is getting updated to maintain the desired sequence. This is the same order
the items will appear when the user pulls down a combobox in another form.
If I have to go with drag/drop instead, that's fine too.

I'll go ahead and post this in the ComponentOne group specifically for the
tdbgrid component and see what they say too.

Thanks,
Eric
 
Back
Top