
Setting Control Properties
A data mining Web control has two categories of properties:
-
The Data Mining Content category contains properties that define the model to be displayed. Among these properties, there are properties that must be set to use the control. The following table lists the properties shared by all the Web controls and indicates which of these properties must be set for all controls.
|
Property
|
Type
|
Default
|
Requires changes
|
|---|
|
Server
|
string
|
Localhost
|
Yes
|
|
Database
|
string
|
<empty>
|
Yes
|
|
Model
|
string
|
<empty>
|
Yes
|
|
Connection
|
System.Data.OleDb.OleDbConnection
|
(none)
|
No
|
In addition to these common controls, the DMDecisionTreeViewer control has additional Data Mining Content properties that must be set. For more information about these additional properties, see the section that describes how to set the properties for the DMDecisionTreeViewer control.
-
The Data Mining Layout category contains graphical properties for the controls. As the graphical representation for each data mining Web controls is different, the graphical properties associated with the controls vary correspondingly. You can use the default settings for these properties as is.
To set the properties for a control, you use can use the Properties window in Visual Studio. If you cannot see the Properties window, right-click the control, and then click Properties. Also, to easily access the properties of the control, in Properties, select the Categorized view.
Note: |
|---|
|
Also, you can set these values programmatically in the code shown on the Source tab.
|
Setting DMClusterView Control Properties
You can use the DMClusterViewer control to display the content of models created using the Microsoft Clustering algorithm. Not as rich as the cluster viewer found in Business Intelligence Development Studio, the cluster viewer for this control only supports cluster characteristics and cluster discrimination.
The DMClusterViewer control has properties in the Data Mining Content category that must be set and optional properties in the Data Mining Layout category whose default settings can be used as is.
Setting the Data Mining Content Properties for the DMClusterView Control
The properties in the Data Mining Content category that must be set for the DMClusterView control are those properties shared by all the Web controls—Server, Database, and Model. If you want, you can also change the Connection property for this control.

To set the properties required by the DMClusterView control
-
In Visual Studio, on the design view for the Web form, select the DMClusterView control.
-
In the Properties window, in the Data Mining Content category, set the following properties:
-
Set the Server property to the name of the computer on which Analysis Services is installed.
-
Set the Database property to the name of the catalog that contains the model to be displayed. For this sample, the name of the database that contains the mining models is Adventure Works DW.
-
Set the Model property to the mining model to be loaded in the viewer.
-
(Optional) Set the Connection property to an existing OLE DB connection (that is, a System.Data.OleDb.OleDbConnection object). This allows the control to share a connection with the application instead of creating a new one.
Setting the Data Mining Layout Properties for the DMClusterView Control
The following table lists the graphical properties associated with the DMClusterView control. Changing the default setting for these graphical properties is optional.
|
Property
|
Type
|
Default
|
Requires changes
|
|---|
|
BarColor
|
System.Drawing.Color
|
Navy
|
No
|
|
ViewerMode
|
GridViewerMode
|
Discrimination
|
No
|

To set the graphical properties of the DMClusterView control
-
In Visual Studio, on the design view for the Web form, select the DMClusterView control.
-
In the Properties window, in the Data Mining Layout category, set the following properties:
Setting DMNaiveBayesViewer Control Properties
You can use the DMNaiveBayesViewer control to display the content of mining models created using the Microsoft Naive Bayes algorithm. The DMNaiveBayesViewer control only supports attribute characteristics and discrimination between attribute values.
Setting the Data Mining Content Properties for the DMNaiveBayesViewer Control
The properties in the Data Mining Content category that must be set for the DMNaiveBayesViewer control are those properties shared by all the Web controls—Server, Database, and Model. If you want, you can also change the Connection property for this control.

To set the properties required by the DMNaiveBayesViewer control
-
In Visual Studio, on the design view for the Web form, select the DMNaiveBayesViewer control.
-
In the Properties window, in the Data Mining Content category, set the following properties:
-
Set the Server property to the name of the computer on which Analysis Services is installed.
-
Set the Database property to the name of the catalog that contains the model to be displayed. For this sample, the name of the database that contains the mining models is Adventure Works DW.
-
Set the Model property to the mining model to be loaded in the viewer.
-
(Optional) Set the Connection property to an existing OLE DB connection (that is, a System.Data.OleDb.OleDbConnection object). This allows the control to share a connection with the application instead of creating a new one.
Setting the Data Mining Layout Properties for the DMNaiveBayesViewer Control
The following table lists the graphical properties associated with the DMNaiveBayesViewer control. Changing the default setting for these graphical properties is optional.
|
Property
|
Type
|
Default
|
Requires changes
|
|---|
|
BarColor
|
System.Drawing.Color
|
Navy
|
No
|
|
ViewerMode
|
GridViewerMode
|
Discrimination
|
No
|

To set the properties specific to the DMNaiveBayesViewer control
-
In Visual Studio, on the design view for the Web form, select the DMNaiveBayesViewer control.
-
In the Properties window, in the Data Mining Layout category, set the following properties:
Setting DMDecisionTreeViewer Control Properties
The DMDecisionTreeViewer control can be used to display the content of models created using the Microsoft Decision Trees algorithm. The DMDecisionTreesViewer control can work in following two modes:
- Tree mode
-
Displays a complete decision tree and allows the following operations:
-
Expanding and collapsing of nodes.
-
Following the splits in decision trees.
-
Shading based on support for a state of the predicted attribute.
-
Inspecting, by way of a ToolTip, of the distributions for a specific node.
- Node Details mode
-
Provides details about a specific node in the tree, identified by the NODE_UNIQUE_NAME field from the MINING_MODEL_CONTENT schema. The Node Details view is different if the attribute is discrete / discretized (classification) or continuous (regression).
Setting the Data Mining Content Properties for the DMDecisionTreeViewer Control
In addition to the properties in the Data Mining Content category that are shared by all the Web controls—Server, Database, and Model, you must set the properties listed in the following table for the DMDecisionTreeViewer control
|
Property
|
Type
|
Default
|
Requires changes
|
|---|
|
TargetNode
|
String
|
<empty>
|
yes
|
|
TargetTree
|
String
|
<empty>
|
yes
|
Note Either the TargetTree property or the TargetNode property must be set. Both of these properties cannot be <empty>.

To set the properties required by the DMDecisionTreeViewer control
-
In Visual Studio, on the design view for the Web form, select the DMDecisionTreeViewer control.
-
In the Properties window, in the Data Mining Content category, set the following properties:
-
Set the Server property to the name of the computer on which Analysis Services is installed.
-
Set the Database property to the name of the catalog that contains the model to be displayed. For this sample, the name of the database that contains the mining models is Adventure Works DW.
-
Set the Model property to the mining model to be loaded in the viewer.
-
(Optional) Set the Connection property to an existing OLE DB connection (that is, a System.Data.OleDb.OleDbConnection object). This allows the control to share a connection with the application instead of creating a new one.
-
Set the TargetTree property to the tree to be displayed in the control. You identify this tree by the name of the predictable attribute. To retrieve the names of predictable attributes in a model, use a query similar to the following one:
"SELECT ATTRIBUTE_NAME FROM [Model].CONTENT WHERE NODE_TYPE=2"
Note: |
|---|
|
If you use the DMDecisionTreeViewer control in Tree mode, you must set the TargetTree property.
|
-
Set the TargetNode property to the NODE_UNIQUE_NAME value for the node to be displayed. To obtain a list of nodes in the tree, use a query similar to the following one:
"SELECT NODE_UNIQUE_NAME, ATTRIBUTE_NAME FROM [Model].CONTENT WHERE NODE_TYPE=3 OR NODE_TYPE=4"
Note: |
|---|
|
If you use the DMDecisionTreeViewer control in Node Details mode, you must set the TargetNode property.
|
Setting the Data Mining Layout Properties for the DMDecisionTreeViewer Control
The following table lists the graphical properties associated with the DMDecisionTreeViewer control. Changing the default setting for these graphical properties is optional.
|
Property
|
Type
|
Default
|
Requires changes
|
|---|
|
ViewType
|
TreeViewType
|
Tree
|
No
|
|
ShowToolbar
|
Boolean
|
True
|
No
|
|
OverflowBehavior
|
TreeOverflowBehaviorType
|
Visible
|
No
|
|
NodeLowDensity
|
System.Drawing.Color
|
White
|
No
|
|
NodeHighDensity
|
System.Drawing.Color
|
Navy
|
No
|
|
MaxVisibleHistograms
|
int
|
6
|
No
|
|
LineStrokeWidth
|
int
|
1
|
No
|
|
LineStrokeColor
|
System.Drawing.Color
|
Black
|
No
|
|
HistogramTooltipEvent
|
TreeTooltipEvent
|
OnMouseOverEvent
|
No
|
|
HistogramText
|
System.Drawing.Color
|
Black
|
No
|
|
HistogramBackground
|
System.Drawing.Color
|
Beige
|
No
|

To set the properties specific to the DMDecisionTreeViewer control
-
In Visual Studio, on the design view for the Web form, select the DMDecisionTreeViewer control.
-
In the Properties window, in the Data Mining Layout category, set the following properties: