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

Grid / Edit on Row Select

6 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Noha
Top achievements
Rank 1
Noha asked on 03 Nov 2010, 11:46 AM
Dear all

How can I implement RadGrid Row to be in Edit Mode when selecting the row ?

Regards
Noha

6 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Nov 2010, 12:31 PM
Hello Noha,

This demo illustrates how to switch a row in edit mode by double-clicking an arbitrary grid item and how to update this row when the user clicks another row in the grid.

Give it a try and let me know if it works for you..

Kind regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shinu
Top achievements
Rank 2
answered on 03 Nov 2010, 12:53 PM
Hi Noha,


If you want to put the row in EditMode on clicking the row (single click), then the following code will be helpful.

Client code:
function OnRowClick(sender, args) {
    var masterTable = sender.get_masterTableView();
    masterTable.fireCommand("Edit", args.get_itemIndexHierarchical())
}


-Shinu.
0
Noha
Top achievements
Rank 1
answered on 04 Nov 2010, 01:04 PM
@ Shinu 

Thank you so much, you understand my question
Can u tell me What is the event handler of Row Single Click to put this function on it ?

@ ADMIN

Thank you so much, but I want with Single Click not by double-Clicking.
Also Unfortunately I face alot of errors when following the Code illustrated with the demo !!
I think the Example Description not descripe the full steps in details to reach the demo goal.
0
Accepted
Pavlina
Telerik team
answered on 04 Nov 2010, 02:30 PM
Hello Noha,

You should handle OnRowClick client event as shown below:
ASPX:
<ClientSettings>
   <ClientEvents OnRowClick="OnRowClick" />
</ClientSettings>

JavaScript:
<script type="text/javascript">
      function OnRowClick(sender, args) {
          var masterTable = sender.get_masterTableView();
          masterTable.fireCommand("Edit", args.get_itemIndexHierarchical())
      }
  </script>

All the best,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Noha
Top achievements
Rank 1
answered on 04 Nov 2010, 03:03 PM
Dear ADMIN

Thank u so much, It works !

But What I should do to get the updated data on Edited Row in CS code ?!
0
Pavlina
Telerik team
answered on 04 Nov 2010, 03:28 PM
Hi Noha,

The new values which the user entered before triggering the Update command can be fetched calling the ExtractValuesFromItem method. Review the following help topic for more information:
http://www.telerik.com/help/aspnet-ajax/grdretrieveoriginalvaluesforediteditem.html

All the best,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Noha
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Shinu
Top achievements
Rank 2
Noha
Top achievements
Rank 1
Share this question
or