|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagridview and arraylistYou can attach an arraylist to a datgridview by dgv.datasource =
arraylist. If the arraylist elements are a class, is there a way to databind this class to particular columns in grid? Thanks Dwight,
How does the program know that all objects in the arraylist are of the same type. I never tried it, but I would certainly use a list(of Myclass) in this case. That is strongly typed so it can only from one type. Cor Show quoteHide quote "Dwight" <dtrumbo***@gmail.com> schreef in bericht news:1160760818.291450.238490@f16g2000cwb.googlegroups.com... > You can attach an arraylist to a datgridview by dgv.datasource = > arraylist. > > If the arraylist elements are a class, is there a way to databind this > class to particular columns in grid? > > Thanks > Cor Ligthert [MVP] wrote:
> Dwight, I do use a list(of myclass), but I can't find or understand any> > How does the program know that all objects in the arraylist are of the same > type. > > I never tried it, but I would certainly use a list(of Myclass) in this case. > That is strongly typed so it can only from one type. > > Cor > documentation that allows me to bind to columns. When you do dgv.datasource=arraylist, it just adds new columns with the data. So basically your class properties are the column names. I want a little more control than that.
Prevent form minimize
Threading a ShowDialog? - progress form. is there any way to find the position of mouse click on a form Minimizing the Console Window dialog to choose folder in vb .net 2005 SQL datasources Command Prompt or Windows OPEN A FILE FOR READ ONLY How To Redistribute Office 2003 DLLS SQL datasources |
|||||||||||||||||||||||