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)

public bool ItemHeaderVisible { get; set; }

Property Value

Type: System.Boolean

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

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.

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 void button1_Click(System.Object sender, System.EventArgs e)
    // Switch the visibility of the item header.
    if (dataRepeater1.ItemHeaderVisible==true)
        dataRepeater1.ItemHeaderVisible = false;
        dataRepeater1.ItemHeaderVisible = true;
Return to top