Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Formatted Data:

Status
Not open for further replies.

BoostMR2

IS-IT--Management
Jul 20, 2007
33
0
0
US
I have some fairly simple data that I want to display in a scrollable window in my C# app. I do not have the data saved in a table or anything yet, so i am flexible for this solution.

I have a few servers I check for via ping, to make sure thye are up, and report a status. I need to display a "table" or something like a table of this info, which should look like this:

#1 <servername> <status>
#2 <servername> <status>
etc

only 3 columns, and possibly 20+ records, but only 10 or so to show, and the rest of the records should be scrollable in the window.

First off, a label does not work for this. There is no scroll function. I looked into datagrids and datasets, and ofcourse binding the 2, but that seems overcomplicated for this solution. Or maybe I am overcomplicating datagrids =)

Is there a simple textarea with vertical scroll enablement? if there is, I could just use stringbuilder to build up a string with Environment.NewLines to format the rows.

I have anything from .Net 1.1.4 available to me.
Perks would be to color-code each line, or atleast alternate record colors for readability, etc. Images are a plus as well.
 
datagridviews aren't tricky.

1. declare a class to hold your data
2. instantiate a List<class> to hold your list
3. point the DataGridView.DataSource at the list

otherwise, the properties of a textbox you're looking for are MultiLine = true and ScrollBars = Vertical.

mr s. <;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top