PromptBoxBuilder
Methods
ActionButton(System.Action)
Configures the Action button (send/stop) in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
configurator - System.Action<PromptBoxActionButtonSettingsBuilder>
The action that configures the actionbutton.
Enable(System.Boolean)
If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
Parameters
value - System.Boolean
The value that configures the enable.
EndAffixTemplateHandler(System.String)
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.
Parameters
value - System.String
The value that configures the endaffixtemplate.
EndAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the endaffixtemplate.
FileSelectButton()
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
FileSelectButton(System.Boolean)
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
Parameters
enabled - System.Boolean
Enables or disables the fileselectbutton option.
FileSelectButton(System.Action)
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
Parameters
configurator - System.Action<PromptBoxFileSelectButtonSettingsBuilder>
The action that configures the fileselectbutton.
FillMode(Kendo.Mvc.UI.FillMode)
Defines the fill mode for the PromptBox container.
Parameters
value - FillMode
The value that configures the fillmode.
Loading(System.Boolean)
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
Parameters
value - System.Boolean
The value that configures the loading.
MaxTextAreaHeight(System.Double)
Sets the maximum height of the textarea in pixels. The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.
Parameters
value - System.Double
The value that configures the maxtextareaheight.
Messages(System.Action)
Defines the localization messages for the PromptBox.
Parameters
configurator - System.Action<PromptBoxMessagesSettingsBuilder>
The action that configures the messages.
Mode(Kendo.Mvc.UI.PromptBoxMode)
Sets the mode of the PromptBox. Available options are "single", "multi", and "auto". single - Displays a single-line input field; multi - Displays a multi-line textarea with configurable rows or auto - Starts as a single line and expands automatically as the user types.
Parameters
value - PromptBoxMode
The value that configures the mode.
Placeholder(System.String)
Sets the placeholder text displayed in the PromptBox when it is empty.
Parameters
value - System.String
The value that configures the placeholder.
Readonly(System.Boolean)
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
Parameters
value - System.Boolean
The value that configures the readonly.
Rows(System.Double)
Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".
Parameters
value - System.Double
The value that configures the rows.
SpeechToTextButton(System.Boolean)
Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
enabled - System.Boolean
Enables or disables the speechtotextbutton option.
SpeechToTextButton(System.Action)
Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
configurator - System.Action<PromptBoxSpeechToTextButtonSettingsBuilder>
The action that configures the speechtotextbutton.
StartAffixTemplateHandler(System.String)
Defines a custom template for the start affix area. The start affix is positioned before the input field.
Parameters
value - System.String
The value that configures the startaffixtemplate.
StartAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
Defines a custom template for the start affix area. The start affix is positioned before the input field.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the startaffixtemplate.
Title(System.String)
Sets the title attribute of the input or textarea element.
Parameters
value - System.String
The value that configures the title.
TopAffixTemplateHandler(System.String)
Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.
Parameters
value - System.String
The value that configures the topaffixtemplate.
TopAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the topaffixtemplate.
Value(System.String)
Sets the value of the PromptBox.
Parameters
value - System.String
The value that configures the value.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<PromptBoxEventBuilder>
The client events action.
Example
@(Html.Kendo().PromptBox()
.Name("PromptBox")
.Events(events => events
.Blur("onBlur")
)
)
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.