473,395 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

TableLayout panel and panel in window form application

I want that no matter how many records are there in database like for examlple 10 records in database so that i should click on a button rows and columns sholuld be add after click on button i should not have to change the code for like there are 3 or 4 columns and i want columns sholud be driven by database I want that just like i am sending you the pic in which there is panel just like the way you send me the way i sent you on button there is click on rows add and column also add
me use Tablelayout panel and you see this pic just like me want
Attached Images
File Type: jpg 23845419_10212242729600577_1228033079_n.jpg (25.6 KB, 216 views)
Nov 28 '17 #1
1 1820
Frinavale
9,735 Expert Mod 8TB
It would be helpful if you posted the code that you have implemented so far in attempting to solve this problem.

I find your question confusing.

You should have a method that handles the button click event and you should have something in that method that adds a row to the table.

If you are using a DataTable then you should be able to add a new row like like this:

Expand|Select|Wrap|Line Numbers
  1. 'Creating new row:
  2. Dim theNewRow As DataRow = theSourceDataTable.NewRow
  3.  
  4. 'Adding the row to the table:
  5. theSourceDataTable.Rows.Add(theNewRow)
  6.  
You can even loop through the columns of the new row and initialize them with data:


Expand|Select|Wrap|Line Numbers
  1. 'Creating new row:
  2. Dim theNewRow As DataRow = theSourceDataTable.NewRow
  3.  
  4. 'Looping through the columns of the table
  5. For Each col As DataColumn In theSourceDataTable.Columns
  6.   theNewRow(col) = "Initialized Data"
  7. Next
  8.  
  9. 'Adding the row to the table:
  10. theSourceDataTable.Rows.Add(theNewRow)
  11.  

We can't really help you much more than this until you show us what you have tried so far to solve the problem.
Nov 28 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Programatix | last post by:
Hi, I'm working on a project which includes XML WebServices and Windows Form application. The Windows Form application will call the XML WebServices to retrieve data from database. The data...
1
by: Yasutaka Ito | last post by:
Hi, I have an MDI application, in which I want to embed one form (System.Windows.Forms.Form) into a specified area of my MDI application. This is, wihtout affecting the capability of other child...
1
by: Kueishiong Tu | last post by:
I have a .net window form application but I have to get data from various web sites. How do I make Http request (preferrably via post method) from a window form to get the data from those web...
2
by: Kueishiong Tu | last post by:
I have a window form application. My program generates a report. I want to invoke the window notepad program to show the report. How do I do that?
2
by: MicroMoth | last post by:
Hi, Is it possible to access classes created in th app_code folder of a website, within a windows form application. The website I am trying to work with has the functionality to create a report...
1
by: yu83thang | last post by:
Hi, May I know how to declare a Class in C++ window application form? Below is my code and error as shown below as well. here is my class declaration: ref class CLoadObj { public:
1
by: bushra lokeman | last post by:
i want to display hello in textbox when i click on a button in window form application.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.