Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15476

[RESOLVED] Add column width to DataTable

$
0
0
Hello every one
I need your help .. please
To create my datatable column I use this code for the column names and the titles of these columns headers
Code:

Dim DT As New DataTable
    DT.Columns.Add(New DataColumn With {.ColumnName = "Product_Name", .Caption = "Product"})
    DataGridView1.DataSource = DT

To adjust the width of these columns I add this code below
Code:

DataGridView1.Columns(0).Width = 40
How to make for add column Width to this line .. so that they will be in the same line :
Code:

DT.Columns.Add(New DataColumn With {.ColumnName = "Product_Name", .Caption = "Product"})
Thank you in advance for help

Viewing all articles
Browse latest Browse all 15476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>