I'm really new to asp.net and Telerik...
I have a RadGrid with 开发者_开发问答filtering. I set AutoPostBackOnFilter="true" and CurrentFilterFunction="Contains" on my columns. Ok it works fine, user don't have to open drop-down list to select type of filter. But now, I want to hide filter buttons.
Possible ?
Thank you !
You can use this :
<script type="text/javascript">
function showFilterItem(){
$find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();
}
function hideFilterItem(){
$find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();
}
</script>
If you want to know more about Telerik Grids in ASP.Net, looak at the demos, there you can see samples of code : http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx
You can call .Filterable(false)
on the column definition.
@{ Html.Telerik().Grid(Model)
.Name("Grid")
.DataKeys(keys => keys.Add(m => m.ID))
.Columns(columns =>
{
columns.Bound(m => m.Name).Filterable(false);
columns.Bound(m => m.Category).Filterable(false);
}
}
精彩评论