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

Keep editformsetting Add template open

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dhuss
Top achievements
Rank 1
dhuss asked on 15 Oct 2013, 02:20 PM
Is there anyway to keep the template for adding new records open all the time and prevent it from closing after the insert/save link is clicked .

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 16 Oct 2013, 04:30 AM
Hi ,

Please try the following code snippet to keep the Insert Form all the time.You can cancel the PerformInsert/Cancel command in the ItemCommand event,and If you set the IsItemInserted property to true you will be able to open the insert form on initial load.

C#:
protected void Page_Load(object sender, EventArgs e)
  {
    RadGrid1.MasterTableView.IsItemInserted = true;
  }
 protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
  {
   if (e.CommandName == RadGrid.PerformInsertCommandName || e.CommandName == RadGrid.CancelCommandName)
    {
     e.Canceled = true;           
    }
  }

Thanks,
Princy
Tags
Grid
Asked by
dhuss
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or