Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disable datasource load in designer?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
jmaeding



Joined: 11 Apr 2008
Posts: 67

PostPosted: Tue Feb 27, 2018 2:41 am    Post subject: Disable datasource load in designer? Reply with quote

I have a case where the control is causing problems because the datasource object references assemblies not available at design time. This involves autocad and you always tell it to NOT copy local for its assemblies.
I'm doing proggramatic binding.
If I have the GetChildrenForRow return null, the control behaves.
If I use real code, it won't show and I get a designer error screen.

Its not a real problem, everything compiles and runs perfect, just a design time error. Can I somehow turn off the way it tries to run a bit when the designer shows it?
thanks
_________________
James M
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Feb 27, 2018 9:55 pm    Post subject: Reply with quote

The normal approach to this sort of problem is to have your event handler code check to see whether it is running in design mode or not and if it is running in design mode then you can return null. There are a variety of different ways to determine whether you are in design mode - it depends on you application. A simple way is to have some global property (eg InDesignMode) that your application sets to false when it is actually running - but defaults to true otherwise.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group