Custom Cells - Paint content override

1 Answer 30 Views
GridView
Fabrice
Top achievements
Rank 2
Iron
Fabrice asked on 13 Mar 2024, 09:08 AM

Hi,

 

I used to do custom cells by adding controls through "createChildElements" methods, but it was really slow when having multiple columns and row displayed.

So I tried to use graphics only and I did everything in "PaintContent" methods. This is way faster, very smooth, but I sometimes have an error (very randomly) on bounds object (of radshaped form) being lock by another thread.

I wanted to know if this workaround for painting cells approved or not?

If not what/where would you recommand to do this?

Thanks in advance!

 

Simon

 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 14 Mar 2024, 02:54 PM

Hello Fabrice,

I appreciate the provided details explaining your scenario.

The general approach to create a custom visual appearance of our controls or to add additional elements is to use the CreateChildElements as demonstrated in the Creating Custom Cells help article. Looking at the image I am not sure what is the type of custom elements used in the cell. If you could share the custom cells used in RadGridView, I could try to isolate your scenario in a sample project. This way I can have a better look at the custom implementation.

Keep in mind that it is recommended to use our elements while creating the custom cells. Placing controls in the custom cell will reduce the control performance.

I am looking forward to your reply.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
Tags
GridView
Asked by
Fabrice
Top achievements
Rank 2
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or