Click here to Skip to main content
14,838,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

i am writing this code for retrieve data in gridview from databsse

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\panchani\Documents\Visual Studio 2005\Transport.mdb")
str = "select * from item_master "
cmd = New OleDbCommand(str, cn)
da = New OleDbDataAdapter(cmd)
Dim dt As New DataSet()
da.Fill(dt, "Item_Master")

gridItem.DataSource = dt.Tables("Item_Master")

this works fine! but it display all grid columns with fix size ..i want
make different size of column.... Help me for that....Thank You.

1 solution

U can fix the column width using design.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900