Class GridBaseStyleCollectionEditor
Provides a collection editor that is tailored to adding, removing, and changing base styles from the BaseStylesMap in a GridModel.
Inheritance
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridBaseStyleCollectionEditor : CollectionEditor
Examples
The following code shows the GridBaseStyleCollectionEditor in a dialog using the GridBaseStylesMap method of the GridBaseStylesMap class:
GridControlBase grid = ActiveGrid;
if (grid != null)
{
GridBaseStylesMap.ShowGridBaseStylesMapDialog(grid.Model, "BaseStylesMap");
grid.Model.Refresh();
}
Constructors
GridBaseStyleCollectionEditor(Type)
Initializes a new instances of the GridBaseStyleCollectionEditor with a type to create instances for collection items.
Declaration
public GridBaseStyleCollectionEditor(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | Type for collection item. |
Methods
CanRemoveInstance(Object)
Indicates whether original members of the collection can be removed.
Declaration
protected override bool CanRemoveInstance(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to remove. |
Returns
Type | Description |
---|---|
System.Boolean | IfTrueRemoves this value from the collection;Otherwise False. The default value isTrue. |
CreateCollectionForm()
Overrides and creates a new form to display and edit the current collection.
Declaration
protected override CollectionEditor.CollectionForm CreateCollectionForm()
Returns
Type | Description |
---|---|
System.ComponentModel.Design.CollectionEditor.CollectionForm | A System.ComponentModel.Design.CollectionEditor.CollectionForm to provide as the user interface for editing the collection. |
CreateCollectionItemType()
Overrides and gets the data type that this collection contains.
Declaration
protected override Type CreateCollectionItemType()
Returns
Type | Description |
---|---|
System.Type | The data type of the items in the collection, or an System.Object if no Item property can be located on the collection. |
CreateInstance(Type)
Overrides and creates a new instance of the specified collection item type.
Declaration
protected override object CreateInstance(Type itemType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | itemType | The type of item to create. |
Returns
Type | Description |
---|---|
System.Object | A new instance of the specified object. |
EditValue(ITypeDescriptorContext, IServiceProvider, Object)
Overrides and edits the value of the specified object using the specified service provider and context.
Declaration
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.ITypeDescriptorContext | context | An System.ComponentModel.ITypeDescriptorContext that can be used to gain additional context information. |
System.IServiceProvider | provider | A service provider object through which editing services can be obtained. |
System.Object | value | The object to edit the value of. |
Returns
Type | Description |
---|---|
System.Object | The new value of the object. If the value of the object has not changed, this should return the same object it was passed. |
IntEditValue(ITypeDescriptorContext, IServiceProvider, Object)
Gets the edited value of the object.
Declaration
public object IntEditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.ITypeDescriptorContext | context | The context. |
System.IServiceProvider | provider | The provider. |
System.Object | value | The value. |
Returns
Type | Description |
---|---|
System.Object | GridBaseStyleMap object. |