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

RadGrid Issue Regarding Insert/Update Modes

2 Answers 21 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nani
Top achievements
Rank 1
Nani asked on 10 Oct 2011, 05:05 PM
Hi Telerik Team,

I am using a Radgrid that can perform Insert and Update records. My requirement is how do i close the "Update Mode" when some one hit "Add new Record" and vice-versa. RadGrid has the default functionality when we click on one row the other which is in update mode closes by itself but how to acheive my requirement. Please suggest a solution.

Please do reply. Its urgent..!!!

Thanku in Advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 10 Oct 2011, 05:47 PM
Hello,

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.InitInsertCommandName)
            {
                RadGrid1.MasterTableView.ClearEditItems();
            }
            else if (e.CommandName == RadGrid.EditCommandName)
            {
                RadGrid1.MasterTableView.IsItemInserted = false;
            }
 
        }


Thanks,
Jayesh Goyani
0
Nani
Top achievements
Rank 1
answered on 10 Oct 2011, 09:06 PM
Wow it works great Thanku verymuch Jayesh.
Tags
General Discussions
Asked by
Nani
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Nani
Top achievements
Rank 1
Share this question
or