TrungTran
Hi All,
– I study jqwidgets. I using jgrid. But not problem show data.
– Step I call function load jgrid it work. After I call function other load data to $(‘#jqxgrid’).html(‘hello’).
– And after I call function load jgrid again. then it not work.
– Please help.
See code :
-$(document).ready(function () {
data();
});
function data()
{
var theme = getDemoTheme();
var source =
{
datatype: “json”,
datafields: [
{ name: ‘CompanyName’},
{ name: ‘ContactName’},
{ name: ‘ContactTitle’},
{ name: ‘Address’},
{ name: ‘City’}
],
url: ‘grid_data.php’,
cache: true,
async: true
};
var dataAdapter = new $.jqx.dataAdapter(source);
$(“#jqxgrid”).jqxGrid(
{
source: source,
theme: theme,
columns: [
{ text: ‘Company Name’, datafield: ‘CompanyName’, width: 250},
{ text: ‘ContactName’, datafield: ‘ContactName’, width: 150 },
{ text: ‘Contact Title’, datafield: ‘ContactTitle’, width: 180 },
{ text: ‘Address’, datafield: ‘Address’, width: 200 },
{ text: ‘City’, datafield: ‘City’, width: 120 }
]
});
}
function datahtml()
{
$(‘#jqxgrid’).html(‘hello’);
}