We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Only one call to the action with filter set

Hi,
How can I make a single call to the GetBitacoras action with the filtering that I am
establishing from the databound, since with this code works as follows
makes a first call to the GetBitacoras action without the where, then makes a second
call to the GetBitacoras action with the where I set it in the databound.
What I would like is for a single call to be made to the GetBitacoras action with the where.
Stay tuned.
regards

Attachment: Datamanager_7014d5c.zip

3 Replies

VN Vignesh Natarajan Syncfusion Team January 24, 2019 07:25 AM UTC

Hi Corazon, 
 
Thanks for using Syncfusion products. 
 
Query: “What I would like is for a single call to be made to the GetBitacoras action with the where.” 
 
From your query, we understand that you need to perform filtering in the initial rendering itself. We suggest you to achieve your requirement by defining the filtered-columns in filterSettings API of ejGrid. 
 
Refer below code example for your reference 
 
@{ 
    var ALFKI = "ALFKI"; 
    var ANTON = 5; 
} 
 
<ej-grid id="FlatGrid" allow-paging="true" allow-filtering="true"> 
        <e-datamanager url="DataSource" adaptor="UrlAdaptor"></e-datamanager> 
        <e-filter-settings filter-type="Excel" max-filter-choices="50"> 
            <e-filtered-columns> 
                <e-filtered-column field="CustomerID" operator="Contains" predicate="and" value="ALFKI" match-case="true"></e-filtered-column> 
                <e-filtered-column field="EmployeeID" operator="LessThanOrEqual" predicate="and" value="ANTON" match-case="true"></e-filtered-column> 
            </e-filtered-columns> 
        </e-filter-settings>         
        .                     .                .                  .                 .  
    </ej-grid> 
 
Refer the below screenshot for the output 
 
 
   
For your convenience we have prepared a sample which can be downloaded from below link 
 
 
Refer our help documentation for your reference 
 
 
Please get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan 



CC Corazon Cruz Sanchez January 25, 2019 11:31 PM UTC

Hi Vignesh Natarajan , 

It solved my problem,thank you very much

Regards


VN Vignesh Natarajan Syncfusion Team January 28, 2019 04:18 AM UTC

Hi Corazon, 

Thanks for the update. 

We are glad to hear that your query has been resolved by our solution. 

Please get back to us if you need further assistance. 

Regards, 
Vignesh Natarajan 


Loader.
Live Chat Icon For mobile
Up arrow icon