I have four kendo checkboxes, one Apply button, and one data grid in MVC. When the Apply button is clicked, the grid should display the data from the data sources selected in the checkboxes. however, I have hard time to write the JavaScript in dataFilterApply to persist the checkbox new selections during the button click / page load. Currently, after I make new selections and click the apply button, the checkbox reset to default after page load. Also, after clicking the button, the web url changed from http://localhost:60470/ to http://localhost:60470/?source1CheckBox=true&source1CheckBox=false&source2CheckBox=true&source2CheckBox=false&source3CheckBox=true&source3CheckBox=false&source4CheckBox=true&source4CheckBox=false How can I get rid of the extra stuff?
<div class="dataSourceFilter">
@(Html.Kendo()
.CheckBox()
.Name("source1CheckBox")
.Checked(false)
.Label("Source1")
)
@(Html.Kendo()
.CheckBox()
.Name("source2CheckBox")
.Checked(true)
.Label("Source2")
)
@(Html.Kendo()
.CheckBox()
.Name("source3CheckBox")
.Checked(true)
.Label("Source3")
)
@(Html.Kendo()
.CheckBox()
.Name("source4CheckBox")
.Checked(true)
.Label("Source4")
)
@(Html.Kendo()
.Button()
.Name("gridApplyButton")
.HtmlAttributes(new { @class = "btnApply imageButton", title = "Data Source Filter" })
.Events(events => events.Click("dataFilterApply()"))
)
</div>
Aucun commentaire:
Enregistrer un commentaire