jQWidgets Forums
Forum Replies Created
-
Author
-
July 11, 2014 at 1:42 pm in reply to: Multi-Purpose Widgets Responsive Multi-Purpose Widgets Responsive #57080
Think the right term would be “adaptive rendering”.
October 16, 2012 at 10:37 am in reply to: jqxComboBox Remote Search – Set Initial Value jqxComboBox Remote Search – Set Initial Value #9535Hi Peter,
Ok no worries… and thank you for adding it as a request/feature
Rodrigo
October 7, 2012 at 5:10 am in reply to: jqxComboBox maxRows per input data jqxComboBox maxRows per input data #9009Hi Peter,
It turned out that I was running jqwidgets “2.1” I’ve now upgraded to the lastest “2.4.2” and all is well
just in case anyone else comes across a similar issue.
Regards,
RodrigoHi Peter,
I must admit… I cannot find the issue with this one! please refer to code listed below.
The only i see an action happen (error) is if i take the ‘searchString’ out of “data.name_startsWith = $(“#jqxcombobox”).jqxComboBox();”.
I’m assuming “searchString” is meant to be a variable? but shouldn’t ” $(“#jqxcombobox”).jqxComboBox();” hold the value being typed just like in jquery “$(‘#jqxcombobox’).val()”. If not how do i get that “searchString”?
$(document).ready(function(){
var theme = getTheme();
var productsearch =
{
datatype: “json”,
datafields: [
{ name: ‘productcode’ },
{ name: ‘description’ },
{ name: ‘supplier’ },
{ name: ‘category’ }
],
url: “http://localhost/test/index.php/product/productsearch”,
data: {
featureClass: “P”,
style: “full”,
maxRows: 6
}};
var dataAdapter = new $.jqx.dataAdapter(productsearch,
{
formatData: function (data) {
console.log(data);
data.name_startsWith = $(“#jqxcombobox”).jqxComboBox(‘searchString’);
return data;
}
}
);$(“#jqxcombobox”).jqxComboBox(
{
width: 135,
height: 25,
source: dataAdapter,
remoteAutoComplete: true,
cache: false,
theme: theme,
selectedIndex: -1,
displayMember: “productcode”,
valueMember: “productcode”,renderer: function (index, label, value) {
var item = dataAdapter.records[index];
if (item != null) {
var label = item.productcode + “, ” + item.description + “, ” + item.category;
return label;
}
return “”;
},renderSelectedItem: function(index, item)
{
var item = dataAdapter.records[index];
if (item != null) {
var label = item.productcode + “, ” + item.description + “, ” + item.category;
return label;
}
return “”;
},
search: function (searchString) {
dataAdapter.dataBind();
}});
});
October 4, 2012 at 6:06 am in reply to: jqxComboBox maxRows per input data jqxComboBox maxRows per input data #8901Hi Peter,
That’s great thank you! I’ll give it a whirl today
Regards,
RodrigoOctober 4, 2012 at 12:40 am in reply to: jqxComboBox maxRows per input data jqxComboBox maxRows per input data #8885Hi Peter,
Thank your prompt reply.
Yes i’m using mysql limit e.g:
$maxRows = $_GET[‘maxRows’];
select * from products where productcode like ‘%$searchstring%’ limit $maxRows;Regards,
RodrigoSeptember 26, 2012 at 12:56 am in reply to: GRID Auto scroll to updated/inserted row GRID Auto scroll to updated/inserted row #8476Hi Dimitar,
That’s awesome! thank you very much mate!
Regards,
RodrigoSeptember 19, 2012 at 12:00 pm in reply to: GRID Auto scroll to updated/inserted row GRID Auto scroll to updated/inserted row #8183Hi Dimitar,
That’s great thank you! just what I need, one question though. I’m loading my data via json, would this present a problem? see my execution below (i have tried your suggested method but not having much luck) :
updaterow: function (rowid, newdata) {
// synchronize with the server – send update command
var data = “command=update&” + $.param(newdata);$.ajax({
dataType: ‘json’,
url: “/quote/getorder” + cid + oid,
type: ‘GET’,
data: data,
success: function (data, status, xhr) {
// update command is executed.
resetnewrowinput();
$(‘#stageinput’).focus();},
complete: function(){$(‘#jqxgrid’).jqxGrid(‘updatebounddata’);
$(‘#jqxgrid’).jqxGrid(‘ensurerowvisible’, 8);}
});}
AH HA!!!! Thanks Peter, really appreciate your assistance/patience
downloaded 1.7.2 and looking better already!
Have a great one!
RodrigoI have also tried using the “filter api” and not having any luck either.
Essentially all i’d like to do is to have a “text/input” field with a “search/button” next to it. On click of button retrieve the data via json/php and refresh the grid.
Rodrigo
Hi Peter,
I appreciate your help and don’t mean to be a pain, but I still can’t get the grid to reload the filtered data by doing the sample below. Unfortunately there aren’t any examples of such.
// FILTER
var me = this;
$(“#small-input”).bind(‘keydown’, function (event) {
if ($(“#small-input”).val().length >= 2) {if (me.timer) clearTimeout(me.timer);
me.timer = setTimeout(function () {//dataAdapter.dataBind();
$(‘#jqxgrid’).jqxGrid(‘updatebounddata’);}, 300);
}
});
I get the following error on my console:
Uncaught TypeError: Object # has no method ‘toArray’ jqxcore.js:7
a.jqx.invoke jqxcore.js:7
a.jqx.jqxWidgetProxy jqxcore.js:7
a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:7
o.extend.each jquery-1.3.2.min.js:12
o.fn.o.each jquery-1.3.2.min.js:12
a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:7
(anonymous function)Hi Peter,
That’s great thank you!… just one more thing
where on the code would i place it? i’ve tried and keep on getting a no object for jqgrid.
Rodrigo
-
AuthorPosts