da.SelectCommand = New OleDbCommand() With da.SelectCommand .Connection = my_con .CommandType = CommandType.Text .CommandText = "Select p_name,p_fname,p_mablagh from table1" If .Connection.State <> ConnectionState.Open Then .Connection.Open() End If End With Dim ds As New Database2DataSet da.Fill(ds.Table1) Me.DataGridView1.DataSource = ds.Table1 my_con.Close() Me.DataGridView1.Columns(2).DefaultCellStyle.Format = "##,0"
Column
Index
Format
Me.DataGridView1.Columns(1).DefaultCellStyle.Format = "#,0"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)