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. Image for the cookie policy date

FilterBar stops setting initial focus to a grid

After adding a filterbar to a grid, I cannot set the initial focus to the grid. This means that RowLeave is not fired when leaving the first row. I have attached your FilterBarGrid example with the following changes :- - added bool useFilterBar. Setting useFilterBar=false, shows that RowLeave fired when leaving first row Setting useFilterbar=true, shows RowLeave NOT fired when leaving first row. - added code to set inital focus at end of your SetTableIntoGridAndWireFilterBar function - added RowLeave event handle that displays a message when leaving a row I''ve tried all sorts of ways to get round this to no avail. Have you any ideas? Not having RowLeave fired on the first row is my main problem. Regards, Mick testFilterBarGrid_5266.zip

3 Replies

AD Administrator Syncfusion Team April 6, 2005 12:59 PM UTC

Thank you for your sample. I see this problem in 3010, but it is corrected in the upcoming 3.2 release. If you want a work around now for 3010, you can avoid the problem by slightly postponing the moveto call. You can do this by moving the CurrentCellMoveTo call into a timer tick event. So, in place of your CurrentCell.MoveTo call, put Timer t = new Timer(); t.Interval = 50; t.Tick += new EventHandler(t_Tick); t.Enabled = true; This in the tick event, do: private void t_Tick(object sender, EventArgs e) { Timer t = sender as Timer; t.Enabled = false; t.Tick -= new EventHandler(t_Tick); gridDataBoundGrid1.Focus(); gridDataBoundGrid1.CurrentCell.MoveTo((useFilterBar) ?2:1,1,GridSetCurrentCellOptions.ScrollInView); }


MS Mick Speake April 6, 2005 01:41 PM UTC

Thanks for the quick reply, Clay. Any idea when 3.2 will be released? Mick


AD Administrator Syncfusion Team April 6, 2005 02:19 PM UTC

It is in the works, but I cannot say exactly when.

Loader.
Up arrow icon