views:

46

answers:

0

I want to create a custom grid derived from DevExpress grid control. I just want to add several columns and add custom painting. I will then use this control in 2 different forms.
The problem is that if I go straightforward and create a class like this:

public class GenerateInvoiceGrid : DevExpress.XtraGrid.GridControl

then I will not be able to work with it on design surface, i.e. I will have to add necessary columns manually in code and so on. And after each change I will have to build the project containing the control and place it on a form to see how it looks. It will take much time and and it is very inconvenient :(

One way can be deriving from UserControl and placing grid control on the design surface. This way I will be able to work with it on design surface, not just manually in code. And I can declare the grid as a public member of my custom control. The latter though does not look very professional to me.

How do people usually do such a task?

Thank you in advance.