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

Edit or Insert One item at a time

2 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Said
Top achievements
Rank 1
Said asked on 15 May 2014, 02:01 PM
Hi,
I'm using a radgrid containing DetailTables and EditFormTemplate for parent and child,
I want to know how can i insert or edit an item at time (Parnent or child) i found this tutorial :Edit/Insert Once
i changed the code as bellow 

if (e.CommandName == RadGrid.InitInsertCommandName)
{
    e.Item.OwnerTableView.ClearEditItems();
    grid.MasterTableView.ClearEditItems();
    e.Item.OwnerTableView.IsItemInserted = false;
    grid.MasterTableView.IsItemInserted = false;
}
 
if (e.CommandName == RadGrid.EditCommandName)
{
    e.Item.OwnerTableView.ClearEditItems();
    grid.MasterTableView.ClearEditItems();
    e.Item.OwnerTableView.IsItemInserted = false;
    grid.MasterTableView.IsItemInserted = false;
}

but it allow me to insert child and parent item in the same time or Edit different child item at the same time too.
thx.

2 Answers, 1 is accepted

Sort by
0
Said
Top achievements
Rank 1
answered on 16 May 2014, 10:52 AM
Hi, so i try this solution Only One Edit or Insert without the code used for collapse each item because i have the requirement of letting the whole Grid expanded, and it still don't work in this case :

-Click insert Command on Master Table
-Click insert Comman on Detail Table
OR
-Click insert Comman on Detail Table
-Click insert Comman on different Detail Table

the two EditForm are visible.








0
Eyup
Telerik team
answered on 20 May 2014, 01:40 PM
Hi Trabelsi,

I have created a sample RadGrid web site to demonstrate how you can achieve the requested functionality. Please run the attached application and let me know if it helps you.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Said
Top achievements
Rank 1
Answers by
Said
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or