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

[Solved] InPlace and Form editing

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AdamL
Top achievements
Rank 1
AdamL asked on 16 Sep 2009, 08:45 PM
I have sort of mentioned this in another post but, I think I need to explain it better and focus my post... I apologize for somewhat double posting. 

I have a requirement of needing InPlace editing (similar to a excel spreadsheet) but, Form based editing if the user double clicks the row.  The default state of the grid would be to allow editing in the fields but, if the user double clicks the row, the grid is replaced by an edit form for that row.

To further complicate things, the edit form will need to cycle through the grid on tabs (if the user presses tab on the last field in the edit form, it will display the data from the next row in the form... If no row exists, it will create a new row)

Any thoughts on how to approach this using as much of the built in grid functionality as possible.

- Thanks.

1 Answer, 1 is accepted

Sort by
0
ram+telerik S
Top achievements
Rank 1
answered on 16 Sep 2009, 10:08 PM
I have sort of mentioned this in another post but, I think I need to explain it better and focus my post... I apologize for somewhat double posting. 

I have a requirement of needing InPlace editing (similar to a excel spreadsheet) but, Form based editing if the user double clicks the row.  The default state of the grid would be to allow editing in the fields but, if the user double clicks the row, the grid is replaced by an edit form for that row.

>> Try using GridTemplateColumn with textboxes in your item template, so by default all your grid items would be editable

for double click,  have a  
<clientsettings>
           <ClientEvents OnRowDblClick="RowDblClick"  />
</clientsettings> 

inside your grid and write a corresponding method

function RowDblClick(sender, eventArgs) {
    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
}

you can trap this in Item_Command event ( the commandName would be edit ) if necessary
Tags
Grid
Asked by
AdamL
Top achievements
Rank 1
Answers by
ram+telerik S
Top achievements
Rank 1
Share this question
or