or
function onchange(e) { var lst = $("#lstLPG").data("kendoListView"); }<div class="k-toolbar k-grid-toolbar"> <a id="addRoleButton" class="k-button k-button-icontext k-add-button" href="#"><span class="k-icon k-add"></span>Add new Role</a></div> @(Html.Kendo().ListView<iProjX.Models.RoleModel>(Model.Roles) .Name("rolesListView") .TagName("div") .ClientTemplateId("rolesList") .Editable() .Pageable() .DataSource(dataSource => dataSource .Model(model => { model.Id("RoleId"); model.Field(f => f.ProjectId).DefaultValue(Model.ProjectId); model.Field(f => f.Title); model.Field(f => f.Description);; }) .Events(e => e .Error("rolesListViewData_error") .Change("rolesListViewData_change") .RequestStart("rolesListViewData_requestStart")) .Create(create => create.Action("createRole", "Project")) .Read(read => read.Action("getRoles", "Project", new { projectId = Model.ProjectId })) .Update(update => update.Action("updateRole", "Project")) .PageSize(30) ) .Events(e => e .Change("rolesListView_change") .Edit("rolesListView_edit") .DataBound("rolesListView_databound")) )//View template<script type="text/x-kendo-template" id="rolesList"> <div class="roleView" > <div> ${Title} </div> <div> ${Description} </div> <div class="edit-buttons"> <a class="k-button k-button-icontext k-edit-button" href="\\#"><span class="k-icon k-edit"></span>Edit</a> <a class="k-button k-button-icontext k-delete-button" href="\\#"><span class="k-icon k-delete"></span>Delete</a> </div> </div></script>@model iProjX.Models.RoleModel<div class="roleView" id = "newRoleForm2" > @Html.ValidationSummary(true) @Html.HiddenFor(model => model.ProjectId) @Html.HiddenFor(model => model.RoleId) <div class="editor-label"> @Html.LabelFor(model => model.Title) </div> <div class="editor-field"> @Html.TextBoxFor(model => model.Title, new { style = "width:99%", maxlength = 100 }) <span data-for="Title" class="k-invalid-msg"></span> </div> <div class="editor-label"> @Html.LabelFor(model => model.Description) </div> <div class="editor-field"> @Html.TextAreaFor(model => model.Description, new { style = "width:100%; height:100px"}) <span data-for="Description" class="k-invalid-msg"></span> </div> <div class="edit-buttons"> <a class="k-button k-button-icontext k-update-button" onclick="updateClick()" href="\\#"><spanclass="k-icon k-update"></span>Save</a> <a class="k-button k-button-icontext k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span>Cancel</a> </div></div>public ActionResult BulkEdit([DataSourceRequest]DataSourceRequest request) { var NewAssets = db.TurnaroundDumps; DataSourceResult result = NewAssets.ToDataSourceResult(request); return Json(result, JsonRequestBehavior.AllowGet); }@(Html.Kendo().Grid<PcInventory_v1_1.Models.TurnaroundDump>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.AssetTag); columns.Bound(p => p.SerialNumber); columns.Bound(p => p.DeptId); columns.Bound(p => p.Location); }) .DataSource(dataSource => dataSource .Ajax() // Specify that the data source is of ajax type .Read(read => read.Action("BulkEdit", "Assets")) // Specify the action method and controller name ) .Pageable() )@model IEnumerable<Kendo.Mvc.Examples.Models.ProductViewModel>@(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.ProductName); columns.Bound(p => p.UnitPrice); columns.Bound(p => p.UnitsInStock); columns.Command(command => { command.Edit(); command.Destroy(); }); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(GridEditMode.PopUp) .DisplayDeleteConfirmation(true) .Window(buider => buider.Modal(true) .Resizable(c => c.Enabled(true)) .Animation(true) ) .CreateAt(GridInsertRowPosition.Top)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Server() .Model(model => model.Id(p => p.ProductID)) .Read("ServerEditing", "Grid") .Update("Update", "Grid") .Create("Create", "Grid") .Destroy("Destroy", "Grid") ))<script type="text/javascript"> $(document).ready(function() { $("form.k-edit-form").kendoValidator(); });</script>
@using AjaxControlToolkit.HTMLEditor; @model TriadUI.Models.SearchViewModel @{ ViewBag.Title = "Search"; } <head> <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/app.css")"/> <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/kendo/kendo.common.min.css")"/> <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/kendo/kendo.default.min.css")"/> <script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")"></script> <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.placeholder.js")"></script> <script type="text/javascript" src="@Url.Content("~/Scripts/kendo/kendo.all.min.js")"></script> </head> <div id="searchSect"> <div id="searchTabs"> @(Html.Kendo().TabStrip() .Name("searchTabs") .Events(events => events .Activate("onActivate") .Select("onSelect") ) .Items(items => { items.Add().Text("Subscriber") .Selected(true) .Content(@<text> <div id="subTab"> Subscriber Text @using (Ajax.BeginForm("SearchSubscriber", new AjaxOptions {UpdateTargetId = "subGrid"})) { <fieldset> <legend>Subscriber Search: </legend> <label id="subsrchTxt" style="float: left;"> (All fields are not required) ('*' = wildcard)</label><br /> <div id="subleftInput"> @Html.TextBoxFor(m => m.SearchFields.SubscriberName, new {placeholder = "Name", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.AddressLine1, new {placeholder = "Address Line 1", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.AddressLine2, new {placeholder = "Address Line 2", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.City, new {placeholder = "City", tabindex = "4", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.ZipCode, new {name = "zipCode", placeholder = "Zip Code", @class = "shortTextBox"}) @Html.DropDownListFor(z => z.SelectedState, Model.SearchInfoModel.StateSelectList, new {id = "ddlStates", @class = "shortSelectList"})<br /> @* Phone Type:<select id="Select1" tabindex="8"> <option value="1" title="Phone Number">Phone</option> <option value="2" title="Can be reached at?">Reached At</option> <option value="3" title="Fictional Telephone Number">Fict TN</option> </select>*@ @Html.TextBoxFor(m => m.SearchFields.PhoneNumber, new {@class = "mediumTextBox", placeholder = "Phone Number"})<br /> @Html.TextBoxFor(m => m.SearchFields.Email, new {name = "emailAddy", placeholder = "Subscriber Email", @class = "longTextBox"})<br /> </div> <div id="subsrightInput"> @Html.TextBoxFor(m => m.SearchFields.SubscriberId, new {name = "subsID", placeholder = "Subscriber ID", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.LocationId, new {name = "locID", placeholder = "Location ID", @class = "longTextBox"})<br /> <input type="text" name="ontSrl" placeholder="ONT Serial #" class="longTextBox"/><br /> <input type="text" name="stbSrl" placeholder="STB / Device Serial #" class="longTextBox"/><br /><br /> <input type="reset" title="Reset" tabindex="12" onclick="ClearFieldsForSubscriberSearch();" /> <input type="submit" title="Search" value="Search" tabindex="11" /> <br /> </div> <div class="subButtons"> </div> </fieldset> } </div> </text>); items.Add().Text("Location") .Content(@<text> <div id="locTab"> Location Text @using (Ajax.BeginForm("SearchLocation", new AjaxOptions { UpdateTargetId = "locationGrid" })) { <fieldset> <legend>Location Search: </legend> <label id="locsrchTxt" style="float: left;"> (All fields are not required) ('*' = wildcard)</label><br /> <div id="locleftInput"> @Html.TextBoxFor(m => m.SearchFields.AddressLine1, new { name = "addy1", placeholder = "Address Line 1", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.AddressLine2, new { name = "addy2", placeholder = "Address Line 2", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.City, new { name = "city", placeholder = "City", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.ZipCode, new { name = "zipCode", placeholder = "Zip Code", @class="shortTextBox"}) @Html.DropDownListFor(z => z.SelectedState, Model.SearchInfoModel.StateSelectList, new { id = "ddlStates", @class= "shortSelectList" })<br /> @Html.TextBoxFor(m => m.SearchFields.PhoneNumber, new { name="provNum" ,placeholder="Provisioned Number", @class = "mediumTextBox" }) </div> <div id="locrightInput"> @Html.TextBoxFor(m => m.SearchFields.LocationId, new { name = "locID", placeholder = "Location ID", @class = "longTextBox"})<br /> @Html.TextBoxFor(m => m.SearchFields.SubscriberId, new { name = "subsID", placeholder = "Subscriber ID", @class = "longTextBox"})<br /><br /> <input type="reset" title="Reset" tabindex="10" onclick="ClearFieldsForLocationrSearch();"/> <input type="submit" title="Search" value="Search" tabindex="9" /> </div> <div class="subButtons"> </div> </fieldset> } </div> </text>); items.Add().Text("Device") .Content(@<text> <div id="devTab"> Device text @using (Ajax.BeginForm("SearchDevice", new AjaxOptions { UpdateTargetId = "deviceGrid" })) { <fieldset> <legend>Device Search: </legend> @Html.TextBoxFor(m => m.SearchFields.EquipmentId, new { name = "devID", placeholder = "Device ID", @class = "longTextBox" })<br /> @Html.TextBoxFor(m => m.SearchFields.SubscriberId, new { name = "subsID", placeholder = "Subscriber ID", @class = "longTextBox" })<br /> @Html.TextBoxFor(m => m.SearchFields.LocationId, new { name = "locID", placeholder = "Location ID", @class = "longTextBox" })<br /> @Html.TextBoxFor(m => m.SearchFields.PhoneNumber, new { name="provNum" ,placeholder="Provisioned Number", @class= "longTextBox" })<br /> @Html.TextBoxFor(m => m.SearchFields.SubscriberName, new { name="subsName", placeholder="Subscriber Name" , @class= "longTextBox" })<br /> <div class="subButtons"> <input type="reset" title="Reset" tabindex="8" onclick="ClearFieldsForDeviceSearch();"/> <input type="submit" title="Search" value="Search" tabindex="7" /> </div> </fieldset> } </div> </text>); }) ) </div> </div> <div id="subGrid"> @if (Model.SubsriberSearchResults != null) { <table> <tr> <th> SubscriberId </th> <th> Name </th> <th> ContactEmail </th> <th> ContactPhone </th> </tr> @foreach (var subscriber in Model.SubsriberSearchResults) { <tr> <td>@subscriber.ID </td> <td>@subscriber.Name </td> <td>@subscriber.SubContactEmail </td> <td>@subscriber.SubContactPhone </td> </tr> } </table> } </div> <div id="locationGrid"> @if (Model.LocationSearchResults != null) { <table> <tr> <th> ID </th> <th> AddressLine1 </th> <th> AddressLine2 </th> <th> State </th> </tr> @foreach (var location in Model.LocationSearchResults) { <tr> <td>@location.ID </td> <td>@location.AddressLine1 </td> <td>@location.AddressLine2 </td> <td>@location.StateName </td> </tr> } </table> } </div> <div id="deviceGrid"> @if (Model.EquipmentSearchResults != null) { <table> <tr> <th> SerialNumber </th> <th> AssociatedSubscriberId </th> <th> Model </th> <th> Status </th> </tr> @foreach (var device in Model.EquipmentSearchResults) { <tr> <td>@device.SerialNumber </td> <td>@device.AssociatedSubscriberId </td> <td>@device.Model </td> <td>@device.Status </td> </tr> } </table> } </div> <div id="indexBottom"> <%Html.RenderPartial("News"); %> <%Html.RenderPartial("SubGrid");%> <%Html.RenderPartial("LocGrid"); %> <%Html.RenderPartial("DeviceGrid"); %> </div> @*<input type="submit" value="submit" />*@
