display column name and primary key together in gride view

Joined
Nov 7, 2008
Messages
20
Programming Experience
Beginner
VB.NET:
  Dim condition As String() = New String() {Nothing, Nothing, Nothing, Nothing}
          dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Primary_Keys, New Object() {Nothing, Nothing, Nothing})
        
        DataGridView1.DataMember = dt


as this code will display the data of primary key in database, nut if i write code like this way

VB.NET:
    dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, New Object() {Nothing, Nothing, Nothing})
        
        DataGridView1.DataMember = dt
[/CODE]

this will display columns data .......


But if i want to display both the primary key data as well as columns name in one code ,,,how shall i write this code again.....


...Thank you
 
Back
Top