ListViewEventBuilder

Methods

Cancel(System.String)

Defines the handler of the Cancel client-side event. Fired when the user clicks the "cancel" button.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Cancel event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Cancel event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.Cancel("onCancel"))
             )
             

Cancel(System.Func)

Defines the handler of the Cancel client-side event. Fired when the user clicks the "cancel" button.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Cancel event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.Cancel(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )
             

Change(System.String)

Defines the handler of the Change client-side event. Fires when the ListView selection has changed.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Change event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Change event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.Change("onChange"))
             )
             

Change(System.Func)

Defines the handler of the Change client-side event. Fires when the ListView selection has changed.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Change event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.Change(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )
             

DataBound(System.String)

Defines the handler of the DataBound client-side event. Fires when the ListView has received data from the DataSource and it is already rendered.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see DataBound event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the DataBound event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.DataBound("onDataBound"))
             )
             

DataBound(System.Func)

Defines the handler of the DataBound client-side event. Fires when the ListView has received data from the DataSource and it is already rendered.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see DataBound event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.DataBound(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )
             

DataBinding(System.String)

Defines the handler of the DataBinding client-side event. Fires when the ListView is about to be bound.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see DataBinding event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the DataBinding event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.DataBinding("onDataBinding"))
             )
             

DataBinding(System.Func)

Defines the handler of the DataBinding client-side event. Fires when the ListView is about to be bound.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see DataBinding event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.DataBinding(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )
             

Edit(System.String)

Defines the handler of the Edit client-side event. Fires when the ListView enters edit mode.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Edit event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Edit event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.Edit("onEdit"))
             )
             

Edit(System.Func)

Defines the handler of the Edit client-side event. Fires when the ListView enters edit mode.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Edit event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.Edit(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )
             

Remove(System.String)

Defines the handler of the Remove client-side event. Fires before the list view item is put in edit mode. If the event is not prevented, the ListView will call the DataSource sync method.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Remove event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Remove event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.Remove("onRemove"))
             )
             

Remove(System.Func)

Defines the handler of the Remove client-side event. Fires before the list view item is put in edit mode. If the event is not prevented, the ListView will call the DataSource sync method.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Remove event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.Remove(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )
             

Save(System.String)

Defines the handler of the Save client-side event. Fired when a data item is saved.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Save event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Save event.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(events => events.Save("onSave"))
             )
             

Save(System.Func)

Defines the handler of the Save client-side event. Fired when a data item is saved.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Save event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ListViewEventBuilder .

Example

Razor
 
             @(Html.Kendo().ListView<ProductViewModel>()
                  .Name("productsListView")
                  .Events(e => e.Save(
                           @<text>
                              function(e){
                                  event handling code
                              }
                           </text>
                  ))
            )