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.

FilterBar in GridGroupingControl - Specific Columns?

Thread ID:

Created:

Updated:

Platform:

Replies:

78962 Jan 13,2009 11:55 AM Jun 13,2014 06:16 AM ASP.NET Web Forms (Classic) 10
loading
Tags: GridGroupingControl
Matthew Dudley
Asked On January 13, 2009 11:55 AM

I've had a brief look through the forums and couldn't find any information pertaining to this specific request... so here it is:

Is there any way to control explicitally, either at design-time or run-time which columns will contain a DropDownList for the filtering? I imagine one way would be to use custom filtering, but I'm just wondering if there's a way to do it with the built-in filter controls.

Additionally is there a way to disable the "custom (...)" button next to the DropDownList?

Many thanks :)


Matthew Dudley
Replied On January 15, 2009 07:13 AM

Update:

I had thought that if I disable the AllowFilter property of the column that this would remove the filter dropdown, however this wasn't the case:



Instead I've used the following in the DataBound event of the grid, however I want to know if there's a slicker way of achieving this?

[code]
protected void GridGroupingControl1_DataBound(object sender, EventArgs e)
{
for (Int16 i = 0; i < ((GridGroupingControl)sender).TableDescriptor.Columns.Count; i++)
{
if (i == 0 | i == 1 | i == 7 | i == 8)
((GridGroupingControl)sender).TableDescriptor.Columns[i].AllowFilter = true;
else
((GridGroupingControl)sender).TableDescriptor.Columns[i].AllowFilter = false;
}
}
[/code]

As you can see, I've checked specific column indexes in order to decide whether or not to show or hide the filter bar element.

Thanks,

Matt



Balaji K [Syncfusion]
Replied On January 16, 2009 09:21 AM

Hi Matt,

Thank you for your Interest in Syncfusion Products.

The above mentioned ways are the Best way to set the AllowFilter property.I would suggest you to iterate if you have many columns or you can directly specify in the page.

Please let us know if you have any queries.

Regards,
Balaji



Matthew Dudley
Replied On January 19, 2009 03:57 AM

Thanks for your response.

Unfortunately specifying directly in the page did not work for me so I had to use the iterative approach in code.

Could you check for me to see whether you are able to set specific columns for filter just using the page attributes?

Thanks,

Matt


Balaji K [Syncfusion]
Replied On January 20, 2009 04:26 AM

Hi Matt,

The Combo Filter has been depreciated so you will not be able to set for particular column in the page and we have come up with new FilterBarTextCell and ShowFilterBar.

Refer the below link to know more..

http://www2.syncfusion.com/ug_63/gridweb/FilterTextCell.html

Regards,
Balaji


Sherri Sanderson
Replied On May 28, 2010 10:52 PM

I just tried the link, but it gave me a 'page not displayed'. I'm also interested in only allowing filtering of certain columns. Thank you.

Bharath M [Syncfusion]
Replied On June 1, 2010 04:53 AM

Hi Sherri,

We regret for the inconvenience caused.

Could you please follow up with your query in the incident 68539, which you have created in DirectTrac?

Regards,
Bharath

Jeff O''Connell
Replied On October 27, 2010 03:18 PM

I'm having a real hard time finding out how to disable a filter combo for a particular column.

All searches on your site don't produce any solutions.

What's up with this feature. Is it available or not!

Jeff O'Connell


Bharath M [Syncfusion]
Replied On October 27, 2010 11:51 PM

Hi Jeff,

We regret for the inconvenience caused.

We can prevent displaying filter ComboBox in columns by using “QueryCellStyleInfo” event. Please refer the below code snippet to achieve this

[VB]
Private Sub GridGroupingControl1_QueryCellStyleInfo(ByVal sender As Object, ByVal e As GridTableCellStyleInfoEventArgs) Handles GridGroupingControl1.QueryCellStyleInfo

If e.TableCellIdentity.TableCellType = GridTableCellType.FilterBarCell Then

' Here we are removing filter for OrderID column
If e.TableCellIdentity.Column.Name = "OrderID" Then

' Setting None will remove the FilterControl from the filter bar
e.TableCellIdentity.TableCellType = GridTableCellType.None
End If

End If

End Sub


Let me know if you have any concerns.

Regards,
Bharath M


Jeff O''Connell
Replied On June 12, 2014 04:18 PM

Matthew,
 
did you ever get an answer to this aprt of your support question: 'Additionally is there a way to disable the "custom (...)" button next to the DropDownList?'
Thanks
Jeff

Satheeskumar S [Syncfusion]
Replied On June 13, 2014 06:16 AM

Hi Jeff,

We regret about the inconvenience caused,

Could you please follow up the incident 126170, which you have created in DirectTrac?. We have updated regarding this requirement in that incident.

Please let us know if you need any further assistance.

Regards,

Satheeskumar S


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.

;