Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGrid & Multiple Headers
Message
From
19/08/2004 11:21:44
 
 
To
19/08/2004 11:07:24
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00934527
Message ID:
00934535
Views:
28
Hi, Alvin,

Here's a simple example - let me know if this helps...
dataGridResults.DataSource = MyDataTable;

DataGridTableStyle style = new DataGridTableStyle();
style.MappingName = MyDataTable.TableName.ToString();

DataGridTextBoxColumn fld1 = new DataGridTextBoxColumn(); 
fld1.HeaderText = "Job #";
fld1.MappingName = "JobNumber";
fld1.Width = 100;
 
DataGridTextBoxColumn fld2 = new DataGridTextBoxColumn();
fld2.HeaderText = "Client";
fld2.MappingName = "ClientName";
fld2.Width = 180;

style.GridColumnStyles.AddRange(new DataGridColumnStyle[] {fld1, fld2 });
dataGridResults.TableStyles.Clear();
dataGridResults.TableStyles.Add(style);
Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform