jQWidgets Forums
Forum Replies Created
-
Author
-
November 9, 2016 at 2:16 pm in reply to: selectItem method using json data selectItem method using json data #88887
Hi AliMajed,
Please provide a code sample so I can review it and come up with a solution.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 9, 2016 at 9:08 am in reply to: Grid's scrollbar remains visible after close Grid's scrollbar remains visible after close #88872Unfortunately we are not able to reproduce the issue you’re experiencing. We tested the demo again in FireFox, Chrome, IE11 and EDGE and it works without any problems.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 9, 2016 at 8:51 am in reply to: Editing JqxComboBox inside JqxGrid issue Editing JqxComboBox inside JqxGrid issue #88871Hi nitinjambhale,
$(args).jqxComboBox('addItem', args.value);
The problem is that “args” isn’t valid. “args” doesn’t contain an instance of the jqxComboBox. You need to create a global variable for example “comboBoxInstance” and in the “createeditor” function assign the instance of the jqxComboBox to that variable, so you can later make a call to it in thecellendedit
function. Here’s what i have in mind:var comboBoxInstance; $("#myGrid").jqxGrid { ... columns: [ { text: 'Country', datafield: 'countryCode', displayfield: 'Country', columntype: 'combobox', editable: true, createeditor: function (row, value, editor) { editor.jqxComboBox({ source: countriesAdapter, displayMember: 'label', valueMember: 'value', multiSelect: true }); comboBoxInstance = editor; }, ... } $("#myGrid").on('cellendedit', function (event) { var args = event.args; var columnDataField = args.datafield; var rowIndex = args.rowindex; var cellValue = args.value; var oldValue = args.oldvalue; comboBoxInstance.jqxComboBox('addItem', args.value); //$(comboBoxInstance).jqxComboBox('addItem', { label: args.value, value: '0' }); $("#myGrid").jqxGrid('setcellvalue', "Pl", args.value); });
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 9, 2016 at 8:01 am in reply to: Using customized function in the grid Using customized function in the grid #88869Hi walker1234,
Yes you can apply a style ot any column depending on whatever value of the jqxGrid you like. The
cellclassname
should be set to the column that you want to apply color to. In that function you can check for other field’s values in other columns. For example, using thegetrowdata
function by passing the “row” number that you already have in the “cellclass” function, you can check every single value of the current row.Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 8, 2016 at 9:32 am in reply to: Editing JqxComboBox inside JqxGrid issue Editing JqxComboBox inside JqxGrid issue #88827Hi nitinjambhale,
New items are added as a
source
to the jqxComboBox. In a scenario where the jqxComboBox is used as a columtype for a column in a jqxGrid it uses the Grid’s source. You can also set a separate data source to the jqxComboBox if you like. Please provide a code sample so we can understand what exactly is the difficulty you’re facing.Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 8, 2016 at 9:01 am in reply to: Using customized function in the grid Using customized function in the grid #88825Hi walker1234,
Define the “wordInString” function somewhere in the beginning of your code( as a global function) and call it in your “cellclass” function to check if the value of the row contains the keyword you’re looking for. If it contains it, return the color you want to apply to that cell. For example:
var cellclass = function (row, columnfield, value) { var flag = wordInString(value, 'you'); if (flag === true) { return 'blue'; } }
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 8, 2016 at 8:43 am in reply to: Beginning cell edit when pressing special keys Beginning cell edit when pressing special keys #88822Hi mattcash,
For your first question:
We can allow the user to enter edit mode on any key pressed. This can be done through thehandlekeyboardnavigation
function of the jqxGrid, by calling thebegincelledit
method when a certain key is pressed.For the other question:
TheselectLast
property of the jqxInput does exactly what it suggests. It sets the input mark at the end of the string in the jqxInput text box. Unfortunately it isn’t part of the API documentation.The
selectLast
function has been tested in all popular browsers and it works in all of them ( Safari, FireFox, IE, Chrome).I modified the code that you found on the other thread to work the way you want to. Here is a link to the demo:
https://www.jseditor.io/?key=xb-jqxgrid-enter-edit-mode-on-key-pressedThe demo has been tested on the latest versions of Chrome, FireFox, MS Edge, IE11 and it works perfectly on all of them.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 7, 2016 at 8:41 am in reply to: selectItem method using json data selectItem method using json data #88784Hi AliMajed,
If you’ve applied the JSON correctly, the jqxTree automatically adds an id attrbiute to every “li” tag that corresponds to the ID from the JSON. So you can select a “li” element by the id you want, using the
selectitem
.
This demo shows how to bind to JSON:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/treebindingtojson.htm?light
This shows how to select the item:
http://jsfiddle.net/jqwidgets/yWBZJ/Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 7, 2016 at 8:04 am in reply to: Grid Server Sorting, Paging and Filtering – unending "Loading…" Grid Server Sorting, Paging and Filtering – unending "Loading…" #88783Hi Marat,
Thank you for the feedback. We will address this issue in a future release.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 4, 2016 at 11:54 am in reply to: How to change the text of a checkbox column in the filter How to change the text of a checkbox column in the filter #88746Hi SysProfile,
You don’t have to add
filteritmes
to every column that doesn’t need it. You can just check if the datafield of the current column is the one you need – “Discontinued”. If it is, add thefilteritems
property to it. If not, don’t add it. You can make that check here:var aryColumns = new Array(); for (var i = 0; i < objColumns.length; i++) { aryColumns.push({ "datafield": objColumns[i].cmn_menu_webcfg_dfName, // The field name that I use in the query MySQL, the same as the previous case "columntype": objColumns[i].cmn_menu_webcfg_dfType, // 'textbox','dropdownlist','numberinput','checkbox' or 'datetimeinput' "text": objColumns[i].cmn_menu_webcfg_fields_dfText, // It contains the title text of column "filterable": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfFiltrable), // true or false "sortable": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfSorteable), // true or false "editable": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfEditable), // true or false "groupable": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfGroupable), // true or false "menu": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfMenu), // true or false "exportable": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfExportable), // true or false "cellsAlign": objColumns[i].cmn_menu_webcfg_fields_dfLCR, // cell align, 'left', 'center' or 'right' "align": objColumns[i].cmn_menu_webcfg_fields_dfColLCR, // column align, 'left', 'center' or 'right' "width": objColumns[i].cmn_menu_webcfg_fields_dfWidth, // column width in pixels "cellsFormat": objColumns[i].cmn_menu_webcfg_fields_dfOutFormat, // This is a character string, especially for the date format, in my case 'dd-mm-yyyy' format "hidden": $.parseJSON(objColumns[i].cmn_menu_webcfg_dfHidden) // true or false }); }
For example:
if(objColumns[i].cmn_menu_webcfg_dfName=== 'Discontinued') ...
add thefilteritems
property.Another approach is to iterate through the “aryColumns” array and add the
filteritems
property only to the “Discontinued” column.Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 4, 2016 at 11:10 am in reply to: Pin selectionmode Checkbox column Pin selectionmode Checkbox column #88743Hi padma,
Remove the
pageable: true
property of the jqxGrid, or set it tofalse
and paging will be disabled. After doing it, when the first checkbox is clicked, all rows will be selected. If you want all of the checkboxes of all rows to be checked as well( not just selected rows), you have to iterate through all of the rows in the jqxGrid and change the state of each checkbox to “checked”.Here is a link to the updated demo:
https://www.jseditor.io/?key=grid-select-on-current-page-1Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 4, 2016 at 9:26 am in reply to: how to change the text of jqxcombobox inside the grid status bar how to change the text of jqxcombobox inside the grid status bar #88737Hi takwaicheng,
If you just want to change the selection(the actual value) of the jqxComboBox, you can do that by calling the
selectItem
method of the widget. If you just want to change the visible label of the item in the ComboBox, then you need to create a new source with datafields: ‘label’ – the new text you want to see as an option and ‘value’ – the field that has the value. Here’s how to do that:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/grid-list-filter-with-key-value-column.htm?lightThe demo shows how to do it with jqxDropDownList, but the same can be accomplished with a jqxComboBox.
In future please post your questions in the corresponding section of the forum( in this case, the jqxComboBox section).
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 4, 2016 at 8:02 am in reply to: Values disappear when moving combobox Values disappear when moving combobox #88730Hi joffreyj,
The selected values actually appear in the jqxComboBoxes, but the font is colored in white, so that’s why you don’t see them. There seems to be some style, probably a media-query that is setting the color of the font to white when the screen is shrinked and something isn’t applied properly in FireFox, so it seems. The same happens with the placeHolder. Check the CSS styles that are applied, that’s the root of the problem.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comHi Wigginst,
The page is making two Ajax calls because you are using the
autoBind: true
property on the dataAdapter and then you are setting the dataAdapter again to the jqxListBox. You should remove theautobind
from the jqxDataAdapter because it’s unnecessary. Please provide some data so we can test you code and see if there’s a problem. It shouldn’t be a problem to load the data usingdisplayMember
andvalueMember
from a JSON object. It doesn’t have to be a JavaScript array to do that.Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comNovember 2, 2016 at 8:26 am in reply to: How to change the text of a checkbox column in the filter How to change the text of a checkbox column in the filter #88661Hi SysProfile,
Have a look at this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/grid-list-filter-with-key-value-column.htm?lightYou can create a new data source for the jqxDropDownList that has the fields:
{ value: "true", label: "Seleccionado" }, { value: "false", label: "No seleccionado" }
and pass it to the checkbox column’s
filteritems
property as a jqxdataAdapter object(just like in the demo). This will configure the filter exactly like you want to.
I made you a demo, here you go:
https://www.jseditor.io/?key=xb-gridBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts