So this is my grid and what I need is to have it hidden when the page is rendered and to show it when I click the search Button. Any ideas??
@Html.WebCore().LinkButton(ButtonType.Zoeken, cssClass: "myZoekenButton")
@(Html.Kendo().Grid<AanvragenZoekenViewModel.ZoekResultaat>()
.Name("Grid")
.Columns(columns =>
{
...
columns.Bound(zoekResultaat => zoekResultaat.Opmerkingomschrijving).ClientTemplate("#= Opmerkingomschrijving#").Hidden(Model.DossierLijst);
})
...
.AutoBind(false)
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.Events(e => e.Error("onErrorhandling"))
.Model(model =>
{
})
.Read(read => read.Action(MVC.Dashboard.ActionNames.ReadItems, MVC.Dashboard.Name).Data("onReadAdditionalData"))
.PageSize(500)
)
)
Kendo grid doesn't have HIDE/SHOW property. You need to do this in JQuery.
At run time, kendo grid will convert it into DIV
tag.
you need to hide/show DIV tag in jquery.
(Div id will be name of grid )
Hide grid on page Load
$(document).ready(function() {
$( "#Grid" ).hide();
});
Show grid on button click
$('#button').click(function(){
$('#Grid').show();
});