An Editable Grid with jQuery, Bootstrap, and Shield UI Lite
Shield UI Lite is an open source jQuery library that includes, among other components, a jQuery grid. The grid supports editing out-of-the-box, as well as sorting, grouping, and different column editors.
About Shield UI Lite
The Shield UI Lite Suite is one of the newest open source libraries on the market and what is specific about it is that it contains a wealth of components, all of which are feature rich and mature. This includes the jQuery Grid, which supports all important web grid operations out-of-the-box. The component supports editing with either inline or standard edit form editing, as well as editing with an external form. Also supported is cell editing.
In addition to this, the Shield UI Grid has a built-in datasource component, which facilitates the binding to all types of data – from local JSON structures, to remote web services; the built-in DataSource also takes care of all delete, update and insert operations.
For data-heavy applications, the Shield UI jQuery widget offers an enhanced virtual scrolling feature significantly improves performance, even when working with millions of real data records. To see more examples of the component and its options, you can refer to the online demos or the documentation.
Using the Code
For the editable grid that we’ll be creating, I’m using a local data source in order to keep things simple. The source code for the libraries can be found on GitHub. The full sample code, along with all sample data used, as well as additional CSS is available in the CodePen demo.
The first step in setting up the layout is to use a standard Bootstrap container. In our case, this is a
div with a Bootstrap panel nested inside. Since any standard web grid component usually hosts a lot of data, our layout spans the full width of the screen.
The code for this step is straightforward and looks like this:
<div class=”panel panel-default”>
<h4 class=”text-center”>Bootstrap Editable jQuery Grid
<span class=”fa fa-edit pull-right bigicon”></span></h4>
<div class=”panel-body text-center”>
The inclusion of these resources is demonstrated below:
<link rel=”stylesheet” href=”shieldui-lite.min.css”>
Setting up the Grid
There are two logical parts in describing the component. The first is handling the datasource for the data that will be visualized in the grid, and the other one is setting up the columns, which will be actually rendered, as well as any additional settings, such as sorting, hover effects, etc.
Continue reading %An Editable Grid with jQuery, Bootstrap, and Shield UI Lite%