I have a grid with 30 rows and 18 columns. I only want the user to be able to select/ activate 4 of the rows (based on value) and only some of the cells based on value at runtime. I would prefer to do this in vb (code behind) but could use JavaScript if requried. In pseudo code:
If not row.activableflag then set all cells in row not activeable Else if cellvalue > 0 then set cell activable else set cell notactivable end if End If
Hello Graham,
Have you been able to resolve the issue? If you have any further questions, please feel free to contact me.
Sincerely,
Tsanna
I am still looking for help with this issue.
Have you been able to resolve the issue? If you need any further assistance, please let me know.
Did you have a chance to look at the sample that I've attached you in my previous response?
Essentially an option is to handle the CellSelectionChanging client side event of the Selection behavior and enable selection only of certain rows and cells like the following:
function WebDataGrid1_Selection_CellSelectionChanging(sender, eventArgs) {
var cell = eventArgs.getNewSelectedCells().getCell(0);
if (cell.get_row().get_index() > 3 || cell.get_value() == "Name0") {
eventArgs.set_cancel(true);
}
The above code snippet shows how to enable the selection only for the first four rows excluding the cell with value "Name0".
Does this help you for that what you're trying to achieve? Looking forward to hearing from you.