what is the procedure to display the datagrid column header with heading

what is the procedure to display the datagrid column header manually with heading and show 1 row in the datagrid without getting the columns or row through database

thanks

[184 byte] By [AtherAbbas] at [2007-12-24]
# 1

You could manually create a DataSet, populate it with a DataTable and bind it to the DataGrid. Here is an example of creating a DataSet from MSDN:

Dim customerOrders As DataSet = New DataSet("CustomerOrders")

Dim ordersTable As DataTable = customerOrders.Tables.Add("Orders")

Dim pkOrderID As DataColumn = ordersTable.Columns.Add( _

"OrderID", Type.GetType("System.Int32"))

ordersTable.Columns.Add("OrderQuantity", Type.GetType("System.Int32"))

ordersTable.Columns.Add("CompanyName", Type.GetType("System.String"))

ordersTable.PrimaryKey = New DataColumn() {pkOrderID}

WilliamBartholomew at 2007-8-31 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...