If you'd like to create new DataGrid headers to visually separate your grid rows, you can do so quite easily with the DataGridItem object. Creating new DataGrid headers with this object is a three-step process. You start with a new DataGridItem object. Then, you add Cells to the DataGridItem, and finally you add the DataGridItem to the DataGrid, like so:
Dim dgItem As DataGridItem
dgItem = New DataGridItem(0, 0, ListItemType.Header)
Dim dgCell As TableCell
dgCell = New TableCell
dgCell.Text = "someval"
dgItem.Cells.Add(dgCell)
DataGrid1.Controls(0).Controls.AddAt(0, dgItem)
This codë creates a new DataGrid header with one table cell and adds it to the first row of DataGrid1 on a Web form.
Print this post
Welcome to New Horizons!
With 300 centers in 70 countries, New Horizons is the world’s largest independent IT training company. Our innovative, award-winning learning methods have revolutionized the way students learn, retain and apply new knowledge; and we offer the largest Guaranteed-to-Run course schedule in the world.
Our real-time, cloud-based lab solution allows students to access their labs anytime and anywhere. And we offer an extensive selection of vendor-authorized training and certifications for Microsoft, Cisco, CompTIA and VMware, ensuring that students are able to train on the latest products and technologies. Over our 30-year history, New Horizons has trained over 30 million people worldwide.
Our real-time, cloud-based lab solution allows students to access their labs anytime and anywhere. And we offer an extensive selection of vendor-authorized training and certifications for Microsoft, Cisco, CompTIA and VMware, ensuring that students are able to train on the latest products and technologies. Over our 30-year history, New Horizons has trained over 30 million people worldwide.
Monday, August 15, 2011
Subscribe to:
Post Comments
0 comments:
Post a Comment