w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to do back end paging for jqgrid with mssql
here's one of the most mssql compare different paging techniques: http://www.mssqltips.com/sqlservertip/2696/comparing-performance-for-different-sql-server-paging-methods/ But I think we are much better off using the entity framework that is solved by using LINQ: var data = query.Skip((grid.PageIndex - 1) *grid.PageSize).Take(grid.PageSize).ToArray(); from: http://www.codeproject.com/Articles/58357/Using-jqGrid-s-search-toolbar-with-multiple-filter

Categories : Sql Server

ASP.net Gridview Events are not firing, that is paging or Select button but causes a post back instead
You code is working. However, here is what I found. GridView's onselectedindexchanged is attached to btnSearchParticipant_Click. I don't know the reason behinds it. onselectedindexchanged="btnSearchParticipant_Click" As the result, whenever gvParticipantResults_RowCommand is fired, btnSearchParticipant_Click is also fired.

Categories : Asp Net

MVC4 and KendoUI Grid. Problems connecting to datasource (KendoUI OpenSource)
Please try with the below code snippet. Let me know if any concern. VIEW <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css" rel="stylesheet" /> <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css" rel="stylesheet" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js"></script> <div id="Grid"> </div> <script> $(document).ready(function () { var dataSource = new kendo.data.DataSource({ transport: { read: { url: "Home/GetDummydata", dataType: "json" } } , schema: { data: function (data) {

Categories : Asp Net Mvc

JAVASCRIPT removeRow() function
That would be: function removeRow(element){ element.parentNode.removeChild(element); } removeRow(newDiv); That is, the removeChild method actually belongs to the element's parent, so you need to reference the parent first (by using parentNode) and then call the method removeChild over the newDiv element. Also, you have two elements with the same id: submitlink. And that is not good. If you rename your element, you could add a listener that call the removeRow function. <input type="button" id='doremove' value="" onClick="removeRow()" name="AGENDA"/> (Now the id is doremove) Now do something like this to make the removeRow function to be executed on click: document.getElementById('doremove').addEventListener('click', function(e) { removeRow(newDiv); }); Here is an exa

Categories : Misc

KendoUI Editor Template Issue With KendoUI Grid
This is likely markup added by BrowserLink. I recommend you disable it for this scenario. http://www.poconosystems.com/software-development/how-to-disable-browser-link-in-visual-studio-2013/

Categories : Asp Net Mvc

QSqlRelationalTableModel::removerow() deletes the row from table but not from the model
From QSqlTableModel::removeRows docs: Emits the beforeDelete() signal before a row is deleted. When the edit strategy is OnManualSubmit signal emission is delayed until submitAll() is called. So check the edit strategy you're using and try to call model->submitAll() after changes.

Categories : SQL

Unable to use paging despite enabling paging
You are not using PageIndexChanging event and you have to bind PageIndexChanging event and rebind your grid using current page. Html <asp:GridView ID="GVVerify" runat="server" OnPageIndexChanging="GridViewPageEventHandler" AllowPaging="True" AutoGenerateSelectButton="True" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" CssClass="gridviewadminverify" ForeColor="Black" OnSelectedIndexChanged="GVVerify_SelectedIndexChanged" Width="100%"> Code behind protected void grdView_PageIndexChanging(object sender, GridViewPageEventArgs e) { GVVerify.PageIndex = e.NewPageIndex; GVVerify.DataSource = GetGridData(); GVVerify.DataBind(); }

Categories : C#

Searching on 404 page returns back to 404 page back
I solved this problem via javascript <script type="text/javascript"> $("#btnSearch").attr("onclick", "Search('/Search.aspx?text=' + encodeURI($('#txtSearchInput').val())); return false;"); function Search(text) { location.href = text; } </script>

Categories : Asp Net

Kendo UI Grid: Method "removeRow" deletes all events of the grid
Please try with the below code snippet. VIEW <script> function gridDataBound(e) { var grid = $("#Grid").data("kendoGrid"); grid.tbody.find(">tr").click(function () { $("#divTest").html('Row Index Clicked :' + $(this).index()); }); } function DeleteRow(obj) { var rowToDelete = $(obj).parent().parent() var grid = $("#Grid").data("kendoGrid"); grid.removeRow(rowToDelete); } </script> @(Html.Kendo().Grid<MvcApplication1.Models.TestModels>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.ID); columns.Bound(p => p.Name); columns.Template(@<text></text>).ClientTemplate("<input type='button' class='k-button' value='Delete' onclick='DeleteRow(this);' />"); }) .Pageable() .Sortable() .Filterable

Categories : Kendo Ui

PHP Post Method returns back my PHP Source Code
First off, is this homework? The title of your HTML document would make it seem that way. If so, I don't want to give away the solution to you, as that wouldn't help your learning. Here's a hint though: Remember that PHP just executes right where it's at in the HTML document. Act as if you're writing an HTML document, then in places right where you need a dynamic value calculated (one you're not sure of in advance) you should put a PHP tag that calculates and prints out the HTML that should be there. Remember that any valid PHP code can go inside this PHP tag, so that's where you'll have your if/else statements to determine whether a value has been POSTed to the server.

Categories : PHP

class returns an empty page when pressed back button
You need to set the content in this Activity setContentView(R.layout.your_layout); Or what You want to do with this Activity shown above? Is there a reason why You haven´t done this?

Categories : Android

KendoUI implemention issue
If this is your HTML code: <div> <div> Combobox: <select id="combo"></select> </div> <div> <label> 100%: <input id="hundred" type="checkbox" data-bind="checked: option1"/> </label> </div> </div> And the JavaScript initialization of the combobox: $("#combo").kendoComboBox({ dataTextField : "text", dataValueField: "value", dataSource : [ { text: "0", value: "1" }, { text: "100%", value: "2" } ] }); You should define a handler for changes in the checkbox as follow: $("#hundred").on("change", function () { if ($(this).is(":checked")) { $("#combo").data("kendoComboBox").value(2) } }) Where I intercep

Categories : HTML

Out-of-the-box MVC ModelBinder for KendoUI AutoComplete
@David Perlman, I am completely editing this answer since I now understand your question better. In the Kendo example on Server Filtering they are using OData which has out of the box server filtering, something I was not aware of myself. If you use an MVC Controller like I do, you will have to modify the example and use a parameterMap like I will use in my new code example. In my example I have a simple table of "Sites" I use Entity Framework and I have a view wired directly to the Sites table. I have a class called Lookups.cs and I return a dynamic model GetSitesStartsWith(string startsWith) Like so: public dynamic GetSitesStartsWith(string startsWith) { return _context.vAaiomsSites .Select(s => new { ID = s.ID, Si

Categories : Asp Net Mvc

KendoUI Bar chart not working in IE8
WoW ! It took me a while to figure it out and debug it, but the problem is actually quite simple. categoryAxis: { categories: [CARREGADO,TENTATIVAS,ATENDIDO,CPC,BOLETOS ENVIADOS,BOLETOS PAGOS], labels: { visible: true, font: ".85em, Verdana, Helvetica, Sans-Serif", rotation: 0 } Just remove the comma right after ".85em" and you are good to go.

Categories : Javascript

kendoui: array in js Object
It's hard to say what is going wrong without some more context on what you're trying to do but just judging by the fact that it's a dataSource, try changing: key: [ key:value, key:value ... ], to: key: [ {key:value}, {key:value}, ... ],

Categories : Kendo Ui

KendoUi MultiSelect ItemTemplate
It isn't completely clear what you are trying to do, but there are a couple problems. First, a Kendo DataSource needs to take an array of data, not a single item, so this code is incorrect: parse: function (response) { var dataForTemplate = { Members: JSON.stringify(memberData) }; return { json: dataForTemplate }; } That should return an array, or also specify schema.data = "json.dataForTemplate" to tell the DataSource to pull the array of data from the json.dataForTemplate field of the returned object. Though it would be easier to just do: parse: function (response) { return dataForTemplate; } Second, it looks like you are trying to make a template for the entire multisele

Categories : Kendo Ui

KendoUI Image browser
It appears the ImageBrowser can technically be used outside of the Editor, but it is not officially supported. Here is a thread on the Telerik forum concerning this issue: http://www.telerik.com/forums/why-not-make-image-browser-in-editor-as-separate-controle Here are the most notable quotes: You can initialize an image browser widget from a regular element. The configuration is the same as when using the image browser inside an Editor. http://docs.kendoui.com/api/web/editor#imagebrowser-object <div id="imgBrowser"></div> $("#imgBrowser").kendoImageBrowser({ transport: { read: "/service/ImageBrowser/Read", destroy: { url: "/service/ImageBrowser/Destroy", type: "POST" }, create: { url: "/servi

Categories : Kendo Ui

Deployement not Rendering KendoUI
This means that for some reason the Kendo JavaScript or CSS files are missing on your deployment server. You can verify this by checking your browser's developer console (the "Network" tab) for any failing HTTP requests (404 status code). In a word make sure the Kendo JS and CSS files are being deployed successfully.

Categories : Asp Net Mvc

Using durandal with jaydata and kendoui
My best guess is that this is a timing issue, where the Grid is binding to vm.airports while it is still null, then vm.airports = airp.asKendoDataSource(); is called after it is already bound? Perhaps try something like: return airportRes.then(function (airp) { vm.airports.data(airp.asKendoDataSource().data()); });

Categories : Kendo Ui

Can we use jQueryUI and KendoUI at same time?
Kendo depends on jQuery! Therefore, yes you can have both of them at the same page. Different versions of Kendo depends on different versions of jQuery. Latest Kendo (such as 2013.1.319) works with jQuery 1.9. Upgrading your jQuery from 1.8.4 to 1.9 is quite fun (follow http://jquery.com/upgrade-guide/1.9/). If you are using some 3rd party js plugins/libs what are based on 1.8.4 in your project you might need to upgrade them too.

Categories : Javascript

Styling KendoUI combo box
Try this, .k-input, input.k-textbox, textarea.k-textbox, input.k-textbox:hover, textarea.k-textbox:hover, .k-textbox > input{ background-color: yellow !important; } .otherCombo .k-dropdown-wrap .k-input{ background-color: blue !important; } Demo:http://jsbin.com/ivoqup/12/edit

Categories : CSS

KendoUI Grid column autosizing
After playing with different options and hours of searching I've decided to use a little less elegant solution, but I've achieved what I was looking for. If someone faces similar problem, here is what I did: When the DOM loads ($(document).ready(...) or $(...) in jQuery), I call code to remove right padding-right of .k-grid-header and remove overflow-y of .k-grid-content. The code I've used: // jQuery code $(".k-grid-header").css("padding-right","0"); $(".k-grid-content").css("overflow-y","initial"); // JS (without jQuery) equivalent var gridHeaders = document.querySelectorAll(".k-grid-header"); for (var i = 0, element; element = gridHeaders[i++];) element.paddingRight = "0"; var gridContent = document.querySelectorAll(".k-grid-content"); for (var i = 0, element; element = gridC

Categories : CSS

Dynamically refresh KendoUI DropdownList
As a workaround I would use the select event on the Model drop down to fire off functionality to refresh your Fuel drop down and add a CascadeFrom("Make") to the Fuel drop down. This will fire the read action after the Make is selected and then refresh the Fuel drop down after a Model is selected. @(Html.Kendo().DropDownList() .Name("Model") .HtmlAttributes(new { style = "width:auto;height:25px" }) .OptionLabel("Model (any)") .DataTextField("Name") .DataValueField("ModelId") .DataSource(source => { source.Read(read => { read.Action("GetModels", "Home") .Data("FilterModels"); }) .ServerFiltering(true); }) .Enable(false) .AutoBind(false) .CascadeFrom("M

Categories : Kendo Ui

Extra info on KendoUI bulletchart
try this tooltip: { visible: true, format: "{0}%", template: "#= series.field #: #= value #,#= series.field #: #= value.target #%" } demo:http://jsbin.com/uriwaj/1/edit

Categories : Javascript

kendoUi grid, HTTPGET default
You can set the HTTP verb of any of your datasource action with the Type method on the CrudOperationBuilder class: .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("GetList", "Home") .Type(HttpVerbs.Get) .Data("additionalData")))

Categories : Asp Net Mvc

How to create a kendoui grid programmatically
Based on your comments, I would suggest creating a partial view containing the grid's markup, and then in the controller hydrate the model based on the user's input, and then return the partial view and the model. For example, public ActionResult GetCompanies(int companyId) { CompanyModel model = GetCompanies(companyId); return PartialView("_CompaniesGrid", model); }

Categories : Jquery

KendoUI Upload widget template
You put directly the HTML instead of invoking kendo.template with it. According the documentation it should be a template. : $("#files").kendoUpload({ async: { saveUrl: Configuration.BaseUrl + "/portaluserquote/SourceFileUpload", removeUrl: Configuration.BaseUrl + "/portaluserquote/RemoveSourceFileUpload", autoUpload: true }, template:kendo.template("<span class='k-progress'></span>"+ "<div class='file-wrapper'>"+ "<span class='file-icon #=addExtensionClass(files[0].extension)#'></span>"+ "<h4 class='file-heading file-name-heading'>Name: #=name#</h4>"+ "<h4 class='file-heading file-size-heading'>Size: #=size# bytes</h4>"+ "<button type='butto

Categories : Javascript

Kendoui Scheduler Year View
Kendoui now offers a timeline view that you can customize by overriding the calculateDateRange function, Have a look at this: http://www.telerik.com/forums/timeline-year-view

Categories : Asp Net Mvc

Can't Read KendoUI Dropdown List value
To fix this issue I had to change the function UpdateFilterParameters to as below, to either show the Id value or pass NULL. My code was failing when de-serialising the Json function UpdateFilterParameters() { var iMake = $("#Make").val(); var iModel = $("#Model").val(); var iFuel = $("#Fuel").val(); var ids = (iMake || "null") + "," + (iModel || "null") + "," + (iFuel || "null"); $('#Make').data("kendoDropDownList").dataSource.read( { FilterInfo: "{'Procedure':'GetMakes','Id':[" + ids + "]}" }); $('#Model').data("kendoDropDownList").dataSource.read( { FilterInfo: "{'Procedure':'GetModels','Id':[" + ids + "]}" }); $('#Fuel').data("kendoDropDownList").dataSource.read( { FilterInfo: "{'Procedu

Categories : Kendo Ui

KendoUI Autocomplete template using tables
As far as I can tell, tables aren't supported by the templating system. There's a HeaderTemplate property, but no FooterTemplate that you can use to close your table with. Source link: http://docs.kendoui.com/api/web/autocomplete#configuration-headerTemplate

Categories : Asp Net Mvc

kendoui ClientTemplate in Grid not working in asp.net mvc 4
Please try with the below code snippet. columns.Bound(a => a.ProviderId).ClientTemplate("<a href='" + @Url.Action("Toggle", "Access") + "/#: ProviderId #" + "'>Toggle...</a>");

Categories : Asp Net Mvc

KendoUI grid how to preventDefault during Rowselect
No event is triggered before the Change event, but you can clear your selection : function OnRowSelect(e){ if(!condition) { e.sender.clearSelection(); } }

Categories : Jquery

How do I get the changed element in a multiselect, using KendoUI?
There is no easy way (afaik) for knowing the changes. So, let do it by ourselves. First, I'm going to save the old value using the following function. function saveCurrent(multi) { multi._savedOld = multi.value().slice(0); } Where multi is the multi-select that we pass to the function as argument (so you can use the function for multiple multiselects). Then, you need to implement change as follow: change : function (e) { // Retrieve previous value of `multiselect` saved using previous function var previous = this._savedOld; // These are current values. var current = this.value(); // Let's save it for the next time saveCurrent(this); // The difference between previous and current are removed elements var diff = $(previous).not(current).get();

Categories : Javascript

KendoUI PanelBar Expand is not working
You should do: var ptemp = $("#paneltemp").kendoPanelBar().data("KendoPanelBar"); $("#expandbutton").click(function () { alert("Hello"); ptemp.expand($("li", ptemp.element)); }); Running example here: http://jsfiddle.net/OnaBai/P6ef6/

Categories : Kendo Ui

KendoUI Tabstrip aria-controls
Use the accesskey attribute and the keypress method: TabStrip / Keyboard navigation Pseudo Keypress in JavaScript

Categories : Debugging

KendoUI Grid without borders request
Try: .k-grid, .k-grid * { background: white !important; border: 0 !important; } This forces all background for k-grid to white removing gradients and background images and sets borders to 0px (no border).

Categories : Kendo Ui

KendoUI Slider, unequal steps
Your question is vague. But you can capture the change event and either increase or decrease by one if value is even. Fiddle Here <div id="wrapper"> <div id="equalizer"> <input class="eqSlider" value="15" /> </div> </div> var slider = $(".eqSlider").kendoSlider({ orientation: "vertical", min: 1, max: 10, smallStep: 1, largeStep: 2, change:SlideFunc, showButtons: false }); function SlideFunc(e) { //var sliderValue = slider.value(); var value = e.value; var modu = value % 2; if(modu == 0 && value > 1) { e.value = value - 1; } }

Categories : Javascript

How to access ViewModel using KendoUI Grid MVC
Nothing will be send to the server automatically will be available inside the action method. What I can suggest you is to send whatever you need to that action method with the help of the data function of the read configuration to send whatever you need. e.g. .DataSource(dataSource => dataSource.Ajax() .Read(read => read .Action("Read", "Home") .Data("additionalData") ) ) // -- removed for brevity <script> function additionalData() { return { userID: 42, search: $("#search").val() }; } </script>

Categories : Asp Net Mvc

Mongoose removes too many from ID
Try using Resource.findOneAndRemove Reference I've never used that but this is what I use and it works perfectly for me PostModel.findOne({_id: id}, function (err, result) { if (err) { throw err; } if (result) { PostModel.remove({_id: id}, function (err, result) { if (err) { throw err; } res.json(200, result); }); } });

Categories : Node Js

KendoUI chart - how do I show loading animation?
Displaying and hiding the loading animation is: // Display progress kendo.ui.progress($("#loading"), true); // Hide progress kendo.ui.progress($("#loading"), false); Then you should use requestStart and requestEnd events in the DataSource for knowing when to show or hide the progress animation. The DataSource of the Chart would be: dataSource : { transport : { read: { url:... } }, sort : { field: "year", dir : "asc" }, requestStart: function () { kendo.ui.progress($("#loading"), true); }, requestEnd : function () { kendo.ui.progress($("#loading"), false); } }, Example here: http://jsfiddle.net/OnaBai/kcptr/

Categories : Kendo Ui



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.