i hv create a table into the datagrid but how i going to resize the column size....

Dim Table1 As New DataTable("Customer")
Dim Row As DataRow


Try
Dim column1 As DataColumn = New DataColum("Customer Name")
column1.DataType = System.Type.GetTyp("System.String")
Table1.Columns.Add(column1)

Dim column2 As DataColumn = New DataColum("Customer Phone")
column2.DataType = System.Type.GetTyp("System.String")
Table1.Columns.Add(column2)


Catch
End Try

dgCustomer.DataSource = Table1

i hv create a table into the datagrid but how i going to resize the column size....

Dim Table1 As New DataTable("Customer")
Dim Row As DataRow


Try
Dim column1 As DataColumn = New DataColum("Customer Name")
column1.DataType = System.Type.GetTyp("System.String")
Table1.Columns.Add(column1)

Dim column2 As DataColumn = New DataColum("Customer Phone")
column2.DataType = System.Type.GetTyp("System.String")
Table1.Columns.Add(column2)


Catch
End Try

dgCustomer.DataSource = Table1

Solution By Amit S:
This problem can be handled by using table styles. Try by reading help on "tablestyles" and if you still cant find the solution, mail me at coolamit0072003@hotmail.com. I will try to solve your problem by supplying you more details.

This article has been dead for over six months. Start a new discussion instead.