Which array exactly? Or string, ArrayList, generic List ?
And how many columns has your dgv?
Just for your info, for populating dgv, its best practice to use DataSet (or DataTable). Its specially designed for that, becuase you can create columns and rows, its actually a copy of dgv. In … Read More
Try and let me know, but remember, when working wit dgv control, best "tool" for populating it, is a dataTable. A good example you have [URL="http://msdn.microsoft.com/en-us/library/system.data.datatable.aspx"]here[/URL]. Read More
[QUOTE=vedro-compota;1437692]Hello dear programmers!
My question isn't unique and i have read many articles about datagridview , but i've understood nothing ((
Please - tell me - how to load an array in datagridview ?
All i've understood is that for this I should use datasourse property -
[CODE]dataGridView1.DataSource = myMap.MapCityMass.ArrayOfCities;[/CODE] … Read More
[QUOTE=vedro-compota;1444742]compiler doesn't know .DataBind() method[/QUOTE]
Sorry for that I thought you were asking for Asp.Net's Gridview
I pasted a link below that surely helps you
[url]http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/860e8b9a-6aea-410b-b3ed-acf9f43a6110/[/url] Read More
This is how you bind objects:
public partial class Form1 : Form
private void a()
System.Collections.ArrayList list = new System.Collections.ArrayList();
list.Add(new BindingObject(1, "One", null));
list.Add(new BindingObject(2, "Two", null));
list.Add(new BindingObject(3, "Three", null));
dataGridView1.DataSource = list;
public … Read More