New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring the Kendo UI PropertyGrid

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class PropertyGridBuilder<T> : WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>, IHtmlContent where T : class

Inheritance: objectHelperResultWidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>PropertyGridBuilder<T>

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ToComponent()WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.Expression(string)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.Explorer(ModelExplorer)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.Name(string)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.Deferred(bool)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.HtmlAttributes(object)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ScriptAttributes(object, bool)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.Render()WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ToHtmlString()WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ToClientTemplate()WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.AsModule(bool)WidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ComponentWidgetBuilderBase<PropertyGrid<T>, PropertyGridBuilder<T>>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the PropertyGridBuilder<T> class.

C#
public PropertyGridBuilder(PropertyGrid<T> component)
Parameters:componentPropertyGrid<T>

Methods

The configuration of the PropertyGrid columns which allows for setting the field and value column configuration options.

C#
public PropertyGridBuilder<T> Columns(Action<PropertyGridColumnsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<PropertyGridColumnsSettingsBuilder<T>>

The PropertyGridColumnsSettingsBuilder<T> for the columns setting.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridBuilder<T> .

Configures the ContextMenu of the PropertyGrid. If set to true enables the default ContextMenu.

C#
public PropertyGridBuilder<T> ContextMenu()
Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridContextMenuSettingsBuilder<T> .

Configures the ContextMenu of the PropertyGrid. If set to true enables the default ContextMenu.

C#
public PropertyGridBuilder<T> ContextMenu(Action<PropertyGridContextMenuSettingsBuilder<T>> configurator)
Parameters:configuratorAction<PropertyGridContextMenuSettingsBuilder<T>>

The PropertyGridContextMenuSettingsBuilder<T> for the contextmenu setting.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridBuilder<T> .

Configures the ContextMenu of the PropertyGrid. If set to true enables the default ContextMenu.

C#
public PropertyGridBuilder<T> ContextMenu(bool enabled)
Parameters:enabledbool

Enables or disables the contextmenu option.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridContextMenuSettingsBuilder<T> .

If set to true, the user will be able to edit the values of the object's properties to which the PropertyGrid is bound. By default, editing is enabled. can also be set to a string (which specifies the edit mode).The supported string values are: (Default) incell.

C#
public PropertyGridBuilder<T> EditMode(bool value)
Parameters:valuebool

The value for EditMode

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Configures the client-side events.

C#
public PropertyGridBuilder<T> Events(Action<PropertyGridEventBuilder> configurator)
Parameters:configuratorAction<PropertyGridEventBuilder>

The client events action.

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Example:
C#
@(Html.Kendo().PropertyGrid()
.Name("PropertyGrid")
.Events(events =&gt; events
.BeforeEdit("onBeforeEdit")
)
)

Configures the Excel export settings of the PropertyGrid.

C#
public PropertyGridBuilder<T> Excel(Action<PropertyGridExcelSettingsBuilder<T>> configurator)
Parameters:configuratorAction<PropertyGridExcelSettingsBuilder<T>>

The PropertyGridExcelSettingsBuilder<T> for the excel setting.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridBuilder<T> .

Enables the grouping of properties. Set this configuration to false to disable grouping.

C#
public PropertyGridBuilder<T> Groupable(bool value)
Parameters:valuebool

The value for Groupable

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Sets the height of the PropertyGrid. Numeric values are treated as pixels.

C#
public PropertyGridBuilder<T> Height(double value)
Parameters:valuedouble

The value for Height

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Additional configuration options for the properties of the model.

C#
public PropertyGridBuilder<T> Items(Action<PropertyGridItemFactory<T>> configurator)
Parameters:configuratorAction<PropertyGridItemFactory<T>>

The PropertyGridItemFactory<T> for the items setting.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridBuilder<T> .

Defines the text of the command buttons that are shown within the PropertyGrid. Used primarily for localization.

C#
public PropertyGridBuilder<T> Messages(Action<PropertyGridMessagesSettingsBuilder<T>> configurator)
Parameters:configuratorAction<PropertyGridMessagesSettingsBuilder<T>>

The PropertyGridMessagesSettingsBuilder<T> for the messages setting.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridBuilder<T> .

Sets the object to which the PropertyGrid is bound.

C#
public PropertyGridBuilder<T> Model(object value)
Parameters:valueobjectReturns:

PropertyGridBuilder<T>

If set to true, the user can navigate the component with the keyboard. By default, keyboard navigation is disabled.

C#
public PropertyGridBuilder<T> Navigatable()
Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

If set to true, the user can navigate the component with the keyboard. By default, keyboard navigation is disabled.

C#
public PropertyGridBuilder<T> Navigatable(bool value)
Parameters:valuebool

The value for Navigatable

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Configures the PDF export settings of the PropertyGrid.

C#
public PropertyGridBuilder<T> Pdf(Action<PropertyGridPdfSettingsBuilder<T>> configurator)
Parameters:configuratorAction<PropertyGridPdfSettingsBuilder<T>>

The PropertyGridPdfSettingsBuilder<T> for the pdf setting.

Returns:

PropertyGridBuilder<T>

Returns the current instance of PropertyGridBuilder<T> .

When set to true the user will be able to resize columns via the context menu. When set to false the ContextMenu Resize command will not be available.

C#
public PropertyGridBuilder<T> Resizable(bool value)
Parameters:valuebool

The value for Resizable

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

If set to true, the PropertyGrid will display a scrollbar when the total row height or width exceeds the PropertyGrid height or width. By default, scrolling is enabled.

C#
public PropertyGridBuilder<T> Scrollable(bool value)
Parameters:valuebool

The value for Scrollable

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Use this configuration to disable the ToggleDetails command button on the toolbar and to prevent the rendering of the Details/Info box.

C#
public PropertyGridBuilder<T> ShowDetails(bool value)
Parameters:valuebool

The value for ShowDetails

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

If a String value is assigned to the toolbar configuration option, it will be treated as a single string template for the whole PropertyGrid toolbar and the string value will be passed as an argument to a kendo.template() function.; If a Function value is assigned (it may be a kendo.template() function call or a generic function reference), then the return value of the function will be used to render the contents of the PropertyGrid toolbar. or If an Array value is assigned, it will be treated as the list of commands which are displayed in the PropertyGrid toolbar. Commands can be custom or built-in. The supported built-in commands are:search—Adds a Search input to the ToolBar of the PropertyGrid. Search is performed by property name.sort—Adds a DropDownList with sorting options. Properties are sorted by property name.group—Renders a button for toggling between List and Group layout.details—Renders a button for toggling the Details/Info box.separator—Renders a separator element.spacer—Renders a spacer element.excel—Exports the data in MS Excel format.pdf—Exports the data in PDF format..

C#
public PropertyGridBuilder<T> Toolbar(Action<PropertyGridToolbarFactory<T>> configurator)
Parameters:configuratorAction<PropertyGridToolbarFactory<T>>

The configurator for the toolbar setting.

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Configures the toolbar of the PropertyGrid.

C#
public PropertyGridBuilder<T> Toolbar(Action<PropertyGridToolbarSettingsBuilder<T>> configurator)
Parameters:configuratorAction<PropertyGridToolbarSettingsBuilder<T>>

The configurator for the toolbar setting.

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.

Sets the width of the PropertyGrid. Numeric values are treated as pixels.

C#
public PropertyGridBuilder<T> Width(double value)
Parameters:valuedouble

The value for Width

Returns:

PropertyGridBuilder<T>

Returns the current PropertyGridBuilder<T> instance.