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

Different edit forms on edit and insert

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 2
Phil asked on 04 Jan 2009, 02:46 AM

Hi

I have coded the following per http://www.telerik.com/help/aspnet/grid/grddifferenteditformsoneditandinsert.html , but this url is not to the Ajax help, and I can not find a similar page under Ajax help:

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
    If (e.CommandName = RadGrid.InitInsertCommandName) Then
        e.Canceled = True
        RadGrid1.EditIndexes.Clear()
        e.Item.OwnerTableView.EditFormSettings.UserControlName = "~/uc/InvoiceAdd.ascx"
        e.Item.OwnerTableView.InsertItem()
    End If
End Sub

When I run it, does not insert the user control into the insert template.  Is this still supported?  Or am I not doing enough?

1 Answer, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 2
answered on 04 Jan 2009, 07:11 PM
Hi:
I added the following:

   e.Item.OwnerTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl

and things are better

Tags
Grid
Asked by
Phil
Top achievements
Rank 2
Answers by
Phil
Top achievements
Rank 2
Share this question
or