As I get the data to populate the data table (stored as 4 string variables strContinent, strCompetitionName, etc), can I use the add data row - ‘ArrayRow’ function to pass the information to the data table? Please can I ask how to write the code for this? I believe it involves using the {} but I can’t quite get it right.
Create a DataTable and define columns as in the following: DataTable table = new DataTable();
Add rows as in the following: table.Rows.Add(111, “Devesh”, “Ghaziabad”);
Binding DataGridView as in the following: dataGridView1.DataSource=table;
Running the code, the following will be the screen.
To know more visit our page: http://www.cetpainfotech.com/technology/oracle-developer-Training
Hey @Sriram07 thank you for the reply, those are the correct headers, how do I then pass in the data to go in to these columns in the datatable (e.g how to I get the strContinent variable to populate the Continent column?)
@jordrowley kindly accept @Sriram07’s answer as solution… as he was the original poster… I just pointed out the issue with copy and paste from forum to other application