control the *.cs.designer - automatic code writing.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
M

Mr. X.

Hello.
How does the designer make automatic code writing for :
DataGridView.columns properties, which is in code :
this.myDataGridView.columns.AddRange(new ...) ?

Thanks :)
 
Solved out.
I should create a CodeDomSerializer, and there I write the code behinds.

I add also, before the component, the line :
[System.ComponentModel.ToolboxItem(true),
DesignerSerializer(typeof(MyCodeDomSerializer),
typeof(CodeDomSerializer))]

But two problems :
1. The component is "Grid", and I didn't see even that the code on
MyCodeDomeSerializer is reached (first line).
On another component-types (not "Grid"), the code on MyCodeDomeSerializer is
reached immediately.
2. I want to redraw the "Grid" after changes made. Also, when first time I
open my computer, and the grid is shown.
What event occurred just after the code behinds *.cs.designer run ?

Thanks :)
 
For question 2 :
I meant : which event occurs just after InitializeComponent?

Thanks :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top