GridTableStylesCollection::Item Property (String^)

 

Gets the DataGridTableStyle with the specified name.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
property DataGridTableStyle^ default[
	String^ tableName
] {
	DataGridTableStyle^ get(String^ tableName);
}

Parameters

tableName
Type: System::String^

The MappingName of the DataGridTableStyle to retrieve.

Property Value

Type: System.Windows.Forms::DataGridTableStyle^

The DataGridTableStyle with the specified MappingName.

When retrieving a DataGridTableStyle by MappingName, the Item property uses a case-insensitive comparison.

Use the Add or AddRange method to add items to the collection.

The following code example returns a DataGridTableStyle from the GridTableStylesCollection by passing the MappingName to the Item property.

void GetGridTableByName()
{
   DataGridTableStyle^ myGridStyle = myDataGrid->TableStyles[ "customers" ];
   Console::WriteLine( myGridStyle->MappingName );
}

.NET Framework
Available since 1.1
Return to top
Show: