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
That rules out the easiest solution, then.
I can't say that it's "not possible." It may well be possible. However, I don't currently know how to accomplish it, and I'm not able to dedicate enough time to research in more detail - whether to confirm that it's not possible or, if it is indeed possible, how to accomplish it.
You may want to consider submitting a support request to Developer Support so that someone can dig into this in more detail - unless, of course, another of the forum-goers have any more immediate suggestions on how to get the desired functionality.
Hi Vince,I have submitted a support request and will post the solution if and when I recieve one. Thanks for the reply.KyleL