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

hide space in edit row

1 Answer 15 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alice Julia
Top achievements
Rank 1
Alice Julia asked on 10 May 2010, 10:31 AM
When i edit a row, i don't want a edit form or an inline edit. Instead i have some controls on the top of my page which will be populated when i click edit in radgrid. My problem is even if i can achieve this, still updat/cancel options were showing below the selected row. I made that invisible by following some code. Update & Cancel buttons are made invisible. But how to avoid the space below the selected row?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 May 2010, 12:32 PM

Hello Alice,

One suggestion for not showing the EditForm is cancelling the default edit command and loading the edited data in the external form. For cancelling the Edit command, you can use the following code.

C#:

 
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)  
    {  
        if (e.CommandName == RadGrid.EditCommandName)  
        {                    
              e.Canceled = true//cancel default edit command      
              e.Item.Selected = true;  
              DisplayEditForm(e.Item as GridDataItem); // for loading the edited data in the external form  
        }  
    } 

Also, you can find demonstration on how to perform edit/update/delete/insert operations in RadGrid using an external form in the demo.

Editing with external form

-Shinu.

Tags
Grid
Asked by
Alice Julia
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or