Binding the data to grid view in windows application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanitha05
    New Member
    • May 2007
    • 5

    Binding the data to grid view in windows application

    Hi all,

    I want the code to bind the array/dataset to gridview in windows application .
    Its urgent requirement, please give reply soon.

    Thankyou
  • dwadish
    New Member
    • Nov 2006
    • 129

    #2
    use this code to bind gridview
    Datagridview1.D atasource=datas et.tables(0)

    Originally posted by vanitha05
    Hi all,

    I want the code to bind the array/dataset to gridview in windows application .
    Its urgent requirement, please give reply soon.

    Thankyou

    Comment

    • saran23
      New Member
      • Mar 2008
      • 28

      #3
      Originally posted by vanitha05
      Hi all,

      I want the code to bind the array/dataset to gridview in windows application .
      Its urgent requirement, please give reply soon.

      Thankyou
      Hi Vanitha,

      U cant bind a dataset to a DatagridView directly,
      Only datatable can be binded, so use

      Code:
      DataGridView.Datasource= dataset.Tables[datatableIndex]        
              DataGridView1.DataMember = "datatablename"
      Thanks
      Saravanan

      Comment

      Working...