Quantcast
Channel: Angular, Vue, React, Web Components, Javascript, HTML5 Widgets
Viewing all 306 articles
Browse latest View live

Fluid Layout with Fixed Header and Footer

$
0
0
In this post, we will create a simple Web Page with Fluid Layout. It will be with three areas – Header, Content and Footer. The Header and Footer areas will be with fixed height. In the Content area, we will add the jqxSplitter widget.

1. Add references to the required JavaScript and CSS files:

    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
<script type="text/javascript" src="../../scripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxsplitter.js"></script>


2. Set the page’s width and height to 100%. The CSS below will make the body element to fit to the browser’s window.

    <style type="text/css">
html, body {
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
overflow: hidden;
}
</style>


3. Create the HTML markup.

In our sample, we have three main DIV tags with absolute position – Header, Content and Footer. The CSS width property is set to 100%. The Header and Footer CSS height property is set to a pixel-based value.
The interesting part is the initialization of the Content. We set its CSS width and height properties to 100%. If we do only that, the element will fit to the window’s bounds. As we want to see our Header and Footer areas, we set its padding-top, padding-bottom and box-sizing CSS properties. By setting the box-sizing property to border box, the element’s height will be calculated by subtracting the top and bottom padding i.e that allows us to have flexible height and width for the Content and fixed height for the Header and Footer areas.

<body>
<div style="position: absolute; width: 100%; height: 100px; background: cyan;">
Header
</div>
<div style="position: absolute; box-sizing:border-box; padding-top: 100px; padding-bottom: 50px; width: 100%; height: 100%;">
<div id="mainSplitter">
<div>
Left Panel
</div>
<div>
<div id="rightSplitter">
<div>
Top-Right Panel
</div>
<div>
Bottom-Right Panel
</div>
</div>
</div>
</div>
</div>
<div style="position: absolute; bottom: 0; background: lightgreen; width: 100%; height: 50px;">
Footer
</div>
</body>


4. The last step is to create a Three-Pane Split layout that fits to the Content area. In order to achieve that, you can use the script below:

    <script type="text/javascript">
$(document).ready(function () {
$('#mainSplitter').jqxSplitter({ width: '100%', height: '100%', panels: [{ size: '20%' }, { size: '80%' }] });
$('#rightSplitter').jqxSplitter({ height: '100%', orientation: 'horizontal', panels: [{ size: '80%', collapsible: false }, { size: '20%' }] });
});
</script>

The post Fluid Layout with Fixed Header and Footer appeared first on Javascript, HTML5, jQuery Widgets.


jQWidgets 2.8.1

$
0
0
We are happy to announce the availability of jQWidgets ver. 2.8.1.

Below, you can find the list of changes in the new version.

What’s New:

- Added WAI-ARIA support.
- Added Bootstrap and Web themes.

What’s Fixed:

- Fixed an issue in jqxCalendar regarding the rendering of the focused cell in the Year view.
- Fixed an issue in jqxListBox regarding the “selectItem” method when the items in the ListBox are grouped.
- Fixed an issue in jqxListBox regarding the rendering of empty items.
- Fixed an issue in jqxGrid regarding the horizontal scrolling of pinned columns when the Grid is empty.
- Fixed an issue in jqxGrid regarding the update of Grid cells when the Grid is filtered and the data source is observable array.
- Fixed an issue in jqxGrid regarding the Date Range filter when the range is not entered.
- Fixed an issue in jqxGrid regarding the save/load state functionality. The date filter was not loaded correctly in IE7 and IE8.
- Fixed an issue in jqxGrid regarding the horizontal scrollbar’s max value when the vertical scrollbar is not visible.
- Fixed an issue in jqxGrid regarding the rowid parameter value of the ‘updaterow’ callback after cells editing.
- Fixed an issue in jqxGrid regarding the Export to Excel when the Grid has aggregates.


You can download the latest bits from: http://www.jqwidgets.com/download.

The post jQWidgets 2.8.1 appeared first on Javascript, HTML5, jQuery Widgets.

DataGrid Column with Custom CSS Styling

$
0
0
From this post, you will learn how to set a custom CSS class to a Grid column.

1. Create the CSS class.
        .column {
background-color: #034FCD;
color: white;
font-weight: bold;
}
2. When you initialize a DataGrid column, set its “cellclassname” to “column”.
{ text: 'Name', cellclassname: 'column', dataField: 'firstname', width: 100 }
The complete code is below:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.bootstrap.css" type="text/css" />
<script type="text/javascript" src="../../scripts/jquery-2.0.0.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.columnsresize.js"></script>
<style>
.column {
background-color: #034FCD;
color: white;
font-weight: bold;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
// prepare the data
var data = new Array();
var firstNames =
[
"Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene"
];
var lastNames =
[
"Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier"
];
var productNames =
[
"Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist"
];
var priceValues =
[
"2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0"
];
for (var i = 0; i < 200; i++) {
var row = {};
var productindex = Math.floor(Math.random() * productNames.length);
var price = parseFloat(priceValues[productindex]);
var quantity = 1 + Math.round(Math.random() * 10);
row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
row["productname"] = productNames[productindex];
row["price"] = price;
row["quantity"] = quantity;
row["total"] = price * quantity;
data[i] = row;
}
var source =
{
localdata: data,
datatype: "array",
datafields:
[
{ name: 'firstname', type: 'string' },
{ name: 'lastname', type: 'string' },
{ name: 'productname', type: 'string' },
{ name: 'quantity', type: 'number' },
{ name: 'price', type: 'number' },
{ name: 'total', type: 'number' }
]
};
var dataAdapter = new $.jqx.dataAdapter(source);
$("#jqxgrid").jqxGrid(
{
width: 670,
source: dataAdapter,
theme: 'bootstrap',
columnsresize: true,
columns: [
{ text: 'Name', cellclassname: 'column', dataField: 'firstname', width: 100 },
{ text: 'Last Name', dataField: 'lastname', width: 100 },
{ text: 'Product', editable: false, dataField: 'productname', width: 180 },
{ text: 'Quantity', dataField: 'quantity', width: 80, cellsalign: 'right' },
{ text: 'Unit Price', dataField: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
{ text: 'Total', dataField: 'total', cellsalign: 'right', minwidth: 100, cellsformat: 'c2' }
]
});
});
</script>
</head>
<body class='default'>
<div id="jqxgrid">
</div>
</body>
</html>

The post DataGrid Column with Custom CSS Styling appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets 2.8.2

$
0
0
We are happy to announce the availability of jQWidgets 2.8.2.
Please, find below the full list of changes in the new version:

What’s New:

- jqxChart axis position property allowing to position x and y axes on any side of the chart.
- jqxChart axis padding property allowing to set space between adjacent axes.

What’s Improved:

- jqxTree – added addBefore, addAfter and updateItem API methods.
- jqxGrid – improved XML binding. It is now possible to load data from the XML attributes.
- jqxChart – improved date string handling in old IE browsers.
- jqxChart – prevent chart refersh when the host element is not visible.

What’s Fixed:

- Fixed an issue in jqxButtonGroup regarding the dynamic changing of themes.
- Fixed an issue in jqxComboBox regarding the getSelectedItem method. Results were incorrect when the auto-complete is enabled.
- Fixed an issue in jqxChart regarding the minor tickmarks overflow.
- Fixed an issue in jqxChart with clipping chart legend when it doesn’t fit properly.
- Fixed an issue in jqxChart regarding the gradient fill with multiple chart instances in Firefox browser.
- Fixed an issue in jqxDateTimeInput in FF regarding Date editing.
- Fixed an issue in jqxDateTimeInput regarding the Today and Clear footer buttons.
- Fixed an issue in jqxGrid regarding the inline editing of numeric values using the textbox editor.
- Fixed an issue in jqxGrid regarding the row details rendering when the autoheight and autorowheight properties are enabled.
- Fixed an issue in jqxGrid regarding the Knockout Integration – the issue was related with the rows delete.
- Fixed an issue in jqxGrid regarding the Export to Excel of cells with integer values.
- Fixed an issue in jqxGrid regarding the Export to Excel. The exported data can now be opened from OpenOffice.
- Fixed an issue in jqxSlider regarding the rendering of the range bar.
- Fixed an issue in jqxMenu regarding the autoOpen functionality when a top-level menu item without anchor tag is clicked.
- Fixed an issue in jqxDateTimeInput regarding the ‘change’ event triggering. The event was incorrectly triggered more than once after selection.

If you have any technical questions about the new version, please send an e-mail to: support@jqwidgets.com.

You can download jQWidgets 2.8.2 from: http://www.jqwidgets.com/download

The post jQWidgets 2.8.2 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets Theme Builder

$
0
0
We are very pleased to announce that the jQWidgets Theme Builder tool has been just updated. The new version comes with multiple new features and additional styling options. To help you build new themes, we implemented a feature that enables you to import an existing theme and style it with a few clicks.

Build your own Theme now using the jQWidgets Theme Builder.

The post jQWidgets Theme Builder appeared first on Javascript, HTML5, jQuery Widgets.

jQuery Menu with Auto Height

$
0
0
In this post we will show you how to display a horizontal menu which automatically adjusts its height depending on its width and wraps the menu items on new lines. 1. Add the required JavaScript and CSS files.
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.bootstrap.css" type="text/css" />
<script type="text/javascript" src="../../scripts/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
2. Add the HTML structure of the Menu.
          <div id='jqxMenu' style='visibility: hidden; margin-left: 5px;'>
<ul>
<li><a href="#Home">Home</a></li>
<li>Solutions
<ul style='width: 250px;'>
<li><a href="#Education">Education</a></li>
<li><a href="#Financial">Financial services</a></li>
<li><a href="#Government">Government</a></li>
<li><a href="#Manufacturing">Manufacturing</a></li>
<li type='separator'></li>
<li>Software Solutions
<ul style='width: 220px;'>
<li><a href="#ConsumerPhoto">Consumer photo and video</a></li>
<li><a href="#Mobile">Mobile</a></li>
<li><a href="#RIA">Rich Internet applications</a></li>
<li><a href="#TechnicalCommunication">Technical communication</a></li>
<li><a href="#Training">Training and eLearning</a></li>
<li><a href="#WebConferencing">Web conferencing</a></li>
</ul>
</li>
<li><a href="#">All industries and solutions</a></li>
</ul>
</li>
<li>Products
<ul>
<li><a href="#PCProducts">PC products</a></li>
<li><a href="#MobileProducts">Mobile products</a></li>
<li><a href="#AllProducts">All products</a></li>
</ul>
</li>
<li>Support
<ul style='width: 200px;'>
<li><a href="#SupportHome">Support home</a></li>
<li><a href="#CustomerService">Customer Service</a></li>
<li><a href="#KB">Knowledge base</a></li>
<li><a href="#Books">Books</a></li>
<li><a href="#Training">Training and certification</a></li>
<li><a href="#SupportPrograms">Support programs</a></li>
<li><a href="#Forums">Forums</a></li>
<li><a href="#Documentation">Documentation</a></li>
<li><a href="#Updates">Updates</a></li>
</ul>
</li>
<li>Communities
<ul style='width: 200px;'>
<li><a href="#Designers">Designers</a></li>
<li><a href="#Developers">Developers</a></li>
<li><a href="#Educators">Educators and students</a></li>
<li><a href="#Partners">Partners</a></li>
<li type='separator'></li>
<li>By resource
<ul>
<li><a href="#Labs">Labs</a></li>
<li><a href="#TV">TV</a></li>
<li><a href="#Forums">Forums</a></li>
<li><a href="#Exchange">Exchange</a></li>
<li><a href="#Blogs">Blogs</a></li>
<li><a href="#Experience Design">Experience Design</a></li>
</ul>
</li>
</ul>
</li>
<li>Company
<ul style='width: 180px;'>
<li><a href="#About">About Us</a></li>
<li><a href="#Press">Press</a></li>
<li><a href="#Investor">Investor Relations</a></li>
<li><a href="#CorporateAffairs">Corporate Affairs</a></li>
<li><a href="#Careers">Careers</a></li>
<li><a href="#Showcase">Showcase</a></li>
<li><a href="#Events">Events</a></li>
<li><a href="#ContactUs">Contact Us</a></li>
<li><a href="#Become an affiliate">Become an affiliate</a></li>
</ul>
</li>
</ul>
</div>
3. Create the Menu.
        <script type="text/javascript">
$(document).ready(function () {
$("#jqxMenu").jqxMenu({ width: '100%', theme: 'bootstrap' });
$("#jqxMenu").css('visibility', 'visible');
});
</script>
4. The result:

The post jQuery Menu with Auto Height appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets 2.9

$
0
0
We are happy to announce the availability of jQWidgets ver. 2.9. This release brings multiple new features and widgets like jqxTreeMap, jqxPasswordInput and the jqxResponse plug-in which will help you to build responsive and cross browser compatible web applications.

What’s New:

- New Widgets: jqxTreeMap, jqxPasswordInput.
- New Plugin: jqxResponse.
- jqxChart step line series: stepline and steparea.
- jqxChart range series: rangecolumn, rangearea, splinerangearea, steprangearea.
- jqxChart rich tooltips with custom HTML support.
- jqxChart color bands.
- jqxChart dash style for all lines.
- jqxChart crosshairs.

What’s Improved:

- Improved date type x-axis rendering in jqxChart.
- More options to control text rotation and text positioning along axes in jqxChart.
- Better tooltip formatting options and improved tooltip formatting documentation in jqxChart.
- Fill opacity, line width and line dash style support in all jqxChart series.
- Legend colors displayed using the fill opacity of the corresponding serie in jqxChart

The full list of changes is available here: Release History.

The post jQWidgets 2.9 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets Update

$
0
0
We are pleased to announce the release of jQWidgets ver. 2.9.1! This release addresses the bugs that have been reported during the week.

What’s Fixed:

- Fixed an issue in jqxButtonGroup regarding the “disabled” state rendering.
- Fixed an issue in jqxButtonGroup regarding the “destroy” method.
- Fixed an issue in jqxListBox regarding the “updateItem” method when the index of the item to be updated is 0.
- Fixed an issue in jqxGrid regarding the “autoloadstate” behavior when virtualmode is set to true and the Grid is sorted.
- Fixed an issue in jqxGrid regarding the “autoloadstate” behavior when virtualmode is set to true, the Grid was making unnecessary additional binding operation.
- Fixed an issue in jqxWindow regarding the dynamic changes of the “isModal” property.


If you have any technical questions, please feel free to write to support@jqwidgets.com

The post jQWidgets Update appeared first on Javascript, HTML5, jQuery Widgets.


jQWidgets 2.9.2

$
0
0
It is available for download right now: http://www.jqwidgets.com/download.

The second minor release contains a number of bug fixes in the widgets related to their rendering and behavior in Internet Explorer 7 and Windows Phone.

What’s Fixed:

- Fixed an issue in jqxTreeMap regarding the rendering in IE7.
- Fixed an issue in jqxTree regarding the items rendering in IE7.
- Fixed an issue in jqxListMenu regarding the rendering in Right-To-Left mode in IE7.
- Fixed an issue in jqxListMenu regarding its “click” event handler in Windows Phone 8.
- Fixed an issue in jqxGrid regarding the cells text vertical alignment when the “rowsheight” property is set in Windows Phone 8.
- Fixed an issue in jqxListBox regarding its “click” event handler when “checkboxes” is set to true and the widget is used on a Touch device.
- Fixed an issue in jqxExpander regarding its rendering when the widget is created outside the DOM.
- Fixed an issue in jqxChart regarding the rendering in Right-To-Left mode.
- Fixed an issue in jqxComboBox KO integration.

If you have any technical questions, please feel free to write to support@jqwidgets.com

The post jQWidgets 2.9.2 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets 2.9.3

$
0
0
Thank you all for the valuable feedback! The third minor release addresses the following list of bugs:

- Fixed an issue in jqxChart regarding the tooltip positioning when the Chart’s position is absolute or relative.
- Fixed an issue in jqxGrid regarding the load state feature when the Grid is in virtual mode.
- Fixed an issue in jqxGrid regarding the automatic resizing when the size is set in pecentages.
- Fixed an issue in jqxGrid regarding the rendering in RTL mode when grouping is enabled and the grid columns overflow.
- Fixed an issue in jqxGrid regarding the rendering when grouping is enabled and there is a pinned column.
- Fixed an issue in jqxGrid regarding the editing of “time” values through the default textbox editor.
- Fixed an issue in jqxGrid regarding the filtering of numbers when the decimal separator is localized.

If you have any technical questions, please feel free to write to support@jqwidgets.com

The post jQWidgets 2.9.3 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets 3.0.0

$
0
0
The jQWidgets Team is pleased to announce the availability of jQWidgets ver. 3.0. This release adds many new features and improvements. Some of the highlights:

What’s New:

- jqxGrid CheckBox selection.
- jqxGrid Columns Hierarchy.
- jqxGrid Custom editors.
- jqxComboBox Multi Select feature.
- jqxInput UI add-ons.

What’s Improved:

- jqxComboBox auto-complete functionality.

For a complete list of new features and bug fixes, please see the online release notes available at: Release History.

The post jQWidgets 3.0.0 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets ver. 3.0.2

$
0
0
We are happy to announce the availability of jQWidgets ver. 3.0.2. This release introduces 3 New Themes – Arctic, Orange and Metro Dark.

Arctic

Metro Dark

Orange

If you would like to make some changes in the existing themes or to create new themes, you can use the Theme Builder tool.

What’s Fixed:

- Fixed an issue in jqxGrid regarding the columns hierarchy rendering when a grid column is pinned.
- Fixed an issue in jqxGrid regarding the rendering of a cell editor from a pinned column when the grid is horizotally scrolled.
- Fixed an issue in jqxGrid regarding the server filtering of date values. The parameters sent to the server are now formatted using the Column’s cells format set by the user.
- Fixed an issue in jqxGrid regarding the grouping when pager is enabled and the grid is grouped by dates.
- Fixed an issue in jqxGrid regarding the “showvalidationpopup” method when the method is called for the last Grid row and there is a horizontal scrollbar. The validation popup was displayed under the scrollbar.
- Fixed an issue in jqxGrid regarding the column width calculation when the column’s width is not set.
- Fixed an issue in jqxDropDownList regarding the rendering after calling the “uncheckAll” method.

The post jQWidgets ver. 3.0.2 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets ver. 3.0.3

$
0
0
We are pleased to announce the availability of jQWidgets ver. 3.0.3. This release brings iOS 7 support, multiple new demos and some minor fixes and enhancements across all widgets. You can find below information about all the changes in the new version.

What’s New

- Added: 30+ new Mobile demos.
- Added: New jqxGrid Paging mode.
- Added: 4 new themes.




What’s Fixed

- Fixed an issue in jqxGrid regarding the “selectall” method when checkbox selection is enabled.
- Fixed an issue in jqxGrid regarding the columns resizing in RTL mode when the Grid’s horizontal scrollbar is hidden.
- Fixed an issue in jqxGrid regarding the “cellbeginedit” and “cellendedit” events. The events were not raised correctly after pressing the “enter” key.
- Fixed an issue in jqxGrid regarding the tooltip text formatting.
- Fixed an issue in jqxGrid regarding the Excel export when a String column is with Null values.
- Fixed an issue in jqxGrid regarding the Grouping of a column with “groupable” set to false when Columns Reorder is enabled.
- Fixed an issue in jqxGrid regarding the TextBox editor, when the edited value is a localized number.
- Fixed an issue in jqxGrid regarding the “loadstate” method when the Grid is in virtual mode.
- Fixed an issue in jqxComboBox regarding the auto-complete when 1 item is found and a horizontal scrollbar is displayed. The DropDown’s height was not enough for displaying the full item.
- Fixed an issue in jqxCalendar regarding the Special Dates feature when the special date is added with a custom CSS Class.
- Fixed an issue in jqxCalendar regarding the selection after navigation through the year view.
- Fixed an issue in jqxTree regarding the horizontal scrollbar’s max value calculation.

We welcome your feedback and suggestions on how to make jQWidgets even better.

Thank you!
The jQWidgets Team



The post jQWidgets ver. 3.0.3 appeared first on Javascript, HTML5, jQuery Widgets.

Announcing jQWidgets 3.0.4

$
0
0
We are pleased to announce the jQWidgets ver.3.0.4. This release brings fixes for the bugs reported during the last month and we have also added support for Internet Explorer 11.

We would like to thank all the users for the provided feedback which helped us make jQWidgets better!

What’s New:

- Added support for Internet Explorer 11.

What’s Fixed:

- Fixed an issue in jqxGrid regarding the Columns Hierarchy rendering when the Grid is grouped and the state of a Group is changed.
- Fixed an issue in jqxGrid regarding the aggregates rendering when a column is dynamically hidden after ‘beginupdate’ method call.
- Fixed an issue in jqxGrid regarding the columns reordering of nested grids.
- Fixed an issue in jqxGrid regarding the handling of null values in the aggregates calculation functions.
- Fixed an issue in jqxGrid regarding the grouping in virtual mode when paging is enabled.
- Fixed an issue in jqxGrid regarding the ComboBox editor when the column’s displayfield and datafield properties are set.
- Fixed an issue in jqxGrid regarding the save/load state when the Grid is in virtual mode.
- Fixed an issue in jqxGrid regarding the columns resizing in Firefox when the Grid is in container with absolute position and the showfilterrow property is set to true.
- Fixed an issue in jqxNumberInput regarding the “.” key handling when the edited number is integer.
- Fixed an issue in jqxNumberInput regarding the negative numbers rendering when the decimalSeparator property is set and after calling the setDecimal method.
- Fixed an issue in jqxNavigationBar regarding the “remove” method. The widget was not updated correctly after removing the last item when it is expanded. - Fixed an issue in jqxComboBox regarding the widget’s rendering within jqxWindow.
- Fixed an issue in jqxComboBox regarding the auto-height behavior after dynamically setting the autoDropDownHeight property.
- Fixed an issue in jqxComboBox regarding the unselectItem method when multiSelect property is set to true.
- Fixed an issue in jqxLinkButton regarding the dynamic changing of the “disabled” property.

Make sure to download the jQWidgets ver.3.0.4 today to take advantage of the updates.

The post Announcing jQWidgets 3.0.4 appeared first on Javascript, HTML5, jQuery Widgets.

Data Binding with PHP’s mysqli Extension

$
0
0
In this blog post, we will demonstrate you how to use jQWidgets with the PHP’s mysqli Extension.

Let’s start with a brief introduction of the PHP’s mysqli extension. The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later. The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:

  • Object-oriented interface
  • Support for Prepared Statements
  • Support for Multiple Statements
  • Support for Transactions
  • Enhanced debugging capabilities
  • Embedded server support
For further information on the mysql extension, see Mysql.

After we have learned what is mysqli, now let’s see how to create a web page with jqxGrid and implement server paging and sorting using PHP and mysqli.

1. The first step is to create the file we’ll connect with. We will call the file ‘connect.php’.
<?php
# FileName="connect.php"
$hostname = "localhost";
$database = "northwind";
$username = "root";
$password = "";
?>
2. The second step is to create the file that will handle the queries. We will call the file data.php. The data.php file connects to the ‘Customers’ table from the Northwind Database and returns the data as JSON.
Our goal is to send JSON data to the client in small pieces that the client requests, and respond when the page number, page size, sort column or sort order is changed by the end user. In the data.php file, we get the values of the ‘pagenum’ and ‘pagesize’ members which the Grid sends to the server and we use them to specify the range of records in the query to the MySQL Database. We also make a query to find the total rows of the ‘Customers’ table in order to display the total rows count in the Grid’s Pager. The sql query depends on the ‘sortdatafield’(Column) and the ‘sortorder’(‘ascending’ or ‘descending’) and also the ‘pagenum’ and ‘pagesize’. The ‘pagenum’, ‘pagesize’, ‘sortdatafield’ and ‘sortorder’ parameters are sent to the server automatically by jqxGrid when the jqxDataAdapter plug-in makes an Ajax call. The returned JSON data has two members – the total rows of the ‘Customers’ table and the records to be displayed on the Grid widget.

<?php
#Include the connect.php file
include('connect.php');
#Connect to the database
$mysqli = new mysqli("$hostname", "$username", "$password", $database);
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
// Initialize pagenum and pagesize
$pagenum = $_POST['pagenum'];
$pagesize = $_POST['pagesize'];
$start = $pagenum * $pagesize;
if (isset($_POST['sortdatafield']))
{
$sortfield = $_POST['sortdatafield'];
$sortorder = $_POST['sortorder'];
if ($sortorder != '')
{
if ($sortorder == "desc")
{
$query = "SELECT CompanyName, ContactName, ContactTitle, Address, City, Country FROM Customers ORDER BY" . " " . $sortfield . " DESC LIMIT ?, ?";
}
else if ($sortorder == "asc")
{
$query = "SELECT CompanyName, ContactName, ContactTitle, Address, City, Country FROM Customers ORDER BY" . " " . $sortfield . " ASC LIMIT ?, ?";
}
$result = $mysqli->prepare($query);
$result->bind_param('ii', $start, $pagesize);
}
else
{
$result = $mysqli->prepare("SELECT SQL_CALC_FOUND_ROWS CompanyName, ContactName, ContactTitle, Address, City, Country FROM Customers LIMIT ?, ?");
$result->bind_param('ii', $start, $pagesize);
}
}
else
{
$result = $mysqli->prepare("SELECT SQL_CALC_FOUND_ROWS CompanyName, ContactName, ContactTitle, Address, City, Country FROM Customers LIMIT ?, ?");
$result->bind_param('ii', $start, $pagesize);
}
/* execute query */
$result->execute();
/* bind result variables */
$result->bind_result($CompanyName, $ContactName, $ContactTitle, $Address, $City, $Country);
/* fetch values */
while ($result -> fetch()) {
$customers[] = array(
'CompanyName' => $CompanyName,
'ContactName' => $ContactName,
'ContactTitle' => $ContactTitle,
'Address' => $Address,
'City' => $City,
'Country' => $Country
);
}
// get the total rows.
$result = $mysqli->prepare("SELECT FOUND_ROWS()");
$result->execute();
$result->bind_result($total_rows);
$result->fetch();
$data[] = array(
'TotalRows' => $total_rows,
'Rows' => $customers
);
echo json_encode($data);
/* close statement */
$result->close();
/* close connection */
$mysqli->close();
?>

In the above code we have used mysqli prepared statements. ‘mysqli_prepare’ prepares the SQL query, and returns a statement handle to be used for further operations on the statement. The query must consist of a single SQL statement. The parameter markers must be bound to application variables using mysqli_stmt_bind_param()(see $result->bind_param(‘ii’, $start, $pagesize);) and/or mysqli_stmt_bind_result()(see $result->bind_result($CompanyName, $ContactName, $ContactTitle, $Address, $City, $Country);) before executing the statement or fetching rows.
For more information about “bind_param” and “bind_result”, see: mysqli-stmt.bind-param.php and mysqli-stmt.bind-result.php.
The mysqli_stmt_execute function call executes the query that has been previously prepared using the mysqli_prepare() function. When executed the parameter markers are automatically replaced with the appropriate data.
For more details about the “execute” function, please visit: mysqli-stmt.execute.php.

3. The final step is to create the index.php page where we will add the Grid widget and set up the jqxDataAdapter plug-in.
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.classic.css" type="text/css" />
<script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.pager.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// prepare the data
var theme = 'classic';
var source =
{
datatype: "json",
datafields:
[
{ name: 'CompanyName', type: 'string'},
{ name: 'ContactName', type: 'string'},
{ name: 'ContactTitle', type: 'string'},
{ name: 'Address', type: 'string'},
{ name: 'City', type: 'string'},
{ name: 'Country', type: 'string'}
],
cache: false,
url: 'data.php',
type: "POST",
root: 'Rows',
beforeprocessing: function(data)
{
source.totalrecords = data[0].TotalRows;
},
sort: function()
{
// update the grid and send a request to the server.
$("#jqxgrid").jqxGrid('updatebounddata', 'sort');
}
};
var dataadapter = new $.jqx.dataAdapter(source);
// initialize jqxGrid
$("#jqxgrid").jqxGrid(
{
width: 600,
source: dataadapter,
theme: theme,
autoheight: true,
pageable: true,
virtualmode: true,
sortable: true,
rendergridrows: function(params)
{
return params.data;
},
columns: [
{ text: 'Company Name', datafield: 'CompanyName', width: 250 },
{ text: 'Contact Name', datafield: 'ContactName', width: 200 },
{ text: 'Contact Title', datafield: 'ContactTitle', width: 200 },
{ text: 'Address', datafield: 'Address', width: 180 },
{ text: 'City', datafield: 'City', width: 100 },
{ text: 'Country', datafield: 'Country', width: 140 }
]
});
});
</script>
</head>
<body class='default'>
<div id='jqxWidget'">
<div id="jqxgrid"></div>
</div>
</body>
</html>

The post Data Binding with PHP’s mysqli Extension appeared first on Javascript, HTML5, jQuery Widgets.


jQWidgets 3.1.0

$
0
0
jQWidgets is happy to announce the availability of jQWidgets ver.3.1.0. This release brings multiple valuable additions to our suite.

New Widgets

1. jqxTreeGrid is a lightweight jQuery widget which represents data in a tree-like structure. The TreeGrid(popular also as Tree List) widget supports multi column display of hierarchical data, data paging, sorting and filtering, data editing, columns resizing, fixed columns, conditional formatting, aggregates and rows selection. You can view its online demos here: TreeGrid Demos.

2. jqxDataTable represents a jQuery Table widget built to easily replace your HTML Tables. It can read and display the data from your HTML Table, but it can also display data from various data sources like XML, JSON, Array, CSV or TSV. jqxDataTable comes with easy to use APIs and works across devices and browsers. It supports data paging, data editing, filtering, sorting, grouping, printing, data export and more. You can check out its online demo DataTable Demos

3. jqxRangeSelector is a widget which can easily be used to select a numeric or date range. The API of jqxRangeSelector allows for a variety of user settings to be applied such as setting the range in numbers, days, weeks, months, years, etc. To try this new widget, visit: RangeSelector Demos.

New PhoneGap Integration

Building Mobile Applications using jQWidgets just became easier. This release comes with Integration tutorials about building Mobile Applications with jQWidgets & PhoneGap targeting Android, iOS, Blackberry and Windows Phone 8. Using Adobe PhoneGap Build Cloud Service and Ripple Emulator is demonstrated, too.

New Key Features

1. jqxChart Polar axis rendering.
2. jqxChart Support for live data updates.
3. jqxChart Series toggle using legend check marks.
4. jqxChart Series toggle events.
5. jqxChart Axis text animation.
6. jqxChart Multi-line axis text.
7. jqxGrid Excel-like Filtering.
8. jqxGrid Full Row Edit.
9. jqxGrid Printing.

Responsive Layouts

All our widgets already support percentage sizing and the ability to automatically or manually adapt & resize themselves based on container resize events, device type or method calls. If you would like to view how our widgets work in scenarios with Responsive Layouts, check out the updated Mobile Demos.

To learn more about jQWidgets ver3.1.0, please visit: Release History.

With so much new additions, you may have a question, comment, or suggestion for us. If this is the case, we would love to hear it, so do not hesitate to contact us.

The post jQWidgets 3.1.0 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets 3.2.0

$
0
0
We are happy to announce the availability of jQWidgets ver. 3.2.0.

What’s New:

- Added help topics about using jQWidgets with WordPress, Joomla, BreezeJS, RequireJS and Twitter Bootstrap.
- jqxTreeGrid and jqxDataTable Columns Reorder.
- jqxTreeGrid, jqxDataTable and jqxTree Incremental Search.
- Theme Builder – Save/Load theme settings.
- Theme Builder – Added new theme settings.
- Documentation API Filtering.

What’s Improved:

- Bootstrap Theme.
- jqxDateTimeInput UI.
- jqxGrid columns auto-width behavior. If you do not set the width of a column, it will occupy the remaining space.
- Moved the Theme Builder’s Preview tab to the Settings Area.
- jqxResponse OS and OS Version detection.

What’s Fixed:

- Fixed an issue in jqxGrid regarding the full row edit feature, when a column is with different display and data fields.
- Fixed an issue in jqxGrid regarding the “destroy” method. Some touch event handlers were not removed.
- Fixed an issue in jqxGrid regarding the “loadState” method. The method did not load the state of a hidden Column, if the Column is Grouped.
- Fixed an issue in jqxGrid regarding the filtering of a Number column when the filtertype is set to “checkedlist”.
- Fixed an issue in jqxGrid regarding the virtual scrolling.
- Fixed an issue in jqxPanel regarding the horizontal scrollbar maximum value calculation on Touch Devices.
- Fixed an issue in jqxDragDrop regarding the dropTargetEnter and dropTargetLeave events when there are multiple drop targets situated one next to another.
- Fixed an issue in jqxDragDrop when the plugin is used in IFrame and the parent document’s domain is different.
- Fixed an issue in jqxMenu regarding the “destroy” method. Some touch event handlers were not removed.
- Fixed an issue in jqxRangeSelector regarding the “getRange” method’s return value when the RangeSelector’s margin is set in percentages.
- Fixed an issue in jqxComboBox regarding its selection when the input’s value is an empty string.
- Fixed an issue in jqxComboBox regarding its selection when ESC is pressed and the item’s value is Integer.
- Fixed an issue in jqxTreeGrid regarding the rendering after adding or removing records.
- Fixed an issue in jqxTooltip regarding the autoHideDelay property behavior.
- Fixed an issue in jqxCalendar regarding the keyboard navigation in Chrome 32.
- Fixed an issue in jqxDateTimeInput about entering a Date with the keyboard when the minDate is in the past.
- Fixed an issue in jqxSlider about the “change” event. The event was raised twice after calling the val method.

Breaking Changes: .jqx-icon-arrow-up, .jqx-icon-arrow-left, .jqx-icon-arrow-up and .jqx-icon-arrow-right CSS classes are now used for displaying icons in all widgets. That change may require the update of custom Themes.

If you have a question, comment, or suggestion for us, we would love to hear it, so do not hesitate to contact us.

The post jQWidgets 3.2.0 appeared first on Javascript, HTML5, jQuery Widgets.

Google Chrome 32 and Old jQWidgets Versions

$
0
0
Google recently released an update of the Chrome web browser which unfortunately broke the touch-device detection in the old versions of jQWidgets. The good news are that we have already resolved that issue in jQWidgets ver. 3.1 and 3.2. To make it easier for you, we ported the bug fix and prepared builds for all jQWidgets versions that had that bug and which were released through the last year.

Download links:

jqwidgets-ver2.6.0.zip, Release Date: Dec-27-2012
jqwidgets-ver2.6.1.zip, Release Date: Jan-18-2013
jqwidgets-ver2.7.zip, Release Date: Feb-08-2013
jqwidgets-ver2.8.zip, Release Date: Mar-22-2013
jqwidgets-ver2.8.1.zip, Release Date: Apr-12-2013
jqwidgets-ver2.8.2.zip, Release Date: Apr-27-2013
jqwidgets-ver2.8.3.zip, Release Date: Apr-29-2013
jqwidgets-ver2.9.0.zip, Release Date: June-24-2013
jqwidgets-ver2.9.1.zip, Release Date: June-28-2013
jqwidgets-ver2.9.2.zip, Release Date: July-04-2013
jqwidgets-ver2.9.3.zip, Release Date: July-11-2013
jqwidgets-ver3.0.0.zip, Release Date: August-16-2013
jqwidgets-ver3.0.1.zip, Release Date: August-19-2013
jqwidgets-ver3.0.2.zip, Release Date: August-26-2013
jqwidgets-ver3.0.3.zip, Release Date: October-01-2013
jqwidgets-ver3.0.4.zip, Release Date: November-01-2013


To apply the bug fix, you need to download the version which you use. Then open the jqwidgets folder from the archive and copy the jqxcore.js and jqx-all.js files and paste them into your project’s jqwidgets folder.

The post Google Chrome 32 and Old jQWidgets Versions appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets ver. 3.2.1

$
0
0
We are pleased to announce the jQWidgets ver.3.2.1. This release fixes the bugs reported during the last week.

We would like to thank all the users for the provided feedback which helped us to make jQWidgets better!

- Fixed an issue in jqx.base.css regarding a missing CSS style for jqxButton.
- Fixed an issue in jqxListBox Drag & Drop when there are hidden ListBox widgets on the page.
- Fixed an issue in jqxGrid regarding the Checked List Filter when all items are unselected.
- Fixed an issue in jqxTabs regarding its initialization from a hidden DIV tag.
- Fixed an issue in jqxDateTimeInput regarding its initialization from a hidden DIV tag.
- Fixed an issue in jqxWindow regarding the Tab-key navigation, when there are two or more Modal Windows opened.
- Fixed an issue in jqxTreeGrid regarding the mouse selection in an Editor when there’s a Pinned Column and the Editor is from a non-pinned column.

The post jQWidgets ver. 3.2.1 appeared first on Javascript, HTML5, jQuery Widgets.

jQWidgets ver. 3.2.2

$
0
0
We are happy to announce the availability of jQWidgets ver. 3.2.2. This release comes with a new look and feel of the Demos and Documentation pages, new Tutorials about using jQWidgets in Single Page Apps and also resolves several bugs reported during the last month. Thank you all for the great feedback!

jQWidgets Download

What’s New:

- jQWidgets SPA with Knockout.js and MongoDB Tutorial.
- Hot Towel SPA with jQWidgets.

What’s Fixed:

- Fixed an issue in jqxComboBox regarding the selectItem method when multiSelect property is set to true.
- Fixed an issue in jqxListBox regarding the widget’s horizontal scrollbar layout in IE7.
- Fixed an issue in the jQuery UI Compatible themes about the jqxWindow icons styling.
- Fixed an issue in jqxTreeGrid regarding the cellsAlign property when grouping is enabled.
- Fixed an issue in jqxTreeGrid regarding the export to html/excel when a column’s cellClassName is set to a custom CSS class.
- Fixed an issue in jqxTreeGrid about the height and width properties. When they are set dynamically, the widget did not automatically update its size.
- Fixed an issue in jqxTreeGrid regarding the row editing when the data is Sorted.
- Fixed an issue in jqxTreeGrid regarding the ensureRowVisible method.
- Fixed an issue in jqxGrid regarding its “focus” method in Chrome.
- Fixed an issue in jqxGrid regarding the cells selected style rendering when virtual mode and paging are enabled.
- Fixed an issue in jqxGrid regarding the filter row’s disabled state.
- Fixed an issue in jqxComboBox regarding the dynamic setting of the “renderer”, “renderSelectedItem” and “itemHeight” properties.
- Fixed an issue in jqxDragDrop regarding the onDropTargetLeave and onDropTargetEnter callback functions.


If you would like to try the new version, please visit: Download jQWidgets.

The post jQWidgets ver. 3.2.2 appeared first on Javascript, HTML5, jQuery Widgets.

Viewing all 306 articles
Browse latest View live