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

[Solved] Freeze rows when in edit mode

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Atlas
Top achievements
Rank 1
Atlas asked on 30 Jul 2009, 09:47 PM
I have a grid with inline editing, and I was wondering if it is possible to freeze all rows in the grid from selection while a row is in edit mode. I have disallowed multirow selection, but the grid row being edited is highlighted, and the grid allows the selection of another row. This causes two rows to appear highlighted, and therefore to appear selected.
Also, is it possible to make the edit row the selected row?

I have some checkbox groups outside the grid that bind to the record of the selected grid row, but I want the checkboxes to be related to the row in edit mode if the user clicks the edit pencil?


Also, how would I select the row I was editng after hitting the cancel edit icon?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Jul 2009, 07:17 AM
Hi Nano,

You may try the following code snippet to prevent selection of the Grid rows when the Grid is in edit mode.

ASPX:
 
    <ClientSettings> 
             <ClientEvents OnRowSelecting="Selecting"  /> 
             <Selecting AllowRowSelect="true"  /> 
            </ClientSettings> 

JS:
 
<script type="text/javascript" > 
 function Selecting(sender, eventArgs) 
 { 
   if($find("RadGrid1")._editIndexes.length>0) 
    eventArgs.set_cancel(true//cancel event 
  
 } 
</script> 


Regards
Princy
Tags
Grid
Asked by
Atlas
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or