Creating custom columns for the RadGridView

6 posts, 0 answers
  1. Gerben
    Gerben avatar
    14 posts
    Member since:
    Jul 2010

    Posted 13 Jul 2010 Link to this post

    Hi all,

    I just downloaded the WinForms controls and I have a question about the RadGridView.

    For a new project I am looking for a way to create my own custom columns for the RadGridView.

    For example I need a column with a text field and an image button. How could I create something like this?

    I am using C# .NET 3.5 with Visual Studio 2008

    greetings,

    G.
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 16 Jul 2010 Link to this post

    Hi Gerben,

    Thank you for the interests of our product.

    You can customize grid cells by adding different elements to them. You can do that by using a custom cell element which inherits from one of the default ones or by simply adding items to the child collection of the cell elements in the CellFormatting event. You can find more details about how to that in the following knowledge base articles:
    Adding custom elements to grid cells
    Adding custom elements inside a cell when it is in edit mode
    Creating a RadRadioButtonCellelement

    Let me know if you have any additional questions.

    All the best,
    Martin Vasilev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. moftol
    moftol avatar
    17 posts
    Member since:
    Feb 2008

    Posted 12 Feb 2013 Link to this post

    Hi,

    please let me know if it is possible to add custom controls to child templates of telerik gridview.

    Thanks.


  4. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 14 Feb 2013 Link to this post

    Hello Farooq,

    Yes, this is possible, however, we do not recommend nesting user controls inside grid cells. This may result in performance issues and high memory usage. In addition it is not possible to clip child controls in WinForms. As a result, the child control will appear over scrollbars and over the header area. Please consider the following thread where the same issue is discussed.

    Please describe in detail the exact scenario that you want to achieve and we will try to find the best option.

    I am looking forward to your reply.

    Regards,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  5. Mohammed
    Mohammed avatar
    3 posts
    Member since:
    Oct 2018

    Posted 17 Oct 2018 Link to this post

    Kindly, i have problem that value of custom column is removed or reset while adding new row in RadGridView

    i create custom control "AccountDropDownTree" that contains DropDownBox and TreeView

    to view financial account tree.

    then i added custom control to AccountCellElement as in attached picture  "Custom Cell element".

    then set cell type of custom column " GridViewAccountColumn"  to AccountCellElement as in attached picture "Custom Column"

    the problem is that while enter data or adding new row , i select account from custom column gridviewaccountcolumn,but once i pressed Tab or moved to next cell the value of Custom column gridviewaccountcolumn is removed or reset to default.

    even cellvalue for that column in code behind is null.

    please, is there any advice to fix this issue.

  6. Hristo
    Admin
    Hristo avatar
    1519 posts

    Posted 19 Oct 2018 Link to this post

    Hello Mohammed,

    It is hard to say what is causing the undesired behavior in your project without actually having it on our end. In this respect, please open a support ticket and send us your project with the custom column. 

    Regards,
    Hristo
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top