Stopping wincode generation?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
B

Brett Romero

I have a custom datagrid. When I put it onto a form, all sorts of
wincode is generated for the grid. This causes conflicts. For
example:

// dataGridTableStyle8
//
this.dataGridTableStyle8.DataGrid = this.dggrid;
this.dataGridTableStyle8.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGridTableStyle8.MappingName = "default";

I already define a dataGridTableStyle in the custom grid called
default. Is there a way to stop this wincode from being generated?

Thanks,
Brett
 
You need to read up on attributes that control design-time behaviour,
in particular:

BrowsableAttribute
DesignerSerializationVisibilityAttribute
etc.

There are lots of articles on how to control code generation by the
Designer. Try some of these out:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/vsnetpropbrow.asp

http://msdn2.microsoft.com/en-us/library/ms171726.aspx

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/custcodegen.asp
 

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