Editing_Create
Editing_Update
Editing_Destroy
I am attaching a sample code for the same.
Regards,
Nandan
Please find the Updated attached file
<script type="text/javascript"> function filterModel() { return { VehicleType: $("#VehicleType").val(), Make: $("#Make").val() }; } </script>
<%: Html.Kendo().DropDownListFor(i => i.Make) .Name("Make") .DataTextField("Make") .DataValueField("Make_Code") .DataSource(source => { source.Read(read => { read.Action("GetCascadeMakes", "Home") .Data("VehicleType"); }) .ServerFiltering(true); }) .OptionLabel("Please Select") .CascadeFrom("VehicleType") .Enable(false) .AutoBind(false) %>
<%: Html.Kendo().ListView<Project.Models.ViewModel>() .Name("Model") .TagName("div") .ClientTemplateId("Models") .DataSource(datasource => { datasource.Read(read => read.Action("GetCascadeModels", "Home") .Data("filterModel")); }) .Selectable(selectable => selectable.Mode(ListViewSelectionMode.Multiple)) %>
Hey There I have the following code which looks ok to me (but i'm new to MVC), when I tab out of the combobox or submit the form no validation messages are displayed. After submitting to controller, the modelstate.Valid is True.
VIEW
<div class="field-label">
@Html.LabelFor(model => model.Name.TitleID)
</div>
<div class="feild-Entry">
@(Html.Kendo().ComboBoxFor(model => model.Name.TitleID)
.DataTextField("Description")
.DataValueField("ID")
.BindTo(Model.Titles)
)
@Html.ValidationMessageFor(model => model.Name.TitleID)
</div>
MODEL - Title Propery in Name Object
[Range(1, 5000) ]
[RequiredAttribute]
public int TitleID { get; set; }
HTML Output
<!-- Title-->
<div class="field-label">
<label for="Name_TitleID">TitleID</label>
</div>
<div class="feild-Entry">
<input data-val="true" data-val-number="The field TitleID must be a number." data-val-range="The field TitleID must be between 1 and 5000." data-val-range-max="5000" data-val-range-min="1" data-val-required="The TitleID field is required." id="Name_TitleID" name="Name.TitleID" type="text" value="0" /><script>
jQuery(function(){jQuery("#Name_TitleID").kendoComboBox({dataSource:[{"ID":0,"Code":null,"Description":"Not Selected"},{"ID":20,"Code":"","Description":"Captain"},{"ID":9,"Code":"","Description":"Dr"},{"ID":21,"Code":"","Description":"Judge"},{"ID":15,"Code":"","Description":"Miss"},{"ID":2,"Code":"","Description":"Mr"},{"ID":6,"Code":"","Description":"Mrs"},{"ID":19,"Code":"","Description":"Ms"},{"ID":23,"Code":"","Description":"President"},{"ID":27,"Code":"","Description":"Professor"},{"ID":22,"Code":"","Description":"Reverend"},{"ID":16,"Code":"","Description":"Sir"}],dataTextField:"Description",dataValueField:"ID"});});
</script>
<span class="field-validation-valid" data-valmsg-for="Name.TitleID" data-valmsg-replace="true"></span>
</div>
But no client side validation is displayed for the combo box, other text based input boxes show their validation i.e required etc...
Please Help, Im not sure whats going on here!!!
Hi,
Following is the code
<form id="Form1" runat="server">
<div id="ContentDiv">
<% Html.Kendo().Window()
.Name("ContactUsWindow")
.Title("Contact Us.")
.Draggable(false)
.Resizable(resizing => resizing
.MinHeight(300)
.MinWidth(300)
.MaxHeight(500)
.MaxWidth(500)
)
.Actions(actions => actions.Close())
.Content(() =>
{%>
<p>This is window Demo</p>
<%})
.Width(300)
.Height(300)
.Render();
%>
</div>
<% Html.Telerik().ScriptRegistrar()
.OnDocumentReady(() => {%>
var windowElement = $('#ContactUsWindow');
var undoButton = $('#undo');
undoButton
.bind('click', function(e) {
windowElement.data('tWindow').open();
undoButton.hide();
})
.toggle(!windowElement.is(':visible'));
windowElement.bind('close', function() {
undoButton.show();
});
<%}); %>
<span id="undo" class="t-group">Click here to open the window.</span>
</form>
When I close the window the undo button is not working. Is there something I missed to implement?
Regards,
Yeou