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

One edit form at a time

4 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Krutika
Top achievements
Rank 1
Krutika asked on 31 Jan 2013, 07:08 PM
I have a radgrid with edit form as a popup.
Rdgrid allows multiple popup forms to appear when clicked on rows to edit.
I have 'multipleRowEdit' set to false

How to restrict only one modal popup at a time?

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Feb 2013, 06:09 AM
Hi,

If you are setting AllowMultiRowEdit to false, then two edit form popup won't show at a time. Please take a look into the code snippet i tried to show either edit or insert form is open at a time.

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

Thanks,
Shinu.
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 01 Feb 2013, 06:17 AM
Hello,

1.
Please check that you have not created any global skin for that. It may be you have created global skin with AllowMultiRowEdit="true".

2.
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.EditCommandName)
        {
            if (RadGrid1.EditItems.Count > 0)
            {
                RadGrid1.MasterTableView.ClearEditItems();
            }
 
        }
    }


Thanks,
Jayesh Goyani
0
Krutika
Top achievements
Rank 1
answered on 06 Feb 2013, 08:47 PM
I have specifically made AllowMultiRowEdit = false. I managed to allow only one popup at a time.

I want one popup modal at a time, but I want to allow user to be able to edit more than one row in a session. i.e., after editing one row and updating, user should be able to edit another row in the grid.  Currently that is not the case. How do I fix this?
0
Shinu
Top achievements
Rank 2
answered on 07 Feb 2013, 08:17 AM
Hi,

Unfortunately I couldn't replicate the issue. Please provide your complete code and elaborate the scenario.

Thanks,
Shinu.
Tags
Grid
Asked by
Krutika
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jayesh Goyani
Top achievements
Rank 2
Krutika
Top achievements
Rank 1
Share this question
or