Autor Beitrag
Matg40
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Do 11.05.06 09:12 
Hi !

Kleines aber nerviges Problem:

ich möchte Spalten einer Tabelle einen eindeutigen Namen geben.


Im DataGridView, der die Tabelle anzeigt, soll aber ein lesbarerer angezeigt werden (z.B. über Caption),

aber das funktioniert einfach nicht (es wird immer der ColumnName angezeigt.


Was kann ich da tun :?:


MfG

Matt
OKNER
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 19



BeitragVerfasst: Do 11.05.06 11:36 
Titel: HeaderText setzen
DataGrid1.Columns[0].HeaderText= "neuer Name 1"; //für Spalte 1
DataGrid1.Columns[1].HeaderText= "neuer Name 2"; //für Spalte 2

Gruß
Renko
Matg40 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Do 11.05.06 12:03 
Hi !


Danke, aber es geht an der Stelle nicht. Ich hab

dataGridView1.Columns[0].HeaderCell.Value = "test";

dataGridView1.Columns[1].HeaderText = "test2";

table.Columns[2].ColumnName = "test3";

table.Columns[2].Caption = "test3";

ausprobiert, aber es wird immer der ColumnName der jeweiligen Spalte angezeigt... :cry:


MfG

Matt
Matg40 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Do 11.05.06 14:08 
Hi !


Sorry, :oops: letztendlich gings nach einigen Schwierigkeiten doch mit dataGridView1.Columns[col].HeaderText = "test";


Vielen Dank :!: :!: :!:


MfG

Matt