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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can I have a sample for the datagrid search form ?

Thread ID:





121720 Jan 19,2016 03:04 PM UTC Jan 27,2016 11:26 AM UTC WPF 5
Tags: SfDataGrid
Asked On January 19, 2016 03:04 PM UTC


I'm very interested to the Search form for the SfDatagrid that I see on the online demos (see attached image).
But I don't find the code example on my own installation.
Is there a link where I can download the code example ?
Thank you in advance.


Attachment: Syncfusion_98d35bfd.zip

Sowndaiyan Paulpandi [Syncfusion]
Replied On January 20, 2016 12:57 PM UTC

Hi Silvio,

Thanks for contacting Syncfusion Support.

We have provided this “search” support from our Essential Studio Volume 4, 2015 (Version So we recommend you to use our latest version to use this “search” support and is available for download under the following link.




Replied On January 23, 2016 07:54 AM UTC

I've tried the search control and it works.
However I had to make 2 changes on your code not to have crashes on my own example.

First of all: 

       static SearchControl()
          DefaultStyleKeyProperty.OverrideMetadata(typeof(SearchControl), new FrameworkPropertyMetadata(typeof(SearchControl)));

        public SearchControl()

I have inserted the static constructor and the OverrideMetadata is called inside it. Otherwise, the second time you create the same control you'd have a crash.

Secondly, I had to make this change:

        private void OnComboBoxSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
          if (e.RemovedItems.Count == 0 || e.AddedItems.Count == 0)
            var oldItem = e.RemovedItems[0];
            var newItem = e.AddedItems[0];
            if (oldItem == null || newItem == null)
            var oldGrid = this.GetDataGrid(oldItem.ToString());
            var newGrid = this.GetDataGrid(newItem.ToString());
            newGrid.SearchHelper.AllowFiltering = (bool)this.ApplyFilterCheckBox.IsChecked;

Without the inserted red lines I had cases (closing the form) where e.AddedItems was empty and an IndexOfRangeException was thrown.

Now I have a question for you. This control seems to search for only Text cells. But what about searching also for combo-box value cells? Should it be possible ?

Have a nice day !

Ganeshkumar Lingappan [Syncfusion]
Replied On January 25, 2016 05:39 PM UTC

Hi Silvio,

ComboBox column loads content presenter to provide support for template. You can enable search in combobox column by loading TextBlock by writing custom renderer. We have prepared and attached the sample for the ComboBox column Search for your Reference. Find the sample from below location.

Sample Location : http://www.syncfusion.com/downloads/support/forum/121720/ze/CS2017765198

Please let us know if you need further assistance.


Replied On January 26, 2016 04:25 PM UTC

Thank you for your assistance.
It works with GridComboBoxColumn.

Is there a similar example also with GridMultiColumnDropDownList ?

Thank you in advance.

Ambarish Srinivasan [Syncfusion]
Replied On January 27, 2016 11:26 AM UTC

Hi Silvio,

By default search supported with GridMultiColumnDropDownList. Please find the sample where search working fine without any changes,



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon