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

Grid / Edit on Double-click issues

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BHARATH
Top achievements
Rank 1
BHARATH asked on 30 Oct 2010, 07:54 PM
I have developed a screen similar to http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx. I want to make it work in such a way that the cell value is saved  when a click is made anywhere on the page.I am able to edit the cell by double cliking the cell. I am able to save the edited value when i click on a grid row. When i click on any area apart from the grid, the value is not getting saved. I want to make it work in such a way that the cell captures value when a click s made anywhere on the page. Please help me asap.

Awaiting your reply,
Baarat

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 04 Nov 2010, 12:56 PM
Hello BHARATH,

To implement the desired functionality, I recommend that you handle the onclick event of the body and perform the update  in its event handler:
ASPX
<body onclick="BodyOnClick();">
Javascript
function BodyOnClick()
{
    if(editedRow && hasChanges)
    {
           hasChanges = false;
           if(confirm("Update changes?"))
        {
 
            $find("<%= RadGrid1.MasterTableView.ClientID %>").updateItem(editedRow);
        }
    }
}

I hope this helps.

All the best,
Mira
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
BHARATH
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or