I need to allow row selection in my grid while using the CellClickAction.Edit default action. This is an editable grid and we wish to have a cell selector visible on the screen allowing the user to arrow or tab around the grid. I have javascript code that will select the row whenever the cell is changed by using the CellChangeHandler. However, I am unable to select multiple rows if the user holds down shift or control for example. I would also like to be able to click and drag down the grid to select rows like in the CellClickAction.RowSelect functionality. Is this possible to do?
function setSelectedGridRow(astrActiveCell){var objSelectedRow;var objCell = igtbl_getCellById(astrActiveCell);var objRow = objCell.getRow();
if (objRow.getSelected()){}else{objRow.setSelected(true);}}Thanks,KyleL
WebGrid already has a "row selector", which sounds like it will achieve the results you want, including allowing multiple selection (assuming you've enabled multiple row selection). To display the row selectors for all bands in your grid, set the DisplayLayout.RowSelectorsDefault property to RowSelectors.Yes - or you can set this for a particular band by setting its RowSelectors property.
Unfortunately the requirements for the project dictate that row selectors can not be visible for aesthetic purposes. Is there anyway to get that functionality without using the Row Selectors?Thanks,KyleL