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

Distinguish between a selected row and a row in edit mode

3 Answers 158 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 10 Feb 2009, 06:11 PM
I have a grid where users can open the rows in edit mode to perform updates, and they can also select the rows and perform actions on those selected rows.  The problem is that a row in edit mode appears to be seen as selected by default from what I am seeing. 

Therefore, if my application wants to perform certain actions on selected rows and there are rows in edit mode at the same time, it will apply those actions to the rows in edit mode as well.  Since I can't seem to find a way to seelct rows in edit mode and have them show in the grid as selected, how do you get around this?  it's possible the user may want to select both rows in edit mode and rows not in edit mode at the same time and apply actions to both.

Is there any way to visually select a row in edit mode?

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 11 Feb 2009, 05:18 AM
Hi Acadia,

A row in EditMode will be selected when you click on that row if selection is enabled. So one suggestion is setting the customized color for selected row in order to distinguish between selected rows and row in EditMode.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True" 
            AllowPaging="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1"
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" EditMode="InPlace"
 <SelectedItemStyle BackColor="Aqua" /> 
    <Columns>     
      . . . 
    </Columns> 
</MasterTableView> 
      <ClientSettings> 
           <Selecting AllowRowSelect="True" /> 
      </ClientSettings> 
</telerik:RadGrid> 

Thanks,
Shinu.
0
Acadia
Top achievements
Rank 1
Iron
answered on 11 Feb 2009, 01:52 PM
Thanks, this is what I ended up doing and it works fine.
0
Morten
Top achievements
Rank 2
Iron
Iron
Iron
answered on 23 Mar 2014, 08:17 PM
this works for me:



GridDataItem gdi;

switch (e.Item.ItemType) {

...

...

case GridItemType.EditItem:

gdi = (GridDataItem)e.Item;

gdi.SelectableMode = GridItemSelectableMode.None;
Tags
Grid
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Shinu
Top achievements
Rank 2
Acadia
Top achievements
Rank 1
Iron
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or