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

UserControl - Passing drop event to child control

Is there a simple way to pass drag-and-drop events to a child control in a
UserControl?

Here's an example: I have created a UserControl which contains a treeview
and some text boxes. I want to be able to drag-and-drop to the treeview from
outside the UserControl. Now, when I drag over the treeview in the
UserControl, the UserControl gets the drag-and-drop events, but the treeview
doesn't.

Is there a simple way to pass drag-and-drop events to the treview, or do I
need to write the code to do that myself? Thanks.

Dave Veeneman
Foresight Systems
Nov 16 '05 #1
2 7096
Hi Dave,

I've not much experiences with drag-and-drop but i've
one tip:
- set userControl's "AllowDrop" ("AllowDrag") to false.

Regards

Marcin
Is there a simple way to pass drag-and-drop events to a child control in a
UserControl?

Here's an example: I have created a UserControl which contains a treeview
and some text boxes. I want to be able to drag-and-drop to the treeview from
outside the UserControl. Now, when I drag over the treeview in the
UserControl, the UserControl gets the drag-and-drop events, but the treeview
doesn't.

Is there a simple way to pass drag-and-drop events to the treview, or do I
need to write the code to do that myself? Thanks.

Dave Veeneman
Foresight Systems

Nov 16 '05 #2
Thanks! Your suggestion solved the problem.

Here are the steps to pass drag-and-drop events to child controls in a
UserControl:

(1) In the UserControl project, set the AllowDrop property of the
UserControl to false.

(2) In the UserControl project, set the AllowDrop property of the child
control to true.

(3) In the client project, the UserControl's property can be set to true or
false; the child control will accept drops with either setting.

"Marcin Grzebski" <mg*******@taxussi.no.com.spam.pl> wrote in message
news:ch**********@atlantis.news.tpi.pl...
Hi Dave,

I've not much experiences with drag-and-drop but i've
one tip:
- set userControl's "AllowDrop" ("AllowDrag") to false.

Regards

Marcin
Is there a simple way to pass drag-and-drop events to a child control in
a UserControl?

Here's an example: I have created a UserControl which contains a treeview
and some text boxes. I want to be able to drag-and-drop to the treeview
from outside the UserControl. Now, when I drag over the treeview in the
UserControl, the UserControl gets the drag-and-drop events, but the
treeview doesn't.

Is there a simple way to pass drag-and-drop events to the treview, or do
I need to write the code to do that myself? Thanks.

Dave Veeneman
Foresight Systems

Nov 16 '05 #3

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

Similar topics

7
by: Kate | last post by:
Hi: I have a form with a picture box and some command buttons to make certain shapes appear in the picture box. The shapes are drawn on blank UserControls added like this: 'at top of form...
2
by: Curtis Justus | last post by:
Hi, I currently have a control that is on a form and I want to pass that exact instance of the control to another form (a child form that appears on a button click). The control has state,...
4
by: Andy | last post by:
Alright, I am beyond confused here and need some guidance. I need a C# only sample. I have a simple Page and within it i am creating a user control (ascx). The user control contains textboxes,...
4
by: Harry | last post by:
Hello, I have a page with a RadioButtonList and a PlaceHolder control. The RadioButtonList's AutoPostBack attribute is set to TRUE and its SelectedIndexChanged event loads one of three...
9
by: Richard Brown | last post by:
Can anyone give me a good argument one way or another? I have an 'address' set of fields that are used in various situations (a client has an address, a destination has an address, etc). These...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
3
by: COHENMARVIN | last post by:
I have an aspx page that loads a usercontrol. Can that usercontrol load another usercontrol into part of it? Thanks, Marv
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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...

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.