Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_csharp_gui_programming thread: How do I modify my column names in a datagrid??


Message #1 by "andres" <britt50423@y...> on Tue, 18 Mar 2003 06:25:26
Hi... i'm stuck with this simple problem. I managed to create an array
list of objects and bind it to a datagrid component. In other words, I
created a class (with property accessors -get and set-) and bound it to
a data grid.

The datagrid is filled automatically with the data I input. so far so
good. But the problem is that when I run my form the column names are my
private variable names in my class.

I'm using the currencymanager class, something like this:

private ArrayList al = new ArrayList();    
private CurrencyManager currencyManager=null;

al.Add (new MyGrid("1", ""));
currencyManager = (CurrencyManager)dataGrid1.BindingContext[al];
dataGrid1.DataSource=al;


MyGrid is a class with set and get methods... this class has two private
variables. These two private variables names are showing in the column
names... 

How can I modify this...?

thanks


  Return to Index