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

Reg: Add new Record and Edit record in the RadGrid

4 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chandu
Top achievements
Rank 1
Chandu asked on 06 Jul 2010, 02:12 PM
Hi Guy's,

I have RadGrid with "Add new Record" option,"Edit" option also for already added records.
when i click on "Add new Record" option "Grid" is expanding with the input controls and if i click on "Edit" option same controls are displaying with the "rowdata" but ,

for example plz refer this url http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

My Requirement is,
 
When i click on "Add new Record" option system would display input controls (like textbox's,ddl...s e.t.c),
and if i click on "Edit" button Above controls (the controls which are visibled when we click on "Add new Record" option) should be visible false and seleted row will be appear in Edited form

plz provide sloution (refer above mentioned url).....!

Thanks in advance

Chandra.Y








4 Answers, 1 is accepted

Sort by
0
L
Top achievements
Rank 1
answered on 06 Jul 2010, 02:37 PM
hi

Change the editing mode to InForm in the MasterTableView at the properties pane.
0
Princy
Top achievements
Rank 2
answered on 07 Jul 2010, 08:37 AM
Hello Chandu,

I guess you want to hide the insert form when clicking Edit Button and vice versa. If so you can try the following code snippet.

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,
Princy.
0
Chandu
Top achievements
Rank 1
answered on 28 Jul 2010, 01:54 PM
Hi Princy,

Thanku very much.Really helped ur code.

Regards,
Chandra.Y
0
Alon
Top achievements
Rank 1
answered on 18 Nov 2010, 10:49 AM
same same (:

Thanks!

Alon Mashiach
Tags
Grid
Asked by
Chandu
Top achievements
Rank 1
Answers by
L
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Chandu
Top achievements
Rank 1
Alon
Top achievements
Rank 1
Share this question
or