View Single Post
  #1 (permalink)  
Old December 20th, 2006, 10:10 AM
akumarp2p akumarp2p is offline
Authorized User
Join Date: Nov 2006
Location: New Delhi, Delhi, India.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Bind Data in DataGrid

I am using this code to bind datagrid in Desktop Application with C# 2005.but Grid does't show any record. help me now.

SqlDataAdapter da = new SqlDataAdapter("select vendorname from vendorview order by vendorname", conVendor);
    DataSet ds = new DataSet("Vendor");
     dgVendor.DataSource = ds;
    dgVendor.DataMember = "Vendor";

Thanks and Regards
Kumar Ashish
Kumar Ashish