select

Grid / User Control Edit Form

Rate this demo: Feedback
Run example in: C# VB.NET Change Skin:
Vista
  • BlackBlack
  • DefaultDefault
  • ForestForest
  • HayHay
  • Office2007Office2007
  • OutlookOutlook
  • SimpleSimple
  • SitefinitySitefinity
  • SunsetSunset
  • TelerikTelerik
  • VistaVista
  • Web20Web20
  • WebBlueWebBlue
  • Windows7Windows7
This example shows how:
  • One can adopt user controls as RadGrid's edit/insert forms.
Add new recordRefresh
 TOCFirstNameLastNameHire DateTitle 
EditMs.NancyDavolio5/1/1992 12:00:00 AMSales RepresentativeDelete
EditDr.AndrewFuller8/14/1992 12:00:00 AMVice President, SalesDelete
Employee Details
Personal Info:
Country:
City:
Region:
Home Phone:
Birth Date:
Title Of Courtesy
Notes:
Address:
Company Info:
FirstName:
Last Name:
Hire Date:
Title:
 
EditMs.JanetLeverling4/1/1992 12:00:00 AMSales RepresentativeDelete
EditMrs.MargaretPeacock5/3/1993 12:00:00 AMSales RepresentativeDelete
EditMr.StevenBuchanan10/17/1993 12:00:00 AMSales ManagerDelete
EditMr.MichaelSuyama10/17/1993 12:00:00 AMSales RepresentativeDelete
EditMr.RobertKing1/2/1994 12:00:00 AMSales RepresentativeDelete
EditMs.LauraCallahan3/5/1994 12:00:00 AMInside Sales CoordinatorDelete
EditMs.AnneDodsworth11/15/1994 12:00:00 AMSales RepresentativeDelete

Example Source Code & Description

Instructions
Open in new window
  • Telerik RadGrid supports custom edit forms for management of item content. You can switch the type of the edit forms using the GridEditFormType Enumeration.
    In the example above the edit form is a WebUserControl specified by the UserControlName property. The same user control will be used for the insert form as well. The user control implements a public DataItem property through which Telerik RadGrid sets the correct values for the editor controls (when loading the user control). This allows the developer to write binding expressions to bind the server controls in the user control to the corresponding DataItem.

    Note that WebUserControl custom edit form is not supported with simple data-binding (calling DataBind()). See the Simple data binding demo from the Populating with data section for more info about the limitations of this binding mode.

    These documentation topics discuss in detail how to update/insert records using WebUserControl custom edit form:
    Updating values with user control edit form
    Inserting values with user control edit form
    Deleting records
Compatible with ASP.NET 2.0, 3.5 AJAX enabled Accessibility Verified!Valid XHTML 1.1! Optimized for Visual Studio 2005, 2008
Copyright 2002-2010 © Telerik. All right reserved  | 
Telerik Inc., 460 Totten Pond Rd, Suite 640, Waltham, MA 02451

www.telerik.com  |  Terms of Use  |  Contact Us