elementAttr
Specifies the attributes to be attached to the widget's root element.
You can configure this option in an ASP.NET MVC Control as follows:
- @(Html.DevExtreme().WidgetName()
- .ElementAttr("class", "class-name")
- // ===== or =====
- .ElementAttr(new {
- @id = "elementId",
- @class = "class-name"
- })
- // ===== or =====
- .ElementAttr(new Dictionary<string, object>() {
- { "id", "elementId" },
- { "class", "class-name" }
- })
- )
- @(Html.DevExtreme().WidgetName() _
- .ElementAttr("class", "class-name")
- ' ===== or =====
- .ElementAttr(New With {
- .id = "elementId",
- .class = "class-name"
- })
- ' ===== or =====
- .ElementAttr(New Dictionary(Of String, Object) From {
- { "id", "elementId" },
- { "class", "class-name" }
- })
- )
handles
You can pass several values separated by a space. For example, "right bottom".
When using the widget as an ASP.NET MVC Control, specify this option with the ResizeHandle
enum that accepts the following values: Top
, Bottom
, Right
and Left
. You can combine these values by separating them with a comma, for example:
- @(Html.DevExtreme().Resizable()
- .Handles(ResizeHandle.Top, ResizeHandle.Bottom)
- .Content(@<text>
- @* resizable content *@
- </text>)
- )
- @Code
- Html.DevExtreme().Resizable() _
- .Handles(ResizeHandle.Top, ResizeHandle.Bottom)
- .Content(Sub()
- @* resizable content *@
- End Sub).Render()
- End Code
height
This option accepts a value of one of the following types:
Number
The height in pixels.String
A CSS-accepted measurement of height. For example,"55px"
,"80%"
,"auto"
,"inherit"
.Function
A function returning either of the above. For example:JavaScript- height: function() {
- return window.innerHeight / 1.5;
- }
onDisposing
A handler for the disposing event. Executed when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if you use Knockout. |
onInitialized
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
onOptionChanged
Name | Type | Description |
---|---|---|
name |
The option's short name. |
|
model |
The model data. Available only if you use Knockout. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The widget's instance. |
|
fullName |
The option's full name. |
|
value | any |
The option's new value. |
onResize
A handler for the resize event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
jQueryEvent |
Use 'event' instead. The jQuery event that caused the handler execution. Deprecated in favor of the event field. |
|
event | Event (jQuery or EventObject) |
The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery. |
width |
The widget's current width. |
|
height |
The widget's current height. |
onResizeEnd
A handler for the resizeEnd event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
jQueryEvent |
Use 'event' instead. The jQuery event that caused the handler execution. Deprecated in favor of the event field. |
|
event | Event (jQuery or EventObject) |
The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery. |
width |
The current widget width. |
|
height |
The current widget height. |
onResizeStart
A handler for the resizeStart event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
jQueryEvent |
Use 'event' instead. The jQuery event that caused the handler execution. Deprecated in favor of the event field. |
|
event | Event (jQuery or EventObject) |
The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery. |
width |
The widget's current width. |
|
height |
The widget's current height. |
rtlEnabled
When this option is set to true, the widget text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.
- DevExpress.config({
- rtlEnabled: true
- });
See Also
- Right-to-Left Support Demo: DataGrid | Navigation Widgets | Editors
width
This option accepts a value of one of the following types:
Number
The width in pixels.String
A CSS-accepted measurement of width. For example,"55px"
,"80%"
,"auto"
,"inherit"
.Function
A function returning either of the above. For example:JavaScript- width: function() {
- return window.innerWidth / 1.5;
- }
If you have technical questions, please create a support ticket in the DevExpress Support Center.