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.

How do I remove the filter three fields

Thread ID:

Created:

Updated:

Platform:

Replies:

99102 Apr 27,2011 05:00 PM May 16,2011 03:08 PM Windows Forms 9
loading
Tags: GridControl
Tomio
Asked On April 27, 2011 05:00 PM

Good afternoon,
I own a gridGroupingControl, with two columns.
I also put the filter that comes in gridGroupingControl.
But in the filter appears by default: All, Custom ... Empty.
And then the list of column options.
Example filter column User:
(All)
(Custom. ..)
(Empty)
Alan
Roberth
Cleber
Eduardo
Diego

But I do not want these options appear in the filter:
(All)
(Custom. ..)
(Empty)

As I do I get those three filter options gridGroupingControl's column?

thank


Jisha Joy [Syncfusion]
Replied On May 3, 2011 05:49 AM

Hi Tomio,

To achieve this, you need to implement a custom filterbar cell deriving the cellmodel / cellrenderer from GridTableFilterBarCellModel / GridTableFilterBarCellRenderer. Please refer to the following Kb for more details,

http://www.syncfusion.com/support/kb/666/How%20do%20I%20hide%20the


Sample can be obtained form the following link,

http://help.syncfusion.com/samples/kb/grid.windows/GGCRemoveCustom/Custom.zip

Please let me know if this helps.

Regards,
Jisha




Tomio
Replied On May 5, 2011 10:53 AM

Thank you, It worked.

Only now am having another problem:

In the same gridGroupingControl is also possible to make grouping and filtering.

When not collated the width of the items are the Filter column width.

Only when it is grouped, the filter of the first column the width of the list items are smaller than the width of the column.

What do I do to keep the size of the column width?

segue um imagem do problema:

Tank



filter_cfac6eab.zip

Rajadurai C [Syncfusion]
Replied On May 9, 2011 05:15 AM

Hi Tomio,

Thanks for your update.

To set the width of the filter dropdown equal to that of respective column width, you can handle the TableControlCurrentCellShowingDropDown with the following code handled in it.

GridCurrentCell cc = e.TableControl.CurrentCell;
if (cc.Renderer is GridComboBoxCellRenderer)
{
GridComboBoxCellRenderer rend = cc.Renderer as GridComboBoxCellRenderer;
GridComboBoxListBoxPart lb = rend.ListBoxPart as GridComboBoxListBoxPart;

lb.Size = new Size(c, 100); //c is width of the column
}


Regards,
Rajadurai


Tomio
Replied On May 9, 2011 04:09 PM

Good afternoon.

Thanks for the help but did not work.

Remains the way it was

Follows a model of the problem in VB. And two pictures also show the problem.

I would resaltar that the problem only happens with the filter of the first column when the column is grouped.

Problem: the width of the filter list is smaller than the width of the column.

Tank


Tomio
Replied On May 10, 2011 09:46 AM

Good afternoon.

Thanks for the help but did not work.

Remains the way it was

Follows a model of the problem in VB. And two pictures also show the problem.

I would resaltar that the problem only happens with the filter of the first column when the column is grouped.

Problem: the width of the filter list is smaller than the width of the column.

Tank



Custom_5c36e863.rar

Tomio
Replied On May 10, 2011 09:59 AM

Good afternoon.

Thanks for the help but did not work.

Remains the way it was

Follows a model of the problem in VB. And two pictures also show the problem.

I would resaltar that the problem only happens with the filter of the first column when the column is grouped.

Problem: the width of the filter list is smaller than the width of the column.

Tank



Form1_28c2c611.rar

Tomio
Replied On May 10, 2011 10:03 AM

Good afternoon.

Thanks for the help but did not work.

Remains the way it was

Follows a model of the problem in VB. And two pictures also show the problem.

I would resaltar that the problem only happens with the filter of the first column when the column is grouped.

Problem: the width of the filter list is smaller than the width of the column.

Tank



Form1_9d640379.rar

Tomio
Replied On May 11, 2011 11:08 AM

Good morning.

I managed to solve the problem.
I got the code:

Private Sub gridgrouping_tablecontrolcurrentcellshowingdropdown(ByVal sender As System.Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs) Handles gridGrouping.TableControlCurrentCellShowingDropDown
Dim widthcollumn As Integer = gridGrouping.TableDescriptor.Columns(0).Width
If (e.Inner.Size.Width < widthcollumn) Then
widthcollumn += 17
e.Inner.Size = New Size(widthcollumn, e.Inner.Size.Height)
End If
End Sub

thank




Rajadurai C [Syncfusion]
Replied On May 16, 2011 03:08 PM

Hi Tomio,

We are glad to hear that your requirement had been achieved.

Thank you for using Syncfusion Products.

Regards,
Rajadurai


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.

;