jQWidgets Forums
Forum Replies Created
-
Author
-
March 5, 2014 at 5:31 pm in reply to: Disable/hide button on RenderToolbar Disable/hide button on RenderToolbar #50532
Thanks!
January 24, 2014 at 4:38 pm in reply to: Master-Details, rowselect problem Master-Details, rowselect problem #48358Hi Peter
It’s the same problem in demo Master-Detail. I explain it with photo Photo illustration
Here is a lite code but it doesn’t work. My idea is to loop through the source data and unselect all the rows.
My code works only in our CRM so it doesn’t work in your local environment.In my code, records is the name of an array.
$(“#attributeGrid”).jqxGrid({ ready: function () { var len = records.length; for (i = 0; i < len; i++) { $(‘#attributeGrid’).jqxGrid(‘unselectrow’, i); } }, width: 680, source: dataAdapter,
….
Regards
LeeJanuary 24, 2014 at 7:51 am in reply to: Save values in Drag och drop grid Save values in Drag och drop grid #48321Hello,
Thanks for your tips. “drop-grid” in your demo is in unbound mode. Is it possible to bind “drop-grid” to data to show what man dragged into the drop-grid?
Regards
LeeJanuary 22, 2014 at 12:30 pm in reply to: Save values in Drag och drop grid Save values in Drag och drop grid #48209Hi
I explain my question lite more:
How to save the values that man drag and drop into another grid?regards
LeeJune 13, 2013 at 8:58 am in reply to: Grid med dropdownlist from another array Grid med dropdownlist from another array #23087Hi Peter,
Have you example using array. I used datafield and datadisplay but it doesn’t work for me
Best regards
LeeJune 13, 2013 at 7:19 am in reply to: Grid med dropdownlist from another array Grid med dropdownlist from another array #23076HI,
Can you help me with group function doesn’t work with separate datafield and displayfield?
Best regards,
LeeJune 12, 2013 at 12:23 pm in reply to: Grid med dropdownlist from another array Grid med dropdownlist from another array #23028Hi Peter
Here is sample of code I used. Before I use datafield and displayfield, grouping function worked. But after that it doesn’t work for that column.
var groupsrenderer = function (text, group, expanded, data) { if (data.groupcolumn.datafield == 'date' || data.groupcolumn.datafield == 'staff' || data.groupcolumn.datafield == 'projectactivity' || data.groupcolumn.datafield == 'invoicedstatus' || data.groupcolumn.datafield == 'billable') { if (data.subItems.length > 0) { var aggregate = this.getcolumnaggregateddata("billablehours", ['sum'], true, data.subItems); } else { var rows = new Array(); var getRows = function (group, rows) { if (group.subGroups.length > 0) { for (var i = 0; i < group.subGroups.length; i++) { getRows(group.subGroups[i], rows); } } else { for (var i = 0; i < group.subItems.length; i++) { rows.push(group.subItems[i]); } } } getRows(data, rows); var aggregate = this.getcolumnaggregateddata("billablehours", ['sum'], true, rows); } return '<div class="' + toThemeProperty('jqx-grid-groups-row') + '" style="position: absolute;"><span>' + text + ', </span>' + '<span class="' + toThemeProperty('jqx-grid-groups-row-details') + '">' + "Total" + ' (' + aggregate.sum + ')' + '</span></div>'; } else { return '<div class="' + toThemeProperty('jqx-grid-groups-row') + '" style="position: absolute;"><span>' + text + '</span>'; } } // initialize jqxGrid $("#jqxgrid").jqxGrid( { width:1000, source: dataAdapter, theme: theme, groupable: true, groupsrenderer: groupsrenderer, // selectionmode: 'singlecell', showstatusbar: true, statusbarheight: 0, editable: true, filterable: true, sortable: true, altrows: true, ready: function () { addfilter(); }, autoshowfiltericon: true, showaggregates: true, columns: [ { text: 'Date', columntype: 'textbox', groupable: true, datafield: 'date', columntype: 'datetimeinput', cellsformat: 'yyyy.MM.dd', width: 120}, { text: 'Staff Name', groupable: true, datafield: 'staffid', displayfield:"staff", width: 150, columntype: 'dropdownlist', createeditor: function (row, value, editor) { editor.jqxDropDownList({ source: staffnameList, displayMember: 'Name', valueMember: 'Id' }); } }, { text: 'Hours', groupable: true, datafield: 'billablehours', width: 120, cellsalign: 'center', cellsformat: 'n1', aggregates: ['sum', 'avg'], aggregatesrenderer: function (aggregates) { var renderstring = ""; $.each(aggregates, function (key, value) { var name = key == 'sum' ? 'Total' : 'Avg'; renderstring += '<div style="position: relative; margin: 4px; overflow: hidden;">' + name + ': ' + value +'</div>'; }); return renderstring;}}, { text: 'Billable', groupable: true, datafield: 'billable', width: 125, columntype: 'checkbox', aggregates: [{ 'Billable': function (aggregatedValue, currentValue) { if (currentValue) { return aggregatedValue + 1; } return aggregatedValue; } }, { 'Unbillable': function (aggregatedValue, currentValue) { if (!currentValue) { return aggregatedValue + 1; } return aggregatedValue; } } ] }, { text: 'Billable Des.', groupable: true, datafield: 'billabledescription', width: 150, columntype: 'textbox'}, { text: 'Project Activity', groupable: true, datafield: 'projectactivity', columntype: 'dropdownlist'}, ], });
Best regards,
LeeJune 12, 2013 at 11:57 am in reply to: Grid med dropdownlist from another array Grid med dropdownlist from another array #23026Hi Peter,
I did look at the posted sample and used lastest version. It display displayfield but that didnot work when I tried to group that column like this link
Best Regards,
LeeJune 12, 2013 at 11:37 am in reply to: Grid med dropdownlist from another array Grid med dropdownlist from another array #23019Hi,
I cannot group the column with seperate datafield and displayfield t.ex. datafield: ‘countryCode’, displayfield: ‘Country’.
How to set data.groupcolumn.datafield??? Neither ‘countryCode’ nor ‘Country’ works. Thanks!Best Regards,
LeeThanks, Dimitar, it works.
Regards,
LeeI received those errors:
Uncaught TypeError: Cannot call method ‘jqxWidget’ of undefined new_jqxgrid.js:7
Uncaught TypeError: Cannot set property ‘dataAdapter’ of undefined new_jqxdata.js:7
Uncaught TypeError: Cannot call method ‘jqxWidget’ of undefined new_jqxmenu.js:7
Uncaught TypeError: Cannot set property ‘cssroundedcorners’ of undefined new_jqxbutton.js:7
Uncaught TypeError: Cannot read property ‘_jqxGrid’ of undefined new_jqxgrid.aggregates.js:7
Uncaught TypeError: Cannot read property ‘_jqxGrid’ of undefined new_jqxgrid.edit.js:7
Uncaught TypeError: Cannot read property ‘_jqxGrid’ of undefined new_jqxgrid.selection.js:7
Uncaught TypeError: Cannot call method ‘jqxWidget’ of undefined -
AuthorPosts