Hi,
I'm working with the MSSQL 2000 and C#.
When I load my data from the database table in a DataSet I use the query to
order all records by some column. Then I can work with these records, show
them, edit, correct, insert, etc. It's done and works fine.
The problem is to change the order of these records using a simple
renumbering of this ORDER_BY column directly in a dataset. It's only one
column that I should use for this reordering and I always know which one I
need to use.
The first idea was to use a Drag-n-Drop feature and just to use a mouse to
capture and to move a required record from place to place. But physically
the records consist of many fields and it's a problem to show them correctly
in one string. So, I can't decide what component could I use for this
drag-n-drop operation? DropDownList or what?
Maybe somebody has a better idea how can we reorder the records directly in
a DataSet changing the int values in one selected column?
Thanks,
Dmitri 5 5151
Dmitri Shvetsov wrote: When I load my data from the database table in a DataSet I use the query to order all records by some column.
You can speed up the process considerably setting the Sort property of
your DataTables' DefaultView property. No server-side trip necessary.
The problem is to change the order of these records using a simple renumbering of this ORDER_BY column directly in a dataset. It's only one column that I should use for this reordering and I always know which one I need to use.
Unless you want to actually change the record, this is a display issue
and not a data issue. Tackle it however you see best.
--
There are 10 kinds of people. Those who understand binary and those who
don't. http://code.acadx.com
(Pull the pin to reply)
Hi Frank,
Where should I do that? In a datagrid? I don't use any datagrid here, there
are many relations and I need to show a more "user-friendly" interface.
Dmitri
"Frank Oquendo" <fr****@acadxpin.com> When I load my data from the database table in a DataSet I use the query to order all records by some column.
You can speed up the process considerably setting the Sort property of your DataTables' DefaultView property. No server-side trip necessary.
Dmitri Shvetsov wrote: Where should I do that? In a datagrid?
No. Your DataSet has a collection of DataTables. Each of these
DataTables has a DefaultView property which is actually a DataView
object. These are very handy for sorting and filtering DataTables.
--
There are 10 kinds of people. Those who understand binary and those who
don't. http://code.acadx.com
(Pull the pin to reply)
Frank,
I think that you're right, but I can substitute the values in the required
column very easy. The question is how to organize an interface for a user to
manage this sorting easier. Like Drag an item, move to a required position
and then fix there. I even can't imaging myself where is better to do that?
In a ListView? Each record has many fields. I can show only few as a string,
but then I need to D-n-D them using a mouse. That's a problem.
Dmitri This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: t53864 |
last post by:
I need to reorder the primary key of a table. Say,
Primary Key (field1, field2)
changed to:
Primary Key (field2, field1)
Would like to know if this creates any problem to the
database?
|
by: Scott Kay |
last post by:
Hi,
When I use the AllowColumnReorder in the ListView Control, this allows the
user to reorder
columns by dragging them around. Any items added to the control after the
user has reordered them...
|
by: Shapper |
last post by:
Hello,
I have a dataset where one of the fields is .
Is it possible to reorder the dataset ascending or descending according
to field.
Thanks,
Miguel
|
by: Mat |
last post by:
Reordering Column changes column Indexes????
i use column.index to access(or add ) data in listview. i want to allow user
to reorder columns as they need. So i am afraid to get wrong data when user...
|
by: uv507 |
last post by:
Hello,
I have found a way to easily reorder rows of my listview. But it only
works in small icons mode. When I do my reordering (drag and drop in my
own list) in large icons mode, the item that...
|
by: Asaf |
last post by:
Hi,
Below is a calss with function I gathered from a news group that uses
GetCharacterPlacement API to reorder text.
I have mixed text Hebrew/English and the function reorders the Hebrew text.
...
|
by: daju |
last post by:
hello
My question is, after we allow the column reorder can we modify the order of columns through our code.
What I need to do is reorder the listview columns so the first column with the...
|
by: rdraider |
last post by:
Use the Northwind database Products table as an example.
Purchasing dept gets a report showing when inventory items on hand qty are
below the reorder level.
easy enough:
Select ProductID,...
|
by: done4who |
last post by:
Heres my problem: my javacript code reads each child element e.g.:
<video>
<author>skateboard2</author><id>xqWBGvbvw7g</id><title>zach skating</title><length_seconds>100</length_seconds></video>...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |