jQWidgets Forums
Forum Replies Created
-
Author
-
July 18, 2016 at 7:34 am in reply to: Overriding the filter's evalutate method Overriding the filter's evalutate method #85820
Hi mcseemcher,
yes, there’s a way to get the value of the filter field. This is how to do it:
var source =
{
localdata: data,
datatype: “array”,
filter: function (filters, data, length) {
var filtereddata = new Array();
var filterslength = filters.length;
for (row = 0; row < length; row++) {
var datarow = data[row];
var filterresult = undefined;
// loop through the filters and evaluate the value.
for (j = 0; j < filterslength; j++) {
var appliedFilterValue = filters[j].filter.getfilters()[0].value;
var filter = filters[j].filter;
var value = datarow[filters[j].datafield];
var result = filter.evaluate(value);
if (filterresult == undefined) filterresult = result;
else {
if (filter.operator == ‘or’) {
filterresult = filterresult || result;
}
else {
filterresult = filterresult && result;
}
}
}
if (filterresult) {
filtereddata[filtereddata.length] = datarow;
}
}
return filtereddata;
}
};the “appliedFilterValue” contains the value of the first filter input field. In order to accomplish what you want, you need to split this string by some criteria, for example: appliedFilterValue.split(‘ ‘);. After that you need to create new filters with each the new values you just got from splitting the initial value. Then you need to call “evaluate” on each of the new Filters you’ve created to check if any row’s value matches the requirement.
Best Regards,
ChristopherJuly 15, 2016 at 10:30 am in reply to: Problem with "hideOnClick" in mobile Problem with "hideOnClick" in mobile #85776Hi 74bit,
I understand you now. The reason for this behavior is that the jqxtooltip appears over the button and causes problems with the click event on touchscreen devices. To resolve the issue you just need to move the jqxtooltip away from the jqxbutton. You can do that by using the “position” property of the jqxtooltip. Here is an example:
http://jsfiddle.net/4gLaqafy/2/Best Regards,
Christopher
jQWidgets Team
http://www.jqwidgets.comJuly 15, 2016 at 7:55 am in reply to: Problem with "hideOnClick" in mobile Problem with "hideOnClick" in mobile #85772Hi 74bit,
we don’t see any issue with the demo you’ve provided. We tested it on Chrome and Firefox mobile simulators again. The tooltip popup hides when you click on it and shows when you click on the button.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 15, 2016 at 7:43 am in reply to: Open auto-complete popup after entering two letters Open auto-complete popup after entering two letters #85769Hi aqssas,
yes it’s possible. You just need to set the value of the “minLength” property to 2 instead of the default(1). That way the auto-complete popup will show after you enter two letters. Here is an example:
https://www.jseditor.io/?key=jqwidgets-inputBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comHi Physics09,
Stacked bar charts is the right way to go. You can customize the tooltip to show exactly what you need: Here is an example of how to make a custom tooltip formatting function:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/javascript_chart_tooltips_formatting.htm?lightBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 15, 2016 at 7:12 am in reply to: Multiple format validation for column cell Multiple format validation for column cell #85766Hi Arun Saminathan,
It’s possible to do that by using the “validation” sub-property of the “columns” property. I made you a jqxGrid example with the requirements you need:
https://www.jseditor.io/?key=xb-grid-validationBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 13, 2016 at 7:44 am in reply to: Input edit for Number not working. Input edit for Number not working. #85702Hi nja,
I understand you completely now. This behavior is normal for the jqxGrid. In order to enter “0.55” in a number cell and view the changes you need to be in the cell’s edit mode. To enter Edit mode of a cell you need to either click on it twice, select it and press F2 or select it and press a keyboard button that is a letter or a number( not a symbol, for example ” . ” is invalid). What you are trying to do is change the value of the cell without being able to, because you are not in Edit mode.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comHi ksaidi,
please look at this example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxkanban/kanban-settings.htm?light
When you are adding a new row you need to include the field that points to the corresponding resourceSource localdata row ( in the above example, “resourceId” property in Source.localData contains the id of the corresponding resourceSource.localData row). If you want the newly added row to contain new data you also need to add a new line to the resourceSource.localdata with the new info about the new record. Also the Json that you are passing to the sources.localdata must contain valid fields, that are defined in the “fields” array.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 13, 2016 at 5:58 am in reply to: Tabs in jqx window having problem after collapsing the jqxwindow Tabs in jqx window having problem after collapsing the jqxwindow #85693Hi sanoj,
it seems that there’s somethng wrong in your implementation. Here is an example of jqxWindow with nested jqxTabs in it:
https://www.jseditor.io/?key=xb-window-tabsBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 12, 2016 at 9:55 am in reply to: More than 2 properties in the Button settings object causes additional div More than 2 properties in the Button settings object causes additional div #85670Hi todd.cochran,
you can see the new changes after every release in the Release History tab in Documentation.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 12, 2016 at 7:21 am in reply to: Input edit for Number not working. Input edit for Number not working. #85666Hi nja,
your code seems correct. I’m not able to recreate your problem. You might be using an older version of jqWidgets. Please download the latest and try again. If the problem persists, please provide some sample data so we can test it thoroughly.
Here is a fiddle example of a jqxGrid with a column just like the one you experience issues with:
http://jsfiddle.net/atLj2jez/1/Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 11, 2016 at 7:09 am in reply to: Editable Grid With Coloured Cells Editable Grid With Coloured Cells #85639Hi jkapasi,
there are two ways to accomplish this:
1) by implementing your own “cellsrenderer” function that returns an input element and then apply an event handler to the button with a script.
Here is an example:
http://www.jqwidgets.com/custom-grid-cells-rendering/2) by creating a widget column(using the createwidget sub-property of the column property) in the grid that contains a button, like so:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customwidgetscolumn.htm?lightBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 11, 2016 at 6:40 am in reply to: "Custom" Filtering – External Criteria "Custom" Filtering – External Criteria #85637Hi iLoveJQWidgets,
filtering by external criteria isn’t supported out of the box. However, what you are trying to do is possible. You just need to make your own custom filtering function that checks on the backend side to see which of the people from your records are married and then return their ID. After that you can use “getrowdatabyid” to get the rest of the data for the record and then pass it to the grid as a new source.
Here is an example for creating a custom filter:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customfiltering.htm?lightBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 8, 2016 at 7:33 am in reply to: Dynamically set the value of the Grid Dynamically set the value of the Grid #85611Hi jschultz0614,
you can achieve that by:
1. Calling the “getrowboundindexbyid” method to get the index of the row by the ID you want.
2. Calling the “selectrow” method by passing the idex to select the row.Here is an example:
https://www.jseditor.io/?key=xb-gridBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comJuly 8, 2016 at 6:23 am in reply to: Dynamically set the value of the Grid Dynamically set the value of the Grid #85607Hi jschultz0614,
please provide further information about what exactly do you want to use for the selection(for example, by cell content, by row id, etc.). Also in case you want to select by some data that has duplicates in the grid( for example, a cell value that repeats in many rows), do you want to select just the first occurance or all of them ?
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts