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

Perform Filtering Error in TreeGrid

Error after updating to package 21.1.35.

System.NullReferenceException: 'Object reference not set to an instance of an object.' error occurs in the PerformFiltering row during DataBinding.




//Controller



        public IActionResult ExpandDataBinding([FromBody] DataManagerRequest dm, string JobNo, string RevNo, string BldgNo, string sState)
        {
            List<HI_HD_EquipSelectionModel> listEQ = new List<HI_HD_EquipSelectionModel>();


            HI_HD_EquipSelectionModel model = new HI_HD_EquipSelectionModel();


            if (JobNo != null && RevNo != null && BldgNo != null)
            {
                model = new HI_HD_EquipSelectionModel()
                {
                    JOB_NO = JobNo,
                    REV_NO = int.Parse(RevNo),
                    BLDG_SNO = BldgNo
                };
            }


            IEnumerable DataSource = HI_HD_EquipSelectionModel.GetList(model, sState);


            DataOperations operation = new DataOperations();
            if (dm.Where != null && dm.Where.Count > 0) //filtering
            {
                DataSource = operation.PerformFiltering(DataSource, dm.Where, "and");
            }
            if (dm.Search != null && dm.Search.Count > 0)
            {
                DataSource = operation.PerformSearching(DataSource, dm.Search);
            }
            if (dm.Sorted != null && dm.Sorted.Count > 0)
            {
                DataSource = operation.PerformSorting(DataSource, dm.Sorted);
            }


            var count = listEQ.Count();


            if (dm.Skip != 0)
            {
                DataSource = operation.PerformSkip(DataSource, dm.Skip); //Paging
            }
            if (dm.Take != 0)
            {
                DataSource = operation.PerformTake(DataSource, dm.Take);
            }


            if (dm.Where != null)
            {
                DataSource = CollectChildRecords(DataSource, dm, model, sState);
            }
            return dm.RequiresCounts ? Json(new { result = DataSource, count = count }) : Json(DataSource);


        }

2 Replies

TK TaeWook Kang April 10, 2023 06:27 AM UTC

Please reply when you will respond... 



SM Shek Mohammed Asiq Abdul Jabbar Syncfusion Team April 10, 2023 07:32 AM UTC

Hi TaeWook Kang,


Sorry for the delay.


We have resolved the reported issue in our latest package release. We recommend you to update your package to the latest version(v21.1.38) to overcome the exception on PerformFiltering method.


Still faced issue, share us more details to validate further on this.


Regards,

Shek Mohammed Asiq


Loader.
Up arrow icon