jQWidgets Forums
Forum Replies Created
-
Author
-
August 9, 2016 at 1:10 am in reply to: JqxGrid error in column Filter JqxGrid error in column Filter #86405
I analyzed the problem and only for this column if the first row is initialized(with any type of value) i have “No data result”. If the first row in my grid is NULL all works fine.
Do you know to explain me what it depends on?
Thanks
If I add a dataadapter the problem is the same. How can i add more datasource in the same page and load all at the start of the page?
Now my code is:
var sourceAgCom = {
datatype: “json”,
datafields: [
{ name: ‘Id’ }, // Chiave primaria, int, idenity, not null
{ name: ‘Valore’ },
{ name: ‘Abilitata’ }
],
id: ‘Id’,
url: ‘/CRMScelte/GetAgCom’,
sortcolumn: ‘Valore’,
sortdirection: ‘asc’
};
var dataAdapterAgCom = new $.jqx.dataAdapter(sourceAgCom, {
downloadComplete: function (data, status, xhr) { },
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
$(“#jqxAgCom”).jqxGrid(
{
width: ‘97%’,
height: ‘500px’,
source: dataAdapterAgCom,
theme: ‘light’,
columnsresize: true,
localization: getLocalization(‘it’),
editable: false,
sortable: true,
altrows: true,
groupable: false,
showstatusbar: false,
showaggregates: false,
showtoolbar: false,
columns: [
{ text: ‘Id’, datafield: ‘Id’, width: ‘0%’, hidden: true },
{ text: ‘Valore’, datafield: ‘Valore’, width: ‘80%’ },
{ text: ‘Abilitata’, datafield: ‘Abilitata’, width: ‘20%’, columntype: ‘checkbox’, filtertype: ‘bool’ }
]
});
var sourceDiss = {
datatype: “json”,
datafields: [
{ name: ‘Id’ }, // Chiave primaria, int, idenity, not null
{ name: ‘Valore’ },
{ name: ‘Abilitata’ }
],
id: ‘Id’,
url: ‘/CRMScelte/GetDiss’,
sortcolumn: ‘Valore’,
sortdirection: ‘asc’
};
var dataAdapterDiss = new $.jqx.dataAdapter(sourceDiss, {
downloadComplete: function (data, status, xhr) { },
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
dataAdapterDiss.dataBind();
$(“#jqxDiss”).jqxGrid(
{
width: ‘97%’,
height: ‘500px’,
source: dataAdapterDiss,
theme: ‘light’,
columnsresize: true,
localization: getLocalization(‘it’),
editable: false,
sortable: true,
altrows: true,
groupable: false,
showstatusbar: false,
showaggregates: false,
showtoolbar: false,
columns: [
{ text: ‘Id’, datafield: ‘Id’, width: ‘0%’, hidden: true },
{ text: ‘Valore’, datafield: ‘Valore’, width: ‘80%’ },
{ text: ‘Abilitata’, datafield: ‘Abilitata’, width: ‘20%’, columntype: ‘checkbox’, filtertype: ‘bool’ }
]
});Thank you
-
AuthorPosts