0
私はASP.NET MVCのDropDownList持って表示されません:ASP.NET MVCかみそりのDropDownList KendoGrid
@{var selectionList = new List<SelectListItem>
{
new SelectListItem { Text = "All Patients", Value="All Patients" },
new SelectListItem { Text = "Chosen Patients", Value="Chosen Patients" }
};
}
@Html.DropDownList("Selection",new SelectList(selectionList,"Value","Text"))
私はまた、リスト項目をクリックする前に隠してする必要がありKendoGrid持っている:「選ばれた患者を「:
<script type="text/javascript">
$('#CheckedPatientsRep').hide();
</script>
これはKendoGridです:
@(Html.Kendo().Grid<RunSummary>()
.Name("CheckedPatientsRep")
//.Events(events => events.DataBinding("onDataBinding"))
.DataSource(datasource => datasource
.Ajax().PageSize(25)
.ServerOperation(false)
.Sort(sort => sort.Add("UniqueId").Ascending())
.Read(read => read.Action("GetRunSummaries", "PatientReport")))
.Columns(columns =>
{
など 私はケンを表示したいと思いますDropDownListの "Chosen Patients"をクリックした後にdoGridを実行します。 KendoGridが最初に隠していないされ、第二は、クリックが動作しないということです。私は2つの問題を抱えている
<script>
$("#Selection").click(function() {
var selectedValue = $(this).find('option:selected').val();
if (selectedValue.toLower() == "chosen patients") {
$('#CheckedPatientsRep').show();
}
});
</script>
:これは、クリックのために私のコードです。これを解決するには?助けをありがとうございました。