TreeView for WinForms | ComponentOne
C1.Win.TreeView Namespace / BindingInfo Class / KeyField Property
Example

In This Topic
    KeyField Property (BindingInfo)
    In This Topic
    Gets or sets a value specifying the key field of the data source bound to the tree view control.
    Syntax
    'Declaration
     
    
    <DefaultValueAttribute("")>
    <C1CategoryAttribute("Data")>
    <C1DescriptionAttribute("BindingInfo.KeyField", "Gets or sets a value specifying the key field of the data source bound to the tree view control.")>
    Public Property KeyField As String
    [DefaultValue("")]
    [C1Category("Data")]
    [C1Description("BindingInfo.KeyField", "Gets or sets a value specifying the key field of the data source bound to the tree view control.")]
    public string KeyField {get; set;}
    Remarks
    This string uses the '\\' as a separator. Last field name sets the field to be used on all of the following levels.
    Example
    c1TreeView.BindingInfo.KeyField = "First\\Second\\etc";
    See Also