Back to Devexpress

GridSettingsBase.BeforeGetCallbackResult Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-gridsettingsbase-4b648556.md

latest2.3 KB
Original Source

GridSettingsBase.BeforeGetCallbackResult Property

Allows you to perform custom actions after a callback sent by the current extension has been processed on the server, but prior to the time the respective callback result render is formed.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public EventHandler BeforeGetCallbackResult { get; set; }
vb
Public Property BeforeGetCallbackResult As EventHandler

Property Value

TypeDescription
EventHandler

An EventHandler delegate method allowing you to implement custom processing.

|

Remarks

Online Example

View Example: How to implement row clone functionality

Example

The following example illustrates how to use the GridSettingsBase.BeforeGetCallbackResult event to set the edit cell color dynamically.

csharp
...
settings.BeforeGetCallbackResult = (sender, e) => {
    MVCxGridView gridview = sender as MVCxGridView;
    if(gridview.IsNewRowEditing)
        gridview.DataColumns["StateDescription"].EditCellStyle.BackColor = System.Drawing.Color.Green;
    else        
        gridview.DataColumns["StateDescription"].EditCellStyle.BackColor = System.Drawing.Color.Yellow;                
};
...

See Also

Declaring Server-Side Event Handlers

Grid View

Card View

GridSettingsBase Class

GridSettingsBase Members

DevExpress.Web.Mvc Namespace