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

Multiselect GridClientSelectColumn

2 Answers 195 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 31 Mar 2009, 06:45 PM
I am try to show a grid that will allow the user to multiselect rows and only have the rows selected to be editable.  Then on a button click save it will save that changes.

I have the multiselection set up but when I select the row I want it to open the row for editing, how do I capture this event?


Tahnks,
Eric

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Apr 2009, 05:29 AM
Hi Eric,

I guess you want to put the row in EditMode when selecting the row and want to perform batch update on single button click. Here I tried the client side code for setting the rows in EditMode while selecting. Attach the function to OnRowSelected clientside event of RadGrid.

ASPX:
<telerik:radgrid id="RadGrid1" runat="server" allowmultirowselection="True" datasourceid="SqlDataSource1" AllowMultiRowEdit="true"
<MasterTableView DataSourceID="SqlDataSource1" EditMode="InPlace" CommandItemDisplay="Top" AutoGenerateColumns="False"
<Columns> 
  . . . 
</Columns> 
</MasterTableView> 
<ClientSettings> 
<ClientEvents OnRowSelected="OnRowSelected" /> 
<Selecting AllowRowSelect="True"></Selecting> 
</ClientSettings> 
</telerik:radgrid> 

JavaScript:
<script type="text/javascript"
function OnRowSelected(sender, eventArgs) 
    var editRow = eventArgs.get_itemIndexHierarchical(); 
    $find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(editRow); 
</script> 

Please refer the link to online documentation for performing batch updates.

Thanks,
Shinu.
0
Eric
Top achievements
Rank 1
answered on 01 Apr 2009, 12:23 PM
Thanks, this is close but  it does not leave the check mark in the checkbox nor does it keep the edited values when I select the second or third edit row. 
Tags
Grid
Asked by
Eric
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Eric
Top achievements
Rank 1
Share this question
or