One of the common tasks when using grids is placing form controls in cells like textbox, select, buttons, hyperlinks, etc. This is actually not difficult in jqGrid, but it is not very obvious how to do so.
You must get familiar with...
In a previous post, we showed how to pass custom data from jqGrid to the MVC controller. In this post, we will show how to do the reverse, we will pass custom data from the MVC controller to the jqGrid.
You need to use the userdata...
jqGrid is one of the best free grids that uses JQuery. One of the not-so-obvious features of jqGrid is posting custom data to the ASP.NET MVC controller. This is is similar to the data property when doing Ajax calls in JQuery.
To post...
Adding printing functionality to web pages is a common task. And you do not need JQuery for this, as there is an existing function in JavaScript which you can use to pop-up the Print Page dialog from the browser.
The code to...
You can easily achieve the autogrow of text areas using JQuery. This feature is not built-in though. You have to download the autogrow plugin from the JQuery website and add it to your scripts.
Then whenever you change the content of...
Creating plugins in JQuery is not difficult and in fact, it is just as easy and fun as using the library. To show that this is the case, let's create a tooltip plugin which you can use to show quick info on your HTML fields.
Our...
JQuery has the option of disabling caching in ajax calls -- an important feature especially for web sites where calls are most posts and transactional. You can add this line to your ajax call to make it not cache the results:
cache:...
Formatting numbers to have commas is a common task. Currently, there are no built-in functions in JQuery for this. Here is a function which you can add to your Javascript library for formatting numbers.
Commafy: function (nStr) {
...
One of the frequent requirements when developing long web pages is scrolling back to the top of the page. You can do this easily using JQuery. Not only is it easy to do, but you can do it with animation, you can make it as fast or as...