Click here to Skip to main content
15,887,967 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to draw the table? Pin
Christian Graus16-Sep-07 12:53
protectorChristian Graus16-Sep-07 12:53 
GeneralRe: How to draw the table? Pin
Paul Conrad16-Sep-07 13:10
professionalPaul Conrad16-Sep-07 13:10 
GeneralRe: How to draw the table? Pin
Christian Graus16-Sep-07 13:19
protectorChristian Graus16-Sep-07 13:19 
GeneralRe: How to draw the table? Pin
Paul Conrad16-Sep-07 13:26
professionalPaul Conrad16-Sep-07 13:26 
GeneralRe: How to draw the table? [modified] Pin
Seryoga16-Sep-07 19:37
Seryoga16-Sep-07 19:37 
GeneralRe: How to draw the table? Pin
Lutosław17-Sep-07 2:42
Lutosław17-Sep-07 2:42 
GeneralRe: How to draw the table? Pin
Seryoga17-Sep-07 4:17
Seryoga17-Sep-07 4:17 
GeneralRe: How to draw the table? Pin
Lutosław17-Sep-07 5:08
Lutosław17-Sep-07 5:08 
U can put the data to some control and then render this control to a bitmap:
C#
int[,] array = new int[3, 4];
Size size = Size; 
b = new Bitmap(size.Width, size.Height);
//Graphics g = Graphics.FromImage(b);
int dataWidth = array.GetLength(0);
int dataHeight = array.GetLength(1);
DataGridViewColumn column;
for (int x = 0; x < dataWidth; x++) {
    column = new DataGridViewColumn();
	column.CellTemplate = new DataGridViewTextBoxCell();
    column.Name = "col" + x.ToString();
    column.HeaderText = x.ToString();
	column.ValueType = typeof(int);
    gridView.Columns.Add(column);
}
object[] rowData;
for (int y = 0; y < dataHeight; y++) {
	rowData = new object[dataWidth];
    for (int x = 0; x < dataWidth; x++) {
		rowData[x] = array[x, y];
    }
    gridView.Rows.Add(rowData);
}
gridView.DrawToBitmap(b, new Rectangle(new Point(0), gridView.Size));
BackgroundImage = b;



(where gridView is a DataGridView)

Greetings - Gajatko

Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

GeneralRe: How to draw the table? Pin
Seryoga17-Sep-07 7:07
Seryoga17-Sep-07 7:07 
GeneralRe: How to draw the table? Pin
Lutosław17-Sep-07 7:58
Lutosław17-Sep-07 7:58 
QuestionComboBox Pin
babbelfisken16-Sep-07 10:16
babbelfisken16-Sep-07 10:16 
AnswerRe: ComboBox Pin
Lutosław16-Sep-07 10:23
Lutosław16-Sep-07 10:23 
QuestionNEW - Birthday Reminders in Outook Pin
zevman16-Sep-07 10:05
zevman16-Sep-07 10:05 
AnswerRe: NEW - Birthday Reminders in Outook Pin
Christian Graus16-Sep-07 10:13
protectorChristian Graus16-Sep-07 10:13 
GeneralRe: NEW - Birthday Reminders in Outook Pin
zevman16-Sep-07 10:26
zevman16-Sep-07 10:26 
AnswerRe: NEW - Birthday Reminders in Outook Pin
Paul Conrad16-Sep-07 10:15
professionalPaul Conrad16-Sep-07 10:15 
QuestionOutlook Birthday Reminders Pin
zevman16-Sep-07 8:17
zevman16-Sep-07 8:17 
AnswerRe: Outlook Birthday Reminders Pin
Paul Conrad16-Sep-07 8:26
professionalPaul Conrad16-Sep-07 8:26 
GeneralRe: Outlook Birthday Reminders Pin
zevman16-Sep-07 9:06
zevman16-Sep-07 9:06 
GeneralRe: Outlook Birthday Reminders Pin
Lutosław16-Sep-07 9:48
Lutosław16-Sep-07 9:48 
GeneralRe: Outlook Birthday Reminders Pin
zevman16-Sep-07 10:08
zevman16-Sep-07 10:08 
GeneralRe: Outlook Birthday Reminders Pin
Paul Conrad16-Sep-07 10:10
professionalPaul Conrad16-Sep-07 10:10 
GeneralRe: Outlook Birthday Reminders Pin
zevman16-Sep-07 10:19
zevman16-Sep-07 10:19 
GeneralRe: Outlook Birthday Reminders Pin
Paul Conrad16-Sep-07 10:22
professionalPaul Conrad16-Sep-07 10:22 
GeneralRe: Outlook Birthday Reminders Pin
zevman16-Sep-07 9:08
zevman16-Sep-07 9:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.