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

Inline editing

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Athol
Top achievements
Rank 1
Athol asked on 05 Apr 2013, 06:21 AM
Dear Telerik Support Team,

I am reaching out to you to seek your assistance in regards to RadGridView.

The issue is that I can edit a row after the second trial. When the row is double-clicked for the first time to update, it allows me to use edit-textbox to edit. However, the number in the cell will remain the same. From the second time to try updating, it works. In other words, I can update the cells in RadGridView after double-cliking on a row from the second time.

Simply, I copied the sample code available on your website and pasted it to a .ascx file in a new sharepoint empty project. (the code is available at  http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx )

In ascx, 
The changes I made to the original code is the columns and DataSource that refer to my own data in my DB.
Also I removed the below lines, as one script is only allowed in a page.
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
I also removed  <form id="form1" runat="server"></form>

It would be highly appreciated if you could help me with this issue.

Best regards,

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 09 Apr 2013, 08:49 AM
Hi,

 The function that updates the row is the handler for the RowClick event:

function RowClick(sender, eventArgs) {
                if (editedRow && hasChanges) {
                    hasChanges = false;
                    if (confirm("Update changes?")) {
  
                        $find("<%= RadGrid1.ClientID %>").get_masterTableView().updateItem(editedRow);
                    }
                }
            }

You can first check whether it is fired appropriately after you have edited a row and then you click on another row. Then you can also check the value of the boolean variables: "editedRow" and "hasChanges". They both have to be true after you edited the row in order for the update to happen.
Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Athol
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or