jQWidgets Forums
Forum Replies Created
-
Author
-
April 21, 2020 at 5:48 pm in reply to: Shifted subitems after adding item with subitems Shifted subitems after adding item with subitems #111811
I tried to call ‘refresh’ method before and i tried to set width and height as you suggested and it did not help.
I must clarify actually that shifting only happening for checkboxes and if i inspect element in chrome i can see that margin-top set to -5, so checkbox appears pushed up. Any other ideas how to fix it? I don’t see any errors in console.
thanks,
MarinaMarch 20, 2020 at 4:32 am in reply to: Two tree Views to move items between Two tree Views to move items between #111466I actually recreated this issue in more simple page, but its still happening when ids of the items in both trees have the same values. If ids are different its seems working fine.
<script type="text/javascript"> function movetreeviewitems(source, destination) { var sourceItems = $(source).jqxTree('getCheckedItems'); var destinationitems = $(destination).jqxTree('getItems'); var bfoundparent = false; var assigneditemsparent; var destinationItemsMaxID = 0; for (var n = 0; n < destinationitems.length; n++) {//loop through assigned elements to find max id if (Number(destinationitems[n].id) > Number(destinationItemsMaxID)) { destinationItemsMaxID = Number(destinationitems[n].id); } } mainloop: for (var i = 0; i < sourceItems.length; i++) { var item = sourceItems[i]; if (item.level > 0) { destinationitems = $(destination).jqxTree('getItems'); console.log("item", item); console.log("item parent element", item.parentElement); console.log("parent item", $(source).jqxTree('getItem', item.parentElement)); bfoundparent = false; var itemcompanyid, itemcategoryid, categoryelement, companyelement, categoryitem, companyitem, itemelement; itemelement = item.element; if (!bfoundparent) { loopassigned: for (var j = 0; j < destinationitems.length; j++) {//loop through assigned elements to see if parents there if (destinationitems[j].level == 0 && destinationitems[j].label == $(source).jqxTree('getItem', item.parentElement).label && destinationitems[j].value == $(source).jqxTree('getItem', item.parentElement).value) { assigneditemsparent = destinationitems[j].element; console.log("ASSIGNED ITEM PARENT ELEMENT", assigneditemsparent); bfoundparent = true; break loopassigned; } } } console.log("foundparent", bfoundparent); if (bfoundparent) { destinationItemsMaxID = destinationItemsMaxID + 1; console.log("ADD DISPATCHER ITEM"); var lbl = item.label; var val = item.value; $(destination).jqxTree('addTo', { label: item.label, value: item.value, id: destinationItemsMaxID }, assigneditemsparent); } $(source).jqxTree('removeItem', itemelement); } } } $(document).ready(function () { var data1 = [ { "id": "2", "parentid": "1", "text": "Hot Chocolate", "value": "$2.3" }, { "id": "3", "parentid": "1", "text": "Peppermint Hot Chocolate", "value": "$2.3" }, { "id": "4", "parentid": "1", "text": "Salted Caramel Hot Chocolate", "value": "$2.3" }, { "id": "5", "parentid": "1", "text": "White Hot Chocolate", "value": "$2.3" }, { "text": "Chocolate Beverage", "id": "1", "parentid": "-1", "value": "0" } ] var data2 = [ { "id": "1", "value": "0", "text": "Chocolate Beverage", "parentid": "-1" }, { "id": "2", "text": "Caffe Vanilla Frappuccino", "parentid": "1", "value": "$2.3" }, { "id": "3", "text": "Caffe Vanilla Frappuccino Light", "parentid": "1", "value": "$2.3" }] // prepare the data var source1 = { datatype: "json", datafields: [ { name: 'id' }, { name: 'parentid' }, { name: 'text' }, { name: 'value' } ], id: 'id', localdata: data1 }; var source2 = { datatype: "json", datafields: [ { name: 'id' }, { name: 'parentid' }, { name: 'text' }, { name: 'value' } ], id: 'id', localdata: data2 }; var dataAdapter1 = new $.jqx.dataAdapter(source1); dataAdapter1.dataBind(); var records1 = dataAdapter1.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label'}]); var dataAdapter2 = new $.jqx.dataAdapter(source2); dataAdapter2.dataBind(); var records2 = dataAdapter2.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label'}]); $('#jqxTree1').jqxTree({ height: '400px', hasThreeStates: true, checkboxes: true, width: '330px', source: records1 }); $('#jqxTree1').css('visibility', 'visible'); $('#jqxTree2').jqxTree({ height: '400px', hasThreeStates: true, checkboxes: true, width: '330px', source: records2 }); $('#jqxTree2').css('visibility', 'visible'); $("#btnAssign").jqxButton({ width: 120, height: 40 }); $("#btnAssign").on('click', function () { movetreeviewitems('#jqxTree1', '#jqxTree2'); }); $("#btnUnAssign").jqxButton({ width: 120, height: 40}); $("#btnUnAssign").on('click', function () { movetreeviewitems('#jqxTree2', '#jqxTree1'); }); }); </script>
<table> <tr> <td> <div id='jqxTree1'></div></td> <td> <input type="button" style='margin-top: 20px;' value="Assign >>" id='btnAssign' /> <input type="button" style='margin-top: 20px;' value="UnAssign <<" id='btnUnAssign' /> </td> <td> <div id='jqxTree2'></div></td> </tr> </table>
can someone answer if type label can be bound to values at all?
June 11, 2019 at 8:31 pm in reply to: Grid with dataadapter and no data shows empty row. Grid with dataadapter and no data shows empty row. #105624cool, that worked!
October 26, 2018 at 7:42 pm in reply to: Edit row with checkbox column Edit row with checkbox column #102531i solved it by checking if rowselected on cellbeginedit of checkbox column , if not i return false and not allow to editing. still not sure why checkbox column behaving like that.
October 25, 2018 at 6:20 pm in reply to: Grid columntype button call Javascript function with "buttonclick" Grid columntype button call Javascript function with "buttonclick" #102519How dynamically to hide buttons on some rows based on row data? I have implemented delete button, but i need to show it only on rows with specific data for some properties of the datarecord of this row.
February 6, 2018 at 8:59 pm in reply to: Export to Excel not working Export to Excel not working #98603is latest version working right for export grid data to exel. I guess i get latest in october and we just realized before our release that this feature got broken.
We have secure web site(https) and the version from october 2017 is not working. I’m getting error(no other code changes were done for that page).October 12, 2016 at 6:20 pm in reply to: Keyboard input of date for DateTimeInput control Keyboard input of date for DateTimeInput control #88113October 12, 2016 at 6:20 pm in reply to: Keyboard input of date for DateTimeInput control Keyboard input of date for DateTimeInput control #88112June 22, 2016 at 1:27 am in reply to: keyboard navigation issue when press enter keyboard navigation issue when press enter #85333Nevermind I solved it by returning false in above code.
Hi,
I understand how to set min and max, but what I meant is ability for user select only two days range. Like if he picked 5/9/16 as start of range the end of range can only be 5/10/16 and if he picked 6/7/16 as start of range, then the end of range should only be allowed to pick 6/8/16 or no end date meaning that range is one day only. Like I want to set min/max dynamically on click of start date of range. Is it possible?Hi,
No I wanted just small (30X30) resize icon always to be on top layer of map in right comer. I don’t need to drug it – only clicking event. I figured it out actually myself – had to set style properties of window content overflow to hidden.#jqxResizeMap .jqx-window-header, #jqxResizeMap .jqx-widget-header { display:none !important;padding:0px; margin:0px; height:0; overflow: hidden; } #jqxResizeMap .jqx-window-content , #jqxResizeMap .jqx-widget-content { padding:0px; margin:0px; overflow: hidden; }
April 13, 2016 at 11:57 pm in reply to: 'ensureVisible' is not setting visible element 'ensureVisible' is not setting visible element #83450 -
AuthorPosts