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

Kendo UI PropertyGrid component

Definition

Constructors

Initializes a new instance of the PropertyGrid class.

C#
public PropertyGrid(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

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

C#
public PropertyGridColumnsSettings Columns { get; set; }

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

C#
public PropertyGridContextMenuSettings ContextMenu { get; set; }

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 bool? EditMode { get; set; }

Configures the Excel export settings of the PropertyGrid.

C#
public PropertyGridExcelSettings Excel { get; set; }

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

C#
public bool? Groupable { get; set; }

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

C#
public double? Height { get; set; }

Additional configuration options for the properties of the model.

C#
public List<PropertyGridItem> Items { get; set; }

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

C#
public PropertyGridMessagesSettings Messages { get; set; }

The model to which the PropertyGrid is bound to.

C#
public object Model { get; set; }

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

C#
public bool? Navigatable { get; set; }

Configures the PDF export settings of the PropertyGrid.

C#
public PropertyGridPdfSettings Pdf { get; set; }

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 bool? Resizable { get; set; }

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 bool? Scrollable { get; set; }

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

C#
public bool? ShowDetails { get; set; }

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.; 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. or If an Object value is assigned, it will propagate these properties to the underlying Toolbar:items - an array of commands as explained aboveoverflow - an object that configures the overflow behavior of the toolbar. The same as Toolbar.overflow property.

C#
public PropertyGridToolbarSettings Toolbar { get; set; }

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

C#
public double? Width { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)