DataSourceEventBuilder

Methods

Change(System.String)

Defines the name of the JavaScript function that will handle the the Change client-side event.

For more information see Change event.

Parameters

handler - System.String

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

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Change("onChangeDS"))
            )
             

Change(System.Func)

Defines the inline handler of the Change client-side event.

For more information see Change event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Change(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             

Sync(System.String)

Defines the name of the JavaScript function that will handle the Sync client-side event.

For more information see Sync event.

Parameters

handler - System.String

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

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Sync("onSyncDS"))
            )
             

Sync(System.Func)

Defines the inline handler of the Sync client-side event.

For more information see Sync event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Sync(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             

RequestStart(System.String)

Defines the name of the JavaScript function that will handle the RequestStart client-side event.

For more information see RequestStart event.

Parameters

handler - System.String

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

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.RequestStart("onRequestStartDS"))
            )
             

RequestStart(System.Func)

Defines the inline handler of the RequestStart client-side event.

For more information see RequestStart event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.RequestStart(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             

RequestEnd(System.String)

Defines the name of the JavaScript function that will handle the RequestEnd client-side event.

For more information see RequestEnd event.

Parameters

handler - System.String

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

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.RequestEnd("onRequestEndDS"))
            )
             

RequestEnd(System.Func)

Defines the inline handler of the RequestEnd client-side event.

For more information see RequestEnd event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.RequestEnd(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             

Error(System.String)

Defines the name of the JavaScript function that will handle the Error client-side event.

For more information see Error event.

Parameters

handler - System.String

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

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Error("onErrorDS"))
            )
             

Error(System.Func)

Defines the inline handler of the Error client-side event.

For more information see Error event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Error(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             

Push(System.String)

Defines the name of the JavaScript function that will handle the Push client-side event.

For more information see Push event.

Parameters

handler - System.String

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

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Push("onPushDS"))
            )
             

Push(System.Func)

Defines the inline handler of the Push client-side event.

For more information see Push event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example

Razor
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Push(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )