Skip to main content

MVCxClientFilterControl.FillStateObject(obj) Method

Returns the filter control’s state.

Declaration

FillStateObject(
    obj: any
): void

Parameters

Name Type Description
obj any

An object that receives a filter control’s callback parameters.

Remarks

Use the FillStateObject method to get the filter control’s state that you can use in the action method.

If you perform a callback to the DevExpress extension, handle its client-side BeginCallback event as follows:

Html.DevExpress().FilterControl<Product>(settings => {
    settings.Name = "filterControl";
    ...
    settings.ClientSideEvents.BeginCallback = "function(s, e) { filterControl.FillStateObject(e.customArgs); }";    
}).GetHtml();

If you send an ajax request, fill its data object as follows:

var dataObj = { };
dataObj.customField = "customFieldValue";
filterControl.FillStateObject(dataObj); 

$.ajax({
   ...
   data: dataObj,
   ...
})
See Also