<
li
>
<
label
class
=
"fieldName"
for
=
"CustomerName"
> Customer<
span
class
=
"red"
>*</
span
>:</
label
>
<
span
class
=
"fieldValue"
>
@(Html.Kendo().DropDownList()
.OptionLabel("Select ")
.Name("Customer")
.DataTextField("CustomerName")
.DataValueField("CustomerId")
.Value("CustomerId")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetCustomer", "AddFacility");
});
})
.Events(e => e.Change("dropdownlist_Validation"))
)
@Html.HiddenFor(m=>m.CustomerName)
<
div
id
=
"divcustomer"
>
@Html.Label("Required", new { @class = "red" });
</
div
>
<
script
type
=
"text/javascript"
>
function GetId() {
return {
Customer: $("#Customer").val()
};
}
</
script
>
@* @Html.ValidationMessageFor(model => model.CustomerName)*@
</
span
>
</
li
>
<
li
>
<
label
class
=
"fieldName"
for
=
"RegionName"
>Region<
span
class
=
"red"
></
span
>:</
label
>
<
span
class
=
"fieldValue"
>
@(Html.Kendo().DropDownList()
.OptionLabel("Select ")
.Name("Region")
.DataTextField("RegionName")
.DataValueField("RegionId")
//.Value("RegionId")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetRegion", "AddFacility")
.Data("filterRegion");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("Customer")
.Events(e => e.Change("dropdownlist_Validation"))
)
<
script
type
=
"text/javascript"
>
function filterRegion() {
return {
Customer: $("#Customer").val()
};
}
</
script
>
<
script
type
=
"text/javascript"
>
function GetId() {
return {
Region: $("#Region").val()
};
}
</
script
>
</
span
>
</
li
>
<
li
>
<
label
class
=
"fieldName"
for
=
"FacilityGroupName"
>Facility Group<
span
class
=
"red"
>*</
span
>:</
label
>
<
span
class
=
"fieldValue"
>
@(Html.Kendo().DropDownList()
.OptionLabel("Select ")
.Name("FacilityGroup")
.DataTextField("FacilityGroupName")
.DataValueField("FacilityGroupId")
.Value("FacilityGroupId")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetFacilityGroupName", "AddFacility")
//.Data("filterfacilitygroup")
.Data("filterfacilitygroup2");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("Region")
.CascadeFrom("Customer")
.Events(e => e.Change("dropdownlist_Validation"))
)<
div
id
=
"divfacilitygroupname"
>
@Html.Label("Required", new { @class = "red" });
</
div
>
@*<
script
type
=
"text/javascript"
>
function filterfacilitygroup() {
return {
Region: $("#Region").val()
};
}
</
script
>*@
<
script
type
=
"text/javascript"
>
function filterfacilitygroup2() {
return {
Customer: $("#Customer").val(),
Region: $("#Region").val()
};
}
</
script
>
<
script
type
=
"text/javascript"
>
function GetId() {
return {
FacilityGroup: $("#FacilityGroup").val()
};
}
</
script
>
</
span
>
</
li
>
public JsonResult GetCustomer()
{
var objCustomerName = CustomerNameTypeClient.GetCustomers().Select(CustomerT => new RegionModel
{
CustomerId = CustomerT.CustomerId,
CustomerName = CustomerT.CustomerName
});
return Json(objCustomerName, JsonRequestBehavior.AllowGet);
}
/// <
summary
>
/// Gets the region.
/// </
summary
>
/// <
returns
>Json</
returns
>
public JsonResult GetRegion(string Customer)
{
var VarRegionName = FacilityClient.GetRegion(Customer);
return Json(VarRegionName, JsonRequestBehavior.AllowGet);
}
/// <
summary
>
/// Gets the name of the facility.
/// </
summary
>
/// <
returns
>Json</
returns
>
public JsonResult GetFacilityGroupName(string Region, string Customer)
{
var VarFacilityGroupName = FacilityClient.GetFacilityGroup(Region, Customer);
return Json(VarFacilityGroupName, JsonRequestBehavior.AllowGet);
}
@model CashBatchesViewModel <div> @(Html.Kendo().AutoComplete() .Name("autocomplete") //.Filter("startswith") .Placeholder("Select Batch...") .Filter("contains") //.DataTextField("ProductName") .DataSource(source => { source.Read(read => read.Action("GetBatches", "Cash")); }) .Events(e => { e.Change("change").Select("select").Open("open").Close("close"); }) ) <label id="batchLabel" class="k-header">Batch label</label> </div> <div> </div> <script> function close() { //kendoConsole.log("event: close"); alert("Batch Auto Close"); }; function open() { //kendoConsole.log("event: open"); alert("Batch Auto Open"); }; function change() { //kendoConsole.log("event: change"); alert("Batch Auto Change"); }; function select(e) { //if ("kendoConsole" in window) { var dataItem = this.dataItem(e.item.index()); alert("event :: select (" + dataItem + ")"); //} }; </script>
I am trying to edit the cell programmatically in batch edit mode but it seems that after editCell method keyboard navigation does not work properly
See this fiddle for what I am attempting
Hello, I'm testing the checkboxes (treeview web), but I get error. The rest of the examples work very well.
This is the error.
Error 1 'Kendo.Mvc.UI.Fluent.TreeViewBuilder' does not contain a definition for 'Checkboxes' and no extension method 'Checkboxes' accepting a first argument of type 'Kendo.Mvc.UI.Fluent.TreeViewBuilder' could be found (are you missing a using directive or an assembly reference?) c:\kendoui.trial.2012.2.710\wrappers\aspnetmvc\Examples\Areas\razor\Views\web\treeview\index.cshtml 6 18 Kendo.Mvc.Examples
Just copy and replace (in index.cshtml) entire code:
http://demos.kendoui.com/web/treeview/checkboxes.html (checkboxes.cshtml)
Use the sample project (kendoui.trial.2012.2.710.zip).
I think the problem was.
@ using (Html.BeginForm ("Checkboxes", "TreeView" FormMethod.Post))
thank you very much