Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
QUERY: JS CTRL, SHIFT, Context Menu
I am wondering if anyone knows good code that implements the Windows Explorer selection mechanism (for a DataGrid or HTML table). I know the basics of assigning attributes to DataGrid rows (eg. objDataGrid.Rows(index).Attributes("onclick")) which applies to HTML tables. But wondering if there's a good technique to do, for example:
1. Left-click on file/row to select it.
2. Left-click on a different file/row to select it, reseting previous selections.
3. Hold down CTRL + left-click on different files/rows to multiple select, thus retaining all selections during CTRL key is down.
4. Hold down SHIFT + left-click on different file/row and all files/rows between first left-click and second left-click + SHIFT key are selected.
5. Right-click on one of the selected files/rows brings up a context menu.
6. Right-click on a non-selected file/row selects it, deselects all others, and brings up context menu.
I have googled around and there are many examples, especially using the IE's onContextMenu event. However I still haven't found any code/library which does all 6 of the above (all-in-one). I am looking for something which is cross-browser too.
Anyone seen such a code/library that does the above 6?