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.

I want to access grid fitler data

Thread ID:

Created:

Updated:

Platform:

Replies:

120737 Oct 9,2015 12:57 AM Oct 12,2015 02:23 AM JavaScript 1
loading
Tags: ejGrid
Bharat Buddhadev
Asked On October 9, 2015 12:57 AM

 <div   ej-grid e-datasource="data" ng-init="setTargetList(@Newtonsoft.Json.JsonConvert.SerializeObject(@Model, new Newtonsoft.Json.JsonSerializerSettings { ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() }))"
                     e-columns="columns"
                     class="gridStyle"
                     e-allowresizing="true"
                     e-allowkeyboardnavigation="true"                     
                     e-allowsorting="true"
                     e-minwidth="550"
                     e-isresponsive="true"                     
                     e-allowgrouping="true"
                     e-groupsettings-groupedcolumns="targetGroupColumn"
                     e-allowfiltering="true"
                     e-filtersettings-filtertype="excel"
                     e-actioncomplete="complete"
                     e-create="complete"
                     e-enabletouch="false"
                     e-allowpaging="true"
                     e-pagesettings-pagesize="5">                    
                </div>

I am creating grid using Angualar js

 $scope.setTargetList = function (targetList) {

            $rootScope.data = targetList.targetViewModelList;
            $rootScope.data = $filter('orderBy')($rootScope.data, 'targetName');

            $rootScope.accessGroupData = $filter('orderBy')(targetList.accessGroupMarkingViewModelList, 'markingString');
            $rootScope.accessGroupData.splice(0, 0, { markingString: "Unrestricted" });

        }

After applying filtering I want to access filterdata. from grid view.
How to access only filterdata from gridview.





Saravanan Arunachalam [Syncfusion]
Replied On October 12, 2015 02:23 AM

Hi Bharat,

We analyzed your code snippet and found that you bound the filtered data to the grid. So, we suggested you to get the grid view data using “model.dataSource” method of Grid. Please refer to the following screenshot.


 

If you filter the data using Grid filter actions, after bound the datasource to grid, we suggest you to get the filtered data using “getFilteredRecords” method of Grid.  Please refer to the below user guide link:

http://help.syncfusion.com/js/api/ejgrid#methods:getfilteredrecords


Regards,

Saravanan A.


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.

;