This is a migrated thread and some comments may be shown as answers.

Focus filter field

5 Answers 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paweł
Top achievements
Rank 1
Paweł asked on 01 Jul 2013, 12:05 PM
Hi,
I'd like to know whether it's possible to focus filtering control in the first column. Our customer want to speed up searching, so he doesn't want to click on textbox to filter - he just want to start typing text from keyboard and gets result asap.
I tried to add event in the constructor:

productsDG.FieldFilterEditorCreated += new EventHandler<Telerik.Windows.Controls.GridView.EditorCreatedEventArgs>(productsDG_FieldFilterEditorCreated);

void productsDG_FieldFilterEditorCreated(object sender, Telerik.Windows.Controls.GridView.EditorCreatedEventArgs e)
{
    if (e.Column.Header.ToString() == "Nazwa")
        e.Editor.Focus();
}

but it seems it doesn't work.

5 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 02 Jul 2013, 03:22 PM
Hello Paweł,

I'm not sure that I have understand your question. Will it be possible to share a bit more details? May I ask you to clarify what exactly would you like to achieve?

Looking forward to hearing from you!

Regards,
Yoan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Paweł
Top achievements
Rank 1
answered on 03 Jul 2013, 08:39 AM
Hello Yoan,

When I'm using radGridView, sometimes when I need, I'm changing filtering mode (depends on gridView) to:
FilteringMode="FilterRow"

Also I'm able to change the default FilterOperator by using:
productsDataGrid.FilterOperatorsLoading += new EventHandler<Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs>(productsDataGrid_FilterOperatorsLoading);
void productsDataGrid_FilterOperatorsLoading(object sender, Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs e)
{
  e.DefaultOperator1 = Telerik.Windows.Data.FilterOperator.Contains;
}

And that works great.

When I have FilteringMode="FilterRow" there are two controls in Fitlering - Label with column header and TextBox where I can type text to filter. And - somehow - I want to focus that TextBox. Let's say I created radGridView with 7 columns and I want to set focus to filtering TextBox in the first column. How can I do that?

I hope you understand what I mean ;-)
0
Accepted
Yoan
Telerik team
answered on 03 Jul 2013, 03:22 PM
Hi Paweł,


I can suggest you to check this forum thread where this question has already been discussed. Although the forum thread targets Silverlight, the same approach is applicable for WPF as well.


Regards,
Yoan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Paweł
Top achievements
Rank 1
answered on 03 Jul 2013, 03:37 PM
Thank you for your answer. I'll check it (probably in few days because of vacation).
0
Yoan
Telerik team
answered on 03 Jul 2013, 03:40 PM
Hi Paweł,

Then I will close this thread for now. Please, do not hesitate to open it, as soon as you have the time to test the mentioned approach.

 

Regards,
Yoan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Paweł
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Paweł
Top achievements
Rank 1
Share this question
or