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

Open Radgrid in Edit mode after Insert

4 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manav
Top achievements
Rank 1
Manav asked on 26 Dec 2010, 05:12 PM
I have different controls in add and edit mode in my Radgrid. However, i want my grid to open in Edit mode immediately once the Add button is clicked. Is this possible? if yes , can some one tell me how ?

Thanks    

4 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 27 Dec 2010, 04:28 PM
Hi Mark,

You can refer to this article illustrating how you can use different edit and insert forms for the grid.
However, can you specify if you want the edit and insert form to be opened at the same time?

Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Manav
Top achievements
Rank 1
answered on 27 Dec 2010, 07:04 PM
Hi Iana ,
      I basically want to fire the edit command after the item is inserted. We have a couple of additional controls which are visible only when we try to edit the record. The controls indicate child entries for the main record of the grid. Hence, we cant show them until the parent record is populated in the database
we now want these records to be populated immediately once the insert is fired. So after the insert, we want the same record to be opened as if the edit command was fired.  In other words, the itemdatabound should open this record with editmode. I have tried setting the .edit property to true and rebinding the grid but it doesnt work.
Hope this clears my query.
Regards,
Mark
0
Princy
Top achievements
Rank 1
answered on 28 Dec 2010, 05:59 AM
Hello Mark,

One suggestion is to try the following approach to make the last inserted record in edit mode.
First you need to find the last inserted record, then in PreRender find the row index of newly inserted record and put that row in edit mode. You can use the logic in the following Code Library to achieve this.
Select Last Inserted Row

Thanks,
Princy.
0
Manav
Top achievements
Rank 1
answered on 28 Dec 2010, 07:45 PM
Hi Princy,
   I have tried using the item.Selected = true in my pre-render for the last row that was inserted but it does not just do it.
I finally solved that problem though by adding the item.edit = true property and rebinding the grid which makes the grid editable

Thanks for the help though.

Regards,
Mark
Tags
Grid
Asked by
Manav
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Manav
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Share this question
or