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.

Refresh filter bar grid

Thread ID:

Created:

Updated:

Platform:

Replies:

58656 Mar 26,2007 08:47 AM Mar 26,2007 09:18 PM Windows Forms 1
loading
Tags: GridControl
Julien
Asked On March 26, 2007 08:47 AM

Hi !

I use the filter bar on a grid. On the example you can find on "Essential Studio Sample Browser" (Grid sample>Samples>Data Bound>FilterBarGrid), after having filtered any data on a column, if you want to filter another column, there are still data in the filter which have no way to appear: they don't appear anymore in the filtered grid.
Here is a screenshot of the example I spoke. You can see that I have filtered the data on "Blauer See Delicatessen" and there is just one line left in the grid. So there might be only one choice left in the filter bar for the ContactName... and there is still all the fields witch are not listed in the grid !
Do you know how I could refresh these fields each time I filter the grid ?

Thank you !

fieldRefreshIssue0.zip

Saravanan A [Syncfusion]
Replied On March 26, 2007 09:18 PM

Hi Julien,

You can achieve this by handling FilterBarFilterCompleted event and FilterBarTextChanged event. When the new filter condition is selected remove the old filter condition.
Here is the code snippet.

string oldFilterString = "";

void theFilterBar_FilterBarFilterCompleted(object sender, GridFilterBarTextChangedEventArgs e)
{
oldFilterString = this.theFilterBar.RowFilter;
}

void theFilterBar_FilterBarTextChanged(object sender, GridFilterBarTextChangedEventArgs e)
{
if (oldFilterString != "")
{
string newFilterString = this.theFilterBar.RowFilter.Replace(oldFilterString + " and ", "");
this.theFilterBar.ResetFilterRow(gridDataBoundGrid1);
this.theFilterBar.RowFilter = newFilterString;
}
}

Regards,
Saravanan

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.

;