Table control and display in c# program

Create a table in windows forms for real time manipulation

Page 1 of 1

3 Replies - 6734 Views - Last Post: 21 October 2010 - 09:56 AM Rate Topic: -----

#1 steven107  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 18-October 10

Table control and display in c# program

Posted 20 October 2010 - 01:54 PM

I'm a business major student and currently writing a c# program simulating game theory for a stock trading trend. I'm applying bottom-up, devide-and-conquer approaches onto my code writing. I started the project with a Windows Application Form.

I have done most of the part of the stock price simulation program. There are 3 possibilities: up, down or flat, relating to a stock price in any given period (seconds in my program like a trading day in real life). I want my program to display the outcomes in the following table format (Please refer to the attached picture) in real time while it's doing the simulation.

Attached Image

My questions are:

1. Is DataGridView the only built in tabular control in c#?

2. How can I implement (and display) a table (and its contents) in c# other than using DataGridView without applying complex drawing classes? (My code requires my entry to the table be treated like an excel worksheet in from-top-to-bottom-then-left-to-right sequence. My guess is, DataGridView doesn't allow me to do that.)

Is This A Good Question/Topic? 0
  • +

Replies To: Table control and display in c# program

#2 erburrell  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 146
  • Joined: 22-December 09

Re: Table control and display in c# program

Posted 20 October 2010 - 02:04 PM

Actually, I would that a gridview control would be easy to use if I am understanding correctly. You could create your columns at the formload event, and then add rows using the GridVew.Rows.Add(item1, item2, item3,....) command. If your headers represent your stocks, then the changes to the stocks could be added a row at a time for each interval. If you only want to keep so many changes visible, you can delete the first row, and then add a row at each update.

Did that make any sense?

Ed.
Was This Post Helpful? 0
  • +
  • -

#3 steven107  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 18-October 10

Re: Table control and display in c# program

Posted 21 October 2010 - 08:51 AM

The whole program only represent one stock. Thank you for your reply. I understand now.
Was This Post Helpful? 0
  • +
  • -

#4 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: Table control and display in c# program

Posted 21 October 2010 - 09:56 AM

To me, your image looks just like what a DataGridView shows. Maybe I am not understanding what your problem is.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1