You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you @Atmos206 for the excellent work on ui-grid-custom-cell-select.
I'm using it in a project where I needed to include column headers by default. I simply patched the ui-grid-custom-cell-select directive for my purposes.
It's not a general solution since you might want to have an option to include headers or not (maybe a configurable provider) rather than include headers by default. And I did modify the copyData array assignment, which I probably shouldn't do.
In any case, I thought I'd briefly share the added code here FWIW. Perhaps someone might have a use for it as a quick and dirty option.
I'm a newbie, so any comments on the code or obvious bugs to be pointed out are welcome.
// copy headers from selected cells into copyData array,, then add the cells' data _scope.ugCustomSelect.copyData=createCopyHeaders(indexMap.col.start,indexMap.col.end)_scope.ugCustomSelect.copyData+=createCopyData(_scope.ugCustomSelect.selectedCells,// copy headers fnfunctioncreateCopyHeaders(colStart,colEnd){varvisibleCols=grid.renderContainers.body.renderedColumns;varnumCols=colEnd-colStart;varcolumnHeaders=''for(varci=colStart;ci<=colEnd;ci++){varcurrentCol=visibleCols[ci];columnHeaders+=currentCol.displayName;if(ci!==colEnd){columnHeaders+='\t';}}returncolumnHeaders+'\n';}
The text was updated successfully, but these errors were encountered:
First, thank you @Atmos206 for the excellent work on ui-grid-custom-cell-select.
I'm using it in a project where I needed to include column headers by default. I simply patched the ui-grid-custom-cell-select directive for my purposes.
It's not a general solution since you might want to have an option to include headers or not (maybe a configurable provider) rather than include headers by default. And I did modify the copyData array assignment, which I probably shouldn't do.
In any case, I thought I'd briefly share the added code here FWIW. Perhaps someone might have a use for it as a quick and dirty option.
I'm a newbie, so any comments on the code or obvious bugs to be pointed out are welcome.
The text was updated successfully, but these errors were encountered: