Forum  Commercial Foru...  Commercial Foru...  VWG 6.4 User Control as a Drop Target
Previous Previous
 
Next Next
New Post 12/27/2011 4:33 PM
  egirardi
66 posts
No Ranking


Re: VWG 6.4 User Control as a Drop Target 
Modified By egirardi  on 12/27/2011 8:36:04 PM)

 Sent you an email with the sample application i am working on.

Look in the uScheduleDay user control.

Drag a class from the list box on the left onto one of the day's boxes and it will fire the event.  The KeyValuePair kp object is null after the assignment.

 
New Post 12/28/2011 3:17 AM
  palli
11824 posts
1st Level Poster




Re: VWG 6.4 User Control as a Drop Target 

Hi egirardi,

Nice control !

Your problem seems to be caused by multiple declarations of the KeyValuePair class, both within uScheduler and uScheduleDay.

Although those two class declarations are identical and with the same name, they are not the same class type, so if one part of your application is using Type A (from uScheduler) and another part of your application is trying to cast it to Type B (from uScheduleDay), the cast will fail.

I recommend that you make a seperate class file out of the KeyValuePair declaration to minimize the risk of double declaring it in the future. You may also want to consider changing the name of the type, as .NET already has a KeyValuePair type which is easy to confuse with yours, but that's just a matter of preference and there's no need to change the name of your type.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/28/2011 3:41 AM
  egirardi
66 posts
No Ranking


Re: VWG 6.4 User Control as a Drop Target 
Modified By egirardi  on 12/28/2011 8:15:19 AM)

 Palli,

Thanks for the insight.  That was the issue.  Created it as a separate class file and the error went away.

Thanks again for your 2'nd set of eyes (glad it was not an issue with VWG!!! as i have to do alot of drag drop code)

 
New Post 12/28/2011 8:32 AM
  palli
11824 posts
1st Level Poster




Re: VWG 6.4 User Control as a Drop Target 

Hi egirardi,

You are welcome.

Naaaahh, it couldn't be VWG, could it

Glad to be able to help, and thanks for your confirmation.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  VWG 6.4 User Control as a Drop Target
Azure banner
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS