Create Custom GridView Control

3 posts, 0 answers
  1. ShareDocs
    ShareDocs avatar
    88 posts
    Member since:
    Oct 2012

    Posted 05 Nov 2012 Link to this post


     I am trying to create my custom gridview controls which inherit from radgridview.


    The Code:


    public partial class eRadGridView : Telerik.WinControls.UI.RadGridView


    public eRadGridView()






            public eRadGridView(IContainer container)








    When I try to droll it from the toolbox, I get the attach error.
    Please let me know what I am doing wrong.

  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 07 Nov 2012 Link to this post


    In your case, the container is null.

    But you don't need to do all of these, you could just simply do:
    public class eRadGridView : Telerik.WinControls.UI.RadGridView
        public eRadGridView()
            // perform initialization here

    Best Regards,
    Emanuel Varga
    Winforms MVP
  3. Stefan
    Stefan avatar
    2906 posts

    Posted 08 Nov 2012 Link to this post

    Hello guys,

    Just to add that you will also need to override the ThemeClassName:
    public override string ThemeClassName 
                    return typeof(RadGridView).FullName; 

    as explained here:

    I hope this helps.
    All the best,
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top