Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Collapse]Data Editing
      Edit Form
      Adding and Deleting Records
      Row Validation and Error Indication
      Edit Form Validation (Templates)
      Processing Custom Callbacks
      Batch Edit Mode
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Adaptivity
     Save and Restore Layout
    [Expand]Templates
    [Expand]Export
     Toolbars
    [Expand]ASPxGridLookup
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Processing Custom Callbacks

ASPxGridView enables you to asynchronously go to the server and perform server-side processing using AJAX-based callback technology. To enable a callback mode, turn on the ASPxGridBase.EnableCallBacks option. Otherwise, round trips to the server are performed using standard postbacks (the whole page is refreshed).

Expanded Custom Callbacks

Custom callbacks enable you to perform required server-side actions. After a custom callback has been performed, ASPxGridView is re-rendered.

To send a custom callback to the server, use the ASPxClientGridView.PerformCallback method. This method generates the server-side ASPxGridView.CustomCallback event. The method's args argument allows you to pass information from the client-side to the server. If specified, it is passed to the event handler as the Parameters property.

If you need to perform actions on the client-side before and after callback processing, handle the ASPxClientGridView.BeginCallback and ASPxClientGridView.EndCallback events.

Restrictions:

  • Changing the settings of other controls contained on the page has no effect, because a custom callback only contains the information about ASPxGridView.
  • Don't export ASPxGridView content during callbacks, because ASP.NET does not support sending binary content during a callback.
  • The view state isn't updated during a callback.

Expanded Example: How to Show Detail Information in a Separate ASPxGridView

This example demonstrates how to display master-detail data using two ASPxGridView controls.

The animation below shows the result.

Expanded Custom Data Callbacks

When developing web applications, you often need to perform specific actions on the server and send the result back to the client for further processing. To make this task easy, ASPxGridView enables you to perform custom data callbacks.

To initiate a custom data callback, use the client-side ASPxClientGridView.GetValuesOnCustomCallback method. This method generates the server-side ASPxGridView.CustomDataCallback event. The method's args argument (if specified) is passed to the event handler as the Parameters property.

After the callback is processed in the ASPxGridView.CustomDataCallback event handler, the resulting information can be passed back to the client side's function, specified by the onCallback parameter. This information is specified by the event's ASPxGridCustomDataCallbackEventArgs.Result property.

Note

Modifying ASPxGridView settings during a custom data callback has no effect, because ASPxGridView isn't re-rendered after a custom data callback.

For an example, see our online demo.

Is this topic helpful?​​​​​​​