Feed
Google+
Contact
XING
LinkedIn
Twitter
ICQ
meebo.com

DataGridTableStyle problem still

by Roland Schumacher alias GENiALi 20. Februar 2006 -- 113 words  -- 1 mal gelesen

Because I was looking for long.
I will miss a DataGrid in a WinForm app a new appearance.
This can be done with DataGridTableStyle.

public static DataGridTableStyle GetGridStyle()
{
DataGridTableStyle = tableStyle
new DataGridTableStyle();
tableStyle.MappingName = "CATI_History";

Id = DataGridTextBoxColumn
new DataGridTextBoxColumn();
ID.HeaderText = "DB ID";
ID.MappingName = "ID";
ID.Width = 2;
ID.ReadOnly =
false ;
tableStyle.GridColumnStyles.Add(id);

= DataGridTextBoxColumn studNr
new DataGridTextBoxColumn();
studNr.HeaderText = "studies No.";
studNr.MappingName = "Study number";
studNr.Width = 100;
studNr.ReadOnly =
false ;
tableStyle.GridColumnStyles.Add(studNr);

return tableStyle;
}

You must bind the thing still to the DataGrid.

if(dgCatiLzData.TableStyles.Count_==_0)
{
dgCatiLzData.TableStyles.Clear();
dgCatiLzData.TableStyles.Add(Helper.GetGridStyle());
}

Unfortunately that brought a success. The problem of the row

tableStyle.MappingName = "CATI_History";

I have specified the table of the SQL DB here. Bound to the DataGrid
but I have a collection of type records. Searched how stupid.
The solution:

tableStyle.MappingName = "Records";

Tags:

Kommentare sind geschlossen

Statistik

Gesamte Posts: 1025
Dieses Jahr: 7
Diesen Monat: 1
Diese Woche: 0
Kommentare: 929
Total Bewertungen: 91
Ø Bewertung: 4,42
Meisten Kommentare
Google+ ... (28)
Beste Ø Bewertung
Tastaturlayout von Visual Stud ... (5)
Meiste Bewertungen
Windows 7 und die ersten Erfah ... (5)

Buttons

Stop Spam Harvesters, Join Project Honey Pot Benutzerprofil von GENiALi connection speed test network connection Bloggeramt.de Slug.ch Blog Verzeichnis und Blog Webkatalog Schumacher Roland Seitwert Valid XHTML 1.0 Transitional

writing