aspnet-devexpress-dot-web-dot-aspxgridcustomcallbackeventargs.md
Gets a string that contains specific information (if any) passed from the client side.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public string Parameters { get; }
Public ReadOnly Property Parameters As String
| Type | Description |
|---|---|
| String |
A string value that contains specific information collected on the client side and passed to the event for further server-side processing.
|
Use the Parameters property to obtain specific information that has been collected on the client side and passed by the client PerformCallback method to the server for further server-side processing.
You can use the Parameters property to recognize different kinds of callbacks to perform different actions on the server side.
protected void Grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
if(e.Parameters == "ApplyCustomFilter")
Grid.FilterExpression = "City = 'Bratislava'";
if(e.Parameters == "ApplyCustomGrouping") {
Grid.DataColumns["City"].GroupBy();
Grid.ExpandAll();
}
}
Protected Sub Grid_CustomCallback(ByVal sender As Object, ByVal e As ASPxGridViewCustomCallbackEventArgs)
If e.Parameters = "ApplyCustomFilter" Then
Grid.FilterExpression = "City = 'Bratislava'"
End If
If e.Parameters = "ApplyCustomGrouping" Then
Grid.DataColumns("City").GroupBy()
Grid.ExpandAll()
End If
End Sub
<script type="text/javascript">
function onApplyFilterButtonClick(s, e) {
grid.PerformCallback("ApplyCustomFilter");
}
function onApplyGroupingButtonClick(s, e) {
grid.PerformCallback("ApplyCustomGrouping");
}
</script>
…
<dx:ASPxGridView ID="Grid" runat="server" KeyFieldName="ID" ClientInstanceName="grid" OnCustomCallback="Grid_CustomCallback">
<Columns>
<dx:GridViewDataColumn FieldName="ID" />
<dx:GridViewDataColumn FieldName="FirstName" />
<dx:GridViewDataColumn FieldName="LastName" />
<dx:GridViewDataColumn FieldName="City" />
</Columns>
</dx:ASPxGridView>
<dx:ASPxButton ID="ApplyFilterButton" runat="server" AutoPostBack="false" UseSubmitBehavior="false" Text="Apply Custom Filter">
<ClientSideEvents Click="onApplyFilterButtonClick" />
</dx:ASPxButton>
<dx:ASPxButton ID="ApplyGroupingButton" runat="server" AutoPostBack="false" UseSubmitBehavior="false" Text="Apply Custom Grouping">
<ClientSideEvents Click="onApplyGroupingButtonClick" />
</dx:ASPxButton>
The following code snippets (auto-collected from DevExpress Examples) contain references to the Parameters property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
asp-net-web-forms-create-responsive-web-app/CS/ResponsiveWebApplication/GridView.aspx.cs#L16
protected void GridView_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
if(e.Parameters == "delete") {
List<long> selectedIds = GridView.GetSelectedFieldValues("Id").ConvertAll(id => (long)id);
asp-net-web-forms-grid-switch-data-sources-at-runtime/CS/Solution/Default.aspx.cs#L23
protected void grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
Session["selectedDataSource"] = Int32.Parse(e.Parameters);
asp-net-web-forms-grid-created-at-runtime-switch-data-sources/CS/Solution/Default.aspx.cs#L23
protected void grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
Session["selectedDataSource"] = Int32.Parse(e.Parameters);
ASPxGridViewCustomCallbackEventArgs e) {
if (e.Parameters == "D")
{
asp-net-web-forms-grid-move-selected-rows-between-grid-controls/VB/E2636/Default.aspx.vb#L24
Select Case e.Parameters
Case "addSelectedRows"
asp-net-web-forms-grid-switch-data-sources-at-runtime/VB/Solution/Default.aspx.vb#L26
Protected Sub grid_CustomCallback(ByVal sender As Object, ByVal e As ASPxGridViewCustomCallbackEventArgs)
Session("selectedDataSource") = Int32.Parse(e.Parameters)
asp-net-web-forms-grid-created-at-runtime-switch-data-sources/VB/Solution/Default.aspx.vb#L26
Protected Sub grid_CustomCallback(ByVal sender As Object, ByVal e As ASPxGridViewCustomCallbackEventArgs)
Session("selectedDataSource") = Integer.Parse(e.Parameters)
Dim grid As ASPxGridView = TryCast(sender, ASPxGridView)
Protected Sub ASPxGridView1_CustomCallback(ByVal sender As Object, ByVal e As ASPxGridViewCustomCallbackEventArgs)
If Equals(e.Parameters, "D") Then
ASPxGridView1.PageIndex = 0
See Also
js-ASPxClientCardView.PerformCallback
js-ASPxClientGridView.PerformCallback
js-ASPxClientVerticalGrid.PerformCallback
ASPxGridCustomCallbackEventArgs Class