3063 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 437 Views |
-
[Solved] Searchable_fields sort?

31 January 2011 at 10:00pm
Overriding a textfield is pretty basic
static $searchable_fields = array(
"Title" => array(
"field" => "TextField",
"filter" => "PartialMatchFilter",
"title" => 'Caller Name'
)In Order to override the design of a Dropdown field, I placed
"Destinations.ID" => array(
"filter" => "ExactMatchFilter",
"title" => 'Destination'
)By removing the field in the array.
Is there a sort that I can place in the array? -
Re: [Solved] Searchable_fields sort?

1 February 2011 at 12:54am Last edited: 1 February 2011 12:54am
I don't know (and don't think so) - but would very much like this option too!
you might be able to hack it by overriding (in your ModelAdmin_CollectionController)
function getSearchQuery($searchCriteria){
$query = parent::getSearchQuery($searchCriteria);
//modify $query here
return $query;
}alternative is to have the best sort defined in the dataobject...
static $default_sort = 'Title ASC';
| 437 Views | ||
|
Page:
1
|
Go to Top |


