all groups > sql server dts > january 2006 >
You're in the

sql server dts

group:

How to make CustomProperlty Hidden or ReadOnly


How to make CustomProperlty Hidden or ReadOnly Alex
1/31/2006 9:56:27 AM
sql server dts: I am developing a custom source component, which will have a custom GUI as
well.
Users will be providing connection information via a GUI interface which in
turn will save the data into Custom Properties of the component.
What I would like to do and was not able to figure out a way how, is to make
the CustomProperty hidden or read-only in the Properties section of the BI
Studio. In this way I only need to validate input data as it is being entered
through the GUI, otherwise I need to validate in GUI and when Custom
Properties are edited at design time through property editor.
Thanks in advance
Re: How to make CustomProperlty Hidden or ReadOnly Alex
2/1/2006 10:07:27 PM
Hi Daren,
I am writing a data source component that will import data from Active
Directory and store its content in a SQL table.
When getting data from AD there are a lot parameters that one needs to
provide:
1. Connection account info
2. Domain partitions to query
3. Attributes to load
3. Filters
4. Classes to load
5. OU exclusion list
So on and so forth

As you can imagine there is quite a bit of validation. As a matter of fact
the bulk of the code is around getting the data from the user and validating
it.
The way I would like a user to interact with the component is via GUI, since
there I can provide a lot of safeguards. Direct editing of custom properties
will certainly lead to user errors, which is why I would like to force the
user to go through GUI and make the custom properties read-only to the user.
An alternative is to write a custom UITypeEditor for each custom property,
which is even more work and there are some issues with that, since some
custom properties are dependant on others, so the order would be very
important, which would be difficult to enforce.
It certainly must be possible to make a custom property read only since some
of the default properties of a component are read only (ex. name, version
etc). By forcing the user to go through the GUI I will simplify the component
and reduce complexity.
The problem is: I don’t know how to do this.

--
Alex Tcherniakhovski

[quoted text, click to view]
Re: How to make CustomProperlty Hidden or ReadOnly Darren Green
2/2/2006 12:55:33 AM
[quoted text, click to view]

You should validate both. What about programmatic access? You can build
packages in code as well, so that will be direct property access without
any GUI, just like the Properties Grid.

How you do this depends on what type of component you are writing, data
flow component, task or connection?


--
Darren
http://www.sqldts.com
AddThis Social Bookmark Button