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

Drop Down Filter

Thread ID:





58899 Mar 30,2007 12:02 PM UTC Apr 3,2007 07:10 AM UTC WinForms 4
Tags: GridControl
Vicko Hazdovac
Asked On March 30, 2007 12:02 PM UTC

I'm having trouble with the filter bar in gridgrouping control.
It works fine with the mouse, but if I navigate through it with the keyboard it does absolutely nothing. (it doesn't matter if I press Enter, Tab or space)
I've attached an example for you to see where the problem is.


haneefm [Syncfusion]
Replied On March 30, 2007 02:37 PM UTC

Hi Vicko,

you can try this code

void gridGroupingControl1_TableControlKeyDown(object sender, GridTableControlKeyEventArgs e)
if (e.Inner.KeyData == Keys.Tab
|| e.Inner.KeyData == Keys.Enter
|| e.Inner.KeyData == Keys.Right)
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = cc.Renderer.CurrentStyle as GridTableCellStyleInfo;
if (cc.IsDroppedDown
&& style != null
&& style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.FilterBar)
cc.MoveTo(cc.RowIndex, cc.ColIndex + 1);
e.Inner.Handled = true;

Best regards,

Vicko Hazdovac
Replied On April 2, 2007 08:41 AM UTC

It seems there's been a little misunderstanding, and it's my fault. I didn't describe my problem as well as I should have...
I didn't ask to be able to move through the columns using the keyboard (although it came in very handy, and I thank you for that). But, my problem is something else. Since I don't actually know how to describe it clear enough in a few words I've attached this word document with screenshots so you can see where the troubles lie. You know what they say : "Picture is worth a thousand words" :)


haneefm [Syncfusion]
Replied On April 2, 2007 11:33 PM UTC

Hi Vicko,

One way you can do this by hanlding the TablecontrolCurrentCellCloseDropDown event of the grid and call the filterbarRender.Model.Select() method to set the filter in a grid. Here is a code snippet

GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableFilterBarCellRenderer cr = (GridTableFilterBarCellRenderer)cc.Renderer;
if (cr != null)
GridTableCellStyleInfo tableStyleInfo = e.TableControl.Model[cc.RowIndex, cc.ColIndex]; ;
GridTableCellStyleInfoIdentity tableCellIdentity = tableStyleInfo.TableCellIdentity;
cr.Model.Select(tableCellIdentity, cr.ListBoxPart.SelectedIndex);
cr.SetTextBoxText(cr.GetFilterBarText(tableStyleInfo), false);

Best regards,

Vicko Hazdovac
Replied On April 3, 2007 07:10 AM UTC

This is exactly what I needed. Thank you very much.


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