or
<tr><td class=view><font color=red>Third Phone Type</td><td class=view><input type=hidden name="oldfield13" value="Not Given"><select id="i13" class=view name="field13"> <option value=""></option> <option selected value="Not Given">Not Given</option> <option value="Home">Home</option> <option value="Office">Office</option> <option value="Mobile">Mobile</option> <option value="Direct Dial">Direct Dial</option> <option value="Primary">Primary</option> </select> </td></tr> <tr><td class=view>Contact EMail Address</td><td class=view><input type=hidden name="oldfield14" value="xxxx23285@gmail.com"><input type=text class=view name=field14 value="arun23285@gmail.com"></td></tr> <tr><td class=view>Payslip EMail Address</td><td class=view><input type=hidden name="oldfield15" value=""><input type=text class=view name=field15 value=""></td></tr> <tr><td class=view><font color=red>Gender</td><td class=view><input type=hidden name="oldfield16" value="Female"><select id="i16" class=view name="field16"> <option value=""></option> <option value="Not Given">Not Given</option> <option value="Male">Male</option> <option selected value="Female">Female</option> </select> </td></tr> <tr><td class=view>Date of Birth</td><td class=view><input type=hidden name="oldfield17" value="1 July 1986 00:00:00"><input id="i17" type=text class=view name=field17 value=""></td></tr>
<script> $(document).ready(function() { $("#i17").kendoDatePicker({format:"dd MMM yyyy"}) }); </script>I pick a date, when I close the datepicker window, the value has filled in on the text box, and then when I post, I have a debug routine that reads all the posted data, and displays it in a table. I get this (amongst other stuff)then some time later, at the end, I have
| oldfield13 | Not Given |
| field13 | Not Given |
| oldfield14 | xxxx23285@gmail.com |
| field14 | xxxx23285@gmail.com |
| oldfield15 | |
| field15 | |
| oldfield16 | Female |
| field16 | Female |
| oldfield17 | 1 Jan 1900 00:00:00 |
| oldfield18 | Indian |
| field18 | Indian |
_attachUids: function(b, d) { var e = this, f, g = c.attr("uid"); b = b || e.root, d = d || e.dataSource, f = d.view(), b.children("li").each(function(b, c) { c = a(c).attr(g, f[b].uid), e._attachUids(c.children("ul"), f[b].children) })@Html.LabelFor(model => model.Incident.RequestType)@Html.DropDownListFor(model => model.Incident.RequestType, new SelectList(Model.RequestTypes, null, "Name"))@Html.ValidationMessageFor(model => model.Incident.RequestType) <script> $(function() { $('#Incident_RequestType').change(function () { var elems = document.getElementsByTagName('*'), i; for (i in elems) { if ((' ' + elems[i].className + ' ').indexOf(' k-input ') > -1) { elems[i].innerHTML = ''; } } // Get new datasource var subjectDataSource = new kendo.data.HierarchicalDataSource({ transport: { read: { dataType: "json", type: "POST", url: "/Incident/GetSubjectsByRequestType/", data: { //additional parameters sent to the remote service requestType: function () { return $("#Incident_RequestType").val(); } } } }, schema: { model: { id: "RequestType", hasChildren: "HasChildren", children: "Children" } } }); // Update datasource on treeview subjectDataSource.read(); $("#treeview").kendoTreeView({ dataSource: subjectDataSource, dataTextField: ["Title", "Title"], loadOnDemand: false }).data("kendoTreeView"); }); }); </script><script type="text/javascript"> function OnToggleClick(e) { e.preventDefault(); alert("Command has been clicked"); } function OnRowSelect(e) { e.preventDefault(); alert(this.dataItem(this.select()).ID); }</script>@{Html.Kendo().Grid<MyModel>() .Name("MyGridName") .DataSource(db => db.Ajax() .Model(o => o.Id(x => x.ID)) .PageSize(20) .Create("InsertNewRecord", "Setup") .Read("GetRecords", "Setup") ) .Events(ev => ev.Change("OnRowSelect")) .Columns(col => { col.Bound(o => o.ID).Title("ID"); col.Bound(o => o.Field1).Title("Field1"); col.Bound(o => o.Field2).Title("Field2"); col.Bound(o => o.IsActive).Title("ToggleMe"); col.Command(com => { com.Custom("ToggleActive").Text("Toggle").Click("OnToggleClick"); }).Width(80); }) .ColumnMenu().Pageable().Filterable().Sortable().Selectable() .Scrollable(scroll => scroll.Height(340)) .Render();}app = new kendo.mobile.Application(document.body);