I want to display my table columns and data in datagridview at run time when user select table name I know that i have to set bindingsourse property . But i dont know how to do programming for that can you tell me.
virusisfound
0
Junior Poster
Recommended Answers
Jump to PostYou mean table as DataTable? DataTable cannot be bind to dgv control. You can only populate dgv with using DataRow object, like for instance:
dataGridView1.Columns.Add("col1", "ID"); dataGridView1.Columns.Add("col2", "NAME"); string[] array1 = new string[] { "one", "two", "three" }; table = new DataTable("myTable"); table.Columns.Add(new DataColumn("id", typeof(int))); table.Columns.Add(new DataColumn("name", …
Jump to PostWhat the problem is ? are you getting any error ? show us your some efforts that what you have done so far ?
I understand the concept.
But.
I have create my table at run time. when new table is create then the data of that table show in …
All 7 Replies
Mitja Bonca
557
Nearly a Posting Maven
virusisfound
0
Junior Poster
rohand
1
Posting Whiz in Training
Mitja Bonca
557
Nearly a Posting Maven
virusisfound
0
Junior Poster
rohand
1
Posting Whiz in Training
virusisfound
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.