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.
Unfortunately, activation email could not send to your email. Please try again.

(Urgent) How to get filtered data for all pages on select all checkbox event

Thread ID:

Created:

Updated:

Platform:

Replies:

121858 Feb 2,2016 02:30 AM Feb 3,2016 08:51 AM JavaScript 1
loading
Tags: ejmGrid
Gomtesh
Asked On February 2, 2016 02:30 AM

I want filtered data on click of select all checkbox for javascript grid.
I got either all data on headCheckChange event or records on currentView data but I want all filtered records which are present on all pages.
How to get it ..?

I have attached link for that:  http://jsplayground.syncfusion.com/a0rnnkmv

Jayaprakash Kamaraj [Syncfusion]
Replied On February 3, 2016 08:51 AM

Hi Gomtesh,
We have analyzed your requirement and achieved using datamanager executeQuery property. Please refer to the below code example, help documentation and sample.
Code Example:
  function headCheckChange(e) {
                $("#Grid .rowCheckbox").ejCheckBox({ "change": checkChange });
                gridObj = $("#Grid").data("ejGrid");
              console.log(gridObj);
                var pager = gridObj.model.pageSettings;
                if ($("#headchk").is(':checked')) {
                    $(".rowCheckbox").ejCheckBox({ "checked": true });
                    gridObj.multiSelectCtrlRequest = true;
                    gridObj.selectRows(0, pager.pageSize);
                                                                                // To Select all rows in Grid Content
                                                                                var queryClone=$.extend(true,{},gridObj.model.query)
                                                                                for( i=0;i<queryClone.queries.length;i++){
                                                                                if(gridObj.model.query.queries[i].fn == "onPage")
                                                                                delete gridObj.model.query.queries[i];
                                                                                gridObj.model.query.queries.length--;
                                                                                break;
                                                                                }
                                                                               
                var queryPromise = gridObj._dataSource().executeQuery(gridObj.model.query);
                                                                var proxy = gridObj;
                queryPromise.done(ej.proxy(function (e) {
                                                                var filterrecords = e.result;
                }));

Help Documentation: http://help.syncfusion.com/js/datamanager/query
Sample: http://jsplayground.syncfusion.com/5adiwrwh
Regards,
Jayaprakash K.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;