This is a migrated thread and some comments may be shown as answers.

batchedit: how to control what can be edited

3 Answers 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raddy Rad
Top achievements
Rank 1
Raddy Rad asked on 04 Jan 2014, 12:19 AM
My grid is set up to batchedit mode with click-to-edit.

I've found a partial solution - use gridboundcolumn and gridcolumntemplate to control whether or not a column is batch editable. 

But can it be done programatically? preferrably on the server side during the databound event because i have to look at a value in the datarow.

Thanks

3 Answers, 1 is accepted

Sort by
0
Raddy Rad
Top achievements
Rank 1
answered on 04 Jan 2014, 03:30 AM
to get a little further, i found the batcheditopening which i can cancel. But similar to rowclick client event handler, can i get access to the datakeynames? to determine if it should be cancelled?
0
Raddy Rad
Top achievements
Rank 1
answered on 04 Jan 2014, 10:32 PM
well with the table view, i can get to the griditems and eventually the datakeys. Now... how do i know which row the cell is clicked? so i can get the right griditem?
0
Raddy Rad
Top achievements
Rank 1
answered on 04 Jan 2014, 11:03 PM
ah found it finally. To whomever this might be useful. apparently clicking on the cell to open up the editor, is in effect selecting a row. ie. you SHOULD be able to get selected item from table view. HOWEVER, you have to set the rowselect to true. otherwise, you won't get any selected item.
Tags
Grid
Asked by
Raddy Rad
Top achievements
Rank 1
Answers by
Raddy Rad
Top achievements
Rank 1
Share this question
or