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

Defines the fluent API for configuring the DialogModalSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DialogModalSettingsBuilder

Inheritance: objectDialogModalSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public DialogModalSettingsBuilder(DialogModalSettings settings)
Parameters:settingsDialogModalSettings

The DialogModalSettings

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Modal(modal => modal.PreventScroll(true))
)

Methods

Specifies whether the document should stop scrolling when modal dialog is opened. Closing it should restore the initial document overflow. Note that it's not supported to have multiple dialogs with different preventScroll setting.

C#
public DialogModalSettingsBuilder PreventScroll(bool value)
Parameters:valuebool

The value that configures the preventscroll.

Returns:

DialogModalSettingsBuilder

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Modal(modal => modal.PreventScroll(true))
)