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

Creating custom columns for the RadGridView

5 Answers 811 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gerben
Top achievements
Rank 1
Gerben asked on 13 Jul 2010, 03:19 PM
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.

5 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 16 Jul 2010, 03:32 PM
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
0
moftol
Top achievements
Rank 1
answered on 12 Feb 2013, 12:23 PM
Hi,

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

Thanks.


0
Jack
Telerik team
answered on 14 Feb 2013, 03:12 PM
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.
0
Mohammed
Top achievements
Rank 1
answered on 17 Oct 2018, 12:44 PM

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.

0
Hristo
Telerik team
answered on 19 Oct 2018, 11:47 AM
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.
Tags
GridView
Asked by
Gerben
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
moftol
Top achievements
Rank 1
Jack
Telerik team
Mohammed
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or