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

Setting column width hides filter drop-downs

Thread ID:





97773 Jan 6,2011 03:09 PM UTC Feb 14,2011 03:39 AM UTC WinForms 14
Tags: Grouping
Grant Crofton
Asked On January 6, 2011 03:09 PM UTC

Hi, I'm using v4.401.0.51, with a grid bound to a generic list of custom objects.

Everything generally works, and I have filtering enabled, but when I set either of two properties, the drop-down buttons in the filter bar disappear. (I can set the filter programatically, but it isn't visible).

I have various other properties set, but I can't find anything that's causing this specific problem. I have no idea why these properties are having this effect, as they appear to be completely unrelated to filtering.

The properties that cause the filter to stop working are:

myGrid.TableDescriptor.Columns("tim").Width = 100


myGrid.TableDescriptor.Columns("tim").Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide

Any thoughts?

Jisha Joy [Syncfusion]
Replied On January 7, 2011 12:13 PM UTC

Hi Grant,

We are unable to see the issue reported with filtering. Could you please provide us a simple sample that shows ths issue?. So that we could analyze it further.


Grant Crofton
Replied On January 11, 2011 09:58 AM UTC

In making the example to send you, it seems like the main thing causing the filter drop-downs to disappear is calling Application.DoEvents(), in this case before the grid is actually populated or set up.

Are you aware of this, or would you like me to send the example code?

Jisha Joy [Syncfusion]
Replied On January 13, 2011 07:21 AM UTC

Hi Grant,

We are not having any known issues with it. Could you please provide us a simple sample that shows ths issue?. So that we could analyze it further.


Grant Crofton
Replied On January 17, 2011 02:37 PM UTC

Please find example attached.

If you run the app, the drop-down buttons will not appear in the filter row. However, if you comment out line 16 (Application.DoEvents()) and run it again, the drop-downs will be there.

I've solved that problem now by changing our code around. However, I have another related problem which you can also see in the demo. If you run the app (with line 16 commented out), the filters appear - however, if you add an extra column by clicking the 'Add Column' button, that column does not have the filter drop-down.

That second problem is the most importan as I have no work-around for that, so if you can come up with any way to get around that, it would be good.



Jisha Joy [Syncfusion]
Replied On January 18, 2011 12:07 PM UTC

Hi Grant,

Please try enabling the AllowFilter property of the newly added column and let me know if this helps.

gridGroupingControl1.TableDescriptor.Columns["newly added column"].AllowFilter = true;


Grant Crofton
Replied On January 18, 2011 04:25 PM UTC

We set .AllowFilter = True for all columns (including the newly added one) in a loop, on line 78

Grant Crofton
Replied On January 24, 2011 09:57 AM UTC

Any news on this? Can you see that problem on the attached app?

We're still having this problem and can't find a workaround.

Jisha Joy [Syncfusion]
Replied On January 27, 2011 10:23 AM UTC


Please try adding the newly added unbound column to the VisibleColumns collection and try enabling its AllowFilter property.

// Adding to visible Columns collection of the grid
foreach (GridColumnDescriptor desc in gridGroupingControl1.TableDescriptor.Columns)
if( desc.Name != "UnBoundColumn1")
desc.AllowFilter = true;


Grant Crofton
Replied On February 1, 2011 04:55 PM UTC

That doesn't seem to make any difference, in our live app or the sample I sent. Have you managed to get the sample working using that code?

Jisha Joy [Syncfusion]
Replied On February 2, 2011 04:36 AM UTC

Hi Grant,

I have reviewed your sample. You are hiding the dropdown button in the filter dropdown by using the following code. That's why the filter dropdown is not showing. If we comment it out it will work properly.

.Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide


Grant Crofton
Replied On February 2, 2011 09:43 AM UTC

We did that to stop the date selectors being shown, and possibly other drop-downs. Is there a way of not showing these things without that line of code (and still maintaining the functional filters)?

Jisha Joy [Syncfusion]
Replied On February 7, 2011 10:54 AM UTC

Hi Grant,

You can handle QueryCellStyleInfo event and hide the cell buttons by checking the cell type.

Private Sub requestGrid_QueryCellStyleInfo(ByVal sender As System.Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs) Handles requestGrid.QueryCellStyleInfo
If e.TableCellIdentity.Column IsNot Nothing AndAlso e.TableCellIdentity.TableCellType = GridTableCellType.AnyRecordFieldCell Then
e.Style.ShowButtons = GridShowButtons.Hide
End If
End Sub


Grant Crofton
Replied On February 8, 2011 02:09 PM UTC

Unfortunately, removing this line:
.Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide

works on the demo, but not our real system. The same problem remains. If I get a chance, I'll try and make another demo which more accurately reflects our system, although it's quite time-consuming.

Mahendran [Syncfusion]
Replied On February 14, 2011 03:39 AM UTC

Hi Grant,

Thanks for your update.

Please send us a sample which reflects the issue with filter cell so that we could sort out the issue and provide you the exact solution.

We are awaiting for your sample.

Please let me know if you have any concerns.



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