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

automatic filter

2 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
NightFlash
Top achievements
Rank 1
NightFlash asked on 14 Dec 2010, 05:16 PM
Hi,

My customer really likes the radGrid in combination with LINQ. But since he only use the filter "Contains" in the grid, he would like when you press "enter" the grid starts the search command with "Contains". Like that he doesn't need to use his mouse anymore to navigate in the filter menu. Is this possible? If so, can someone explain it to me, would be really helpfull!

Second question, way less important... is it possible to hide to search button and only leave the textfield.

Best regards,
Kevin

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Dec 2010, 05:54 AM
Hello Kevin,

You can use the CurrentFilterFunction  property of the GridColumn object to specify the default filter function and set ShowFilterIcon property as 'false' to hide the filter icon. You need to set AutoPostBackOnFilter property of a column to True, which in turn causes a postback filter operation when the user types a filter in the filter box and presses [Enter] from the keyboard.

ASPX:
<telerik:GridBoundColumn UniqueName="FirstName" DataField="FirstName" HeaderText="FirstName"
      AndCurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
  </telerik:GridBoundColumn>

Please take a look at the following documetation for more information on this.
Basic filtering

Thanks,
Princy.
0
NightFlash
Top achievements
Rank 1
answered on 15 Dec 2010, 04:27 PM
Thank you very much!
Tags
Grid
Asked by
NightFlash
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
NightFlash
Top achievements
Rank 1
Share this question
or