473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Sort datagridview by row drag and drop?

Hi,
We have a DataGridView and the user wants to be able to change the order on
the rows by drag and drop.
The best would be if a thick line showed where the row will be placed when
moving over the grid (like it looks when moving things in the
start-menu...). All examples I've found is with listviews and not
datagridviews...

Anybody done this or found an example..

TIA //Claes.
Apr 23 '07 #1
2 9474
Claes,

I don't think that the DataGridView supports this out of the box. You
could try and code it yourself, but it would involve you performing a great
deal of custom painting on your part.

You are probably better off with a third-party solution in this case.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Claes Wedin" <cl*********@altcom.sewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,
We have a DataGridView and the user wants to be able to change the order
on the rows by drag and drop.
The best would be if a thick line showed where the row will be placed when
moving over the grid (like it looks when moving things in the
start-menu...). All examples I've found is with listviews and not
datagridviews...

Anybody done this or found an example..

TIA //Claes.

Apr 23 '07 #2
Hi,

you will find on this page a datagridview FAQ with an example of what you
want to do.

http://www.windowsforms.net/FAQs/def...D=3&tabindex=3

voila...
Apr 24 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: joey.powell | last post by:
If I click down on a control on a form and then drag and release on a datagridview, how can I tell which cell the release occured over?
1
by: vinaykumar Maladkar | last post by:
Hi all, i want to implement drag and drop on datagridview. I want to drag from a cell to the textbox. how can do this. thank u.
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vS2005 and .net 2.0. for a Windows application. I'm implementing a Drag and Drop between 2 DataGridView controls. It's working fine with just one item being drag and drop. I want...
1
by: dotnetnari | last post by:
hi, how to drag and drop element from datagridview to treeview? \ Thks....
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
-- Hi, I'm using vs2005,. .net 2.0 for windows applicaiton. I'm doing drag and drop of 1 row of data at a time between 2 datagridview controls. I'm using the myDataGridView.DragDrop event to get...
0
by: lorentz | last post by:
Goo day. I'm working on a C# application and on this particular form, I have a datagridview control that is bounded to a datasource on load. I've implement a drag-drop event to the datagridview,...
3
by: Claes Wedin | last post by:
I'm doing a Component class that inherits from DataGridView. One thing that it does is to add a default column in the grid. I put the code for this in the class and when I drag the control to my...
0
by: =?Utf-8?B?VGVycnk=?= | last post by:
Hello All... I need a little help; I have two datagridview controls side by side. I need to allow the user to drag and drop rows with in the same grid, but I also need the second datagridview to...
0
by: Jon86 | last post by:
Hello all, I am new to programming, I have one query,Is it possible to drag and drop child elements from tree view control to datagridview control in dotnet (VS2005).I am using windows application...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.