I am a beginner. I need to create a table in visual c# such that the number of rows would be created based on user input. The number of colums is 3. For example, if a user enters 3 as the input, a table of 3 rows would be created. If he enters 5, a table of 5 rows would be created.

Recommended Answers

All 2 Replies

Are you using a Console or a Forms application?

Since your post is tagged Visual, I'll assume this is a Forms application. Examine the properties and methods of the ListView class, if necessary you can probably find tutorials on using it online. This class can be configured to show a grid and it can be set for any number of columns and rows.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.