DataGrid FullTextSearch

Posted by: kyriakos.hadjikyriakou on 25 May 2018, 5:43 am EST

  • Posted 25 May 2018, 5:43 am EST

    Hi I try to apply the full text search in datagrid, in the itemSource I assign a BindingList of object and when begin write into the text the event the C1FullTextSearchBehavior.GetFullTextSearchBehavior(grid).Filter = filter.Text;

    does not do anything to preview the result

    there you find my problem

    FullTextSearchSample.zip

    Thank you

  • Posted 28 May 2018, 1:37 am EST

    Hi,

    I escalated this to developer team. Will let you know as soon as there is any information from them.

    [ TFS ID 324142 for internal use only]

    Thanks,

    Singh

  • Posted 30 May 2018, 2:45 am EST

    Hi,

    I try to resolve the issues by using the FilterChanging Event to customize the filtering but when remove the last character from the filtered column the event does not fire then the result continues be the same as a previous result. The event need to be fire when filtered column is empty.

    I need to know when the filtered column is empty to return back all my rows in the grid.

    thanks

  • Posted 31 May 2018, 1:43 am EST

    Hi,

    To solve the issue related to FilterChanging event. You need to implement IBindingListView interface in your EmployeePreviewList class and set the SupportsFiltering property to true as:

        public class EmployeePreviewList : BindingList<EmployeeViewObject>, IBindingListView
        {
    
            public EmployeePreviewList(int CompanyID)
            {
                for (int i = 0; i <= 10; i++)
                {
                    EmployeeViewObject obj = new EmployeeViewObject();
                    obj.EmployeeId = i;
                    obj.Code = "Code" + i.ToString();
                    obj.Reference = "Reference" + i.ToString();
                    obj.LastName = "LastName" + i.ToString();
                    obj.FirstName = "FirstName" + i.ToString();
                    obj.MiddleName = "MiddleName" + i.ToString();
                    obj.NickName = "NickName" + i.ToString();
                    this.Add(obj);
                }
            }
    
            public string Filter { get ; set ; }
    
            public ListSortDescriptionCollection SortDescriptions => throw new NotImplementedException();
    
            public bool SupportsAdvancedSorting => throw new NotImplementedException();
    
            public bool SupportsFiltering => true;
    
            public void ApplySort(ListSortDescriptionCollection sorts)
            {
                throw new NotImplementedException();
            }
    
            public void RemoveFilter()
            {
            }
        }
    

    Hope, it will solve your issue.

    Thanks,

    Singh

  • Posted 31 May 2018, 2:15 am EST

    hi,

    The solution resolve the half of the problem. Find the words and highlighted but does not remove the rows that not contain the word.

    Thanks

  • Posted 31 May 2018, 3:32 am EST

    Hi,

    I escalated this to developer team. Will update you as soon as possible.

    ~Singh

  • Posted 5 June 2018, 5:26 am EST

    Hi,

    can you tell us why you need BindingList.

    If there is no special reason, you can use this as following.

    1. Make the ItemsSource to list as
    this.grid.ItemsSource = new EmployeePreviewList(1).ToList();
    
    1. EmployeeViewObject contains a property named “UserId” which will cause AmbiguousMatchException with the base class property “UserID”. Rename it or comment it.

    Thanks,

    Singh

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels