473,569 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

drap and drop in a datagrid

Does anyone have any good sites or resources dealing with adding drag and
drop functionality to a set of controls on a form? I'd like to try to get
several examples of varied applications of drag and drop being used on
different types of controls.

My current task is this. I have a treeview control and a data grid control.
The data grid has two fields, 'value' and 'name'. I want to be able to drag
nodes from the tree view and drop them into a field on the data grid. Mostly
I know how to do this part. What I need help with is if there is already
text in the field I want the dragged node text to be inserted into the field
text at the point that I drop it. For example: If my data grid field
contains the value;
"This is you brain. Any questions?" and the node text has the value "This
is your brain on C#.". When I drag the node text and drop it between the two
sentences in the data grid I want a final value of "This is you brain. This
is your brain on C#. Any questions?" in the data grid field.

Even if no one can help me with the above problem, I would still appreciate
any help with varied examples of drag and drop functionality. Thanks
Nov 16 '05 #1
1 3723

I always thought this Dino Espisito article was cool. It shows how to
drag and drop columns in an asp.net DataGrid:

Extend the ASP.NET DataGrid with Client-side Behaviors
http://msdn.microsoft.com/msdnmag/is...e/default.aspx
--
Scott
http://www.OdeToCode.com

On Thu, 15 Jul 2004 08:00:08 -0500, "Torre Quinn"
<to********@gam estop.com> wrote:
Does anyone have any good sites or resources dealing with adding drag and
drop functionality to a set of controls on a form? I'd like to try to get
several examples of varied applications of drag and drop being used on
different types of controls.

My current task is this. I have a treeview control and a data grid control.
The data grid has two fields, 'value' and 'name'. I want to be able to drag
nodes from the tree view and drop them into a field on the data grid. Mostly
I know how to do this part. What I need help with is if there is already
text in the field I want the dragged node text to be inserted into the field
text at the point that I drop it. For example: If my data grid field
contains the value;
"This is you brain. Any questions?" and the node text has the value "This
is your brain on C#.". When I drag the node text and drop it between the two
sentences in the data grid I want a final value of "This is you brain. This
is your brain on C#. Any questions?" in the data grid field.

Even if no one can help me with the above problem, I would still appreciate
any help with varied examples of drag and drop functionality. Thanks


Nov 16 '05 #2

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

Similar topics

1
6535
by: Marlene harkcom | last post by:
I've got a datagrid with 5 bound columns in it as well as an edit/update/cancel column. I'm binding this to a dataset. One of the fields is always going to be one of three values. I want the user to be able to hit the edit button and have this particular column become a drop down list where the true value is selected, but they can choose...
5
4945
by: Clyde | last post by:
I am trying to implement the user feedback provided by Windows Explorer when draggng a filename from one place to another. I have the drag and drop action worked out but have had no luck in finding how to capture the piece of the screen into a bitmap to simulate the movement. I know this could be done with the Windows API but can't find any...
2
3357
by: Ken Loomis | last post by:
Hello: I have spent two days on drag and drop now and I'm getting no where. I am trying to drag an item from a listbox and load it into a datagrid (actually a child of the datagrid, but I'll be happy for now to get to the parent.) I can get the selected row of the target, but that is not the same as dropped_on row. I've tried to get the...
2
2391
by: Eric Dan | last post by:
Hi, Even tough I was able to implement what I want in a weird and non efficient way, I would like to get an opinion what is the right way to achieve my task: Scenario: • Display a DataGrid that contains rows from a table from a databse (so far easy). • I would like to add a column to the DataGrid that will be a drop-down list so the...
2
2095
by: Joey Liang via DotNetMonster.com | last post by:
Hi all, I am new in asp.net, i encounter some problems in using drop down list and datagrid. I have manage to bind the data into datagrid but i wanted to bind the data into the datagrid accroding to the selected brand from the drop down list. I do not have any idea how to do it. Does anyone knows how to bind the data in to datagrid accroding...
0
1433
by: kaon | last post by:
Hi, Ive been looking for a way to capture an autopostback event of a dropdownlist in a datagrid control. the scenario is that, ive a datagrid, and there is a dropdownlist column in each of the row with each record (note the drop down dont only show when u edit a row, but it shows always for every row), when i change a value from the dropdown...
2
1365
by: pmclinn | last post by:
Does anyone have some sample code that would show me how to drag and ..doc or exe file to a drop target and then extract the file path on drop?
0
1026
by: shanmuganathan82 | last post by:
i need drag and drop in table . in database get the value display lablel in table place the value using asp.net with c# and java script advance thanks by shanmuganathan
1
1244
by: selvi166 | last post by:
hi, i am using visual studio 2005. while designing the form in asp.net 2.0 the drap and drop of the control is not working as like vb. i know there is two mode which allows drap and drop and another one not that. but i dont know whats the property anddont know how to change that the page looks without dots. i am aligning the textbox by...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.