fmdano
|
|
« Reply #15 on: February 21, 2023, 07:44:23 AM » |
|
Not sure how to help you with this and that is what is worrying me...but I will do my best.
All our normal display grids look basically like this (removing code lines and showing functions)
$('#PRCover').treegrid({ url: './com/prCover.cfc?method=getGridPR', queryParams: { filter: '', sort: '', order: '', search_terms: '', id: '0_0', currentProfile_id: '<cfoutput>#session.current_profile.region_id#</cfoutput>', currentProfile_ISNational: '<cfoutput>#session.current_profile.isnational#</cfoutput>' }, idField:'id', treeField:'col1', emptyMsg: "No Records Found", border: true, singleSelect:true, fit: true, fitColumns: true, striped: true, rownumbers: false, collapsible: true, lines: false, sortOrder: 'asc', remoteSort:false, showHeader: true, scrollbarSize : 18,
toolbar: '#prcover_search', nowrap : true,
remoteFilter:false, pagination:true, pageList: [10, 20, 30, 40, 50, 100, 250, 500, 1000], pageSize: 1000, loadFilter: function(data,parent){ }, onSelect: function(node){
}, onContextMenu: function (e,row){ }, columns:[[ { field : 'action', title : '', width : 50, resizable: false, fixed: true, formatter: function (value, row, index) { var link = ''; if (row['has_attach'] === true || row['has_attach'] === "true" ) { link = '<a class="download-attachment-icon" title="Attachments" href="javascript:getAllAttachments(\'' + row['doc_set_id'] + '\')"> </a> '; } if (row['has_deliver'] === true || row['has_deliver'] === "true") { link = link + '<a class="download-deliverable-icon" title="Deliverables" href="javascript:downloadDeliverable(\'' + row['id'] + '\')"> </a> '; } if (link.length) { return link; } } }, {title: 'ETO (ACO) / PR / LSD',field:'col1',width:'30%', sortable: true}, {title: 'Region / Comment', field:'col2',width: '20%', sortable: true, align:'left'}, {title: 'Funding Type', field:'col3', width:'10%', sortable: true}, {title: 'Work Release', field:'col4', width:'10%', description: 'Work Release referenced to this PR Cover.', sortable: true}, {title: 'Acceptance', field:'col5', width:'10%', sortable: true, align:'center'}, {title: 'PR Amount ', field:'col6', width:'16.5%', sortable: true, align:'right'} ]] }) .treegrid('enableFilter') .treegrid('getPanel').find('tr.datagrid-filter-row').hide();
In this grid, when we just try to click on a row, and then another row, both rows stay selected....in the old code we have I select a row it is selected, and if I select a different row, the first row unselects and the new row is the only row selected.
Our other Grid that actually has checkboxes in it that were not checking:
$('#user_profiles_grid').datagrid({ url:'com/User_Info.cfc?method=getUserProfileData', method:'get', queryParams: { user_id: <cfoutput>#session.userDataStruct.user_id#</cfoutput>, profile_search_terms: '' },
emptyMsg: "No Records Found", loadMsg: 'Loading&hellp;', idField:'user_profile_id', toolbar: '#profileSearch', width: 980, height: 500, border: false, fit: true, singleSelect:true, checkOnSelect: false, selectOnCheck: false, scrollOnSelect: true, fitColumns: true, nowrap: true, autorowheight: true, striped: true, rownumbers: false, sortable: true, sortOrder: 'asc', remoteSort:false, halign: 'center', onBeforeCheck: function(index, row){ $(this).datagrid('clearChecked'); $(this).datagrid('selectRow', index); }, onLoadSuccess: function (data) { }, onDblClickRow: }, columns:[[ { field: 'user_profile_id', align: 'center', checkbox: true }, {title: 'Name', field:'name',width: 200, align: 'center', sortable: true}, {title: 'Email', field:'email', width: 150, align: 'center', sortable: true }, {title: 'Region', field:'region',width: 200, align: 'center', sortable: true }, {title: 'Role', field:'role',width: 250, align: 'center', sortable: true }, {title: 'Last Login', field:'last_login',width: 100, align: 'center', sortable: true } ]] }); As you see, nothing is really odd in the code for either one of these 2 grid types.
I am not sure how to give you more examples without emailing you the JS code we are using and also sending you screenshots of what is happening, OR doing a screenshare of what the issue is....
So, does this above help show you what our code looks like that is breaking when we add in the code you gave us to Fix the other issue in this forum post?
thanks for being patient.... Dan
|