DataRepeater.ItemHeaderVisible Property

Gets or sets a value that determines whether item headers are displayed in a DataRepeater control.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaração
Public Property ItemHeaderVisible As Boolean
    Get
    Set
public bool ItemHeaderVisible { get; set; }
public:
property bool ItemHeaderVisible {
    bool get ();
    void set (bool value);
}
member ItemHeaderVisible : bool with get, set
function get ItemHeaderVisible () : boolean
function set ItemHeaderVisible (value : boolean)

Property Value

Type: System.Boolean
true if the item header will be displayed; otherwise, false. The default is true.

Remarks

When ItemHeaderVisible is set to True, an item header is displayed on the left side of each item in the DataRepeater control, or across the top of each item when the LayoutStyle property is set to Horizontal. When an item is selected, the item header for that item is changed to the SelectionColor and a selection symbol is shown in the header. When data in the DataRepeater item has been changed but not yet saved, a pencil symbol is displayed.

When ItemHeaderVisible is set to False and an item is selected, a dotted line that indicates selection is displayed inside the border of the item.

Examples

The following code example demonstrates how to change the item selection behavior in a DataRepeater control by setting the ItemHeaderVisible property. It assumes that you have a form that contains a DataRepeater control named DataRepeater1 and a Button control named Button1.

Private Sub Button1_Click() Handles Button1.Click
    ' Switch the visibility of the item header.
    If DataRepeater1.ItemHeaderVisible = True Then
        DataRepeater1.ItemHeaderVisible = False
    Else
        DataRepeater1.ItemHeaderVisible = True
    End If
End Sub
private void button1_Click(System.Object sender, System.EventArgs e)
{
    // Switch the visibility of the item header.
    if (dataRepeater1.ItemHeaderVisible==true)
    {
        dataRepeater1.ItemHeaderVisible = false;
    }
    else
    {
        dataRepeater1.ItemHeaderVisible = true;
    }
}

.NET Framework Security

See Also

Reference

DataRepeater Class

Microsoft.VisualBasic.PowerPacks Namespace

ItemHeaderSize

SelectionColor

Other Resources

Introduction to the DataRepeater Control (Visual Studio)

How to: Display Item Headers in a DataRepeater Control (Visual Studio)