473,396 Members | 1,743 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,396 software developers and data experts.

C# DataGridView extensions for drag n drop.

13
I found some code that extends the standard datagrid view to allow rows or columns to be dragged and droped within the grid

the code can be found at :-http://www.danielsoper.com/programming/DataGridViewDragDropRowsColumns.aspx

Has any one else used/had expereience of using this control?

I drop the new grid object onto the form and add the DataSource and and DataMember, all works fine. What I can't seem to do is rename the columns! If I rename Column1 to Name when I come out of the properties it reverts to being called Column1..
I can do it via code
Expand|Select|Wrap|Line Numbers
  1. MyObj.Columns[0].HeaderText = "Name";
When I run my form the object seem to append a number of blank columns to the begining of my data.

Any help would be appreciated
Oct 21 '08 #1
1 4369
Plater
7,872 Expert 4TB
Baed on the source code provided on that site, I would say you are using it verbatim.
I think you will need to modify that code to get what you require. It appears that that was just an example of "how to do it" not actually "what should be done".

For starters, I see in there that the column headertexts are being manually overwritten in some functions.
Oct 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: joey.powell | last post by:
I have a Windows Forms application where I need to be able to drag and then drop onto a datagridview control. I already have the code necessary to make the drag part work. I am having problems,...
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.
2
by: Claes Wedin | last post by:
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...
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,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.