Pravinkumar Birajdar

Pravinkumar Birajdar

  • NA
  • 409
  • 274.9k

How to bind ComboBoxColumn of data grid view

Nov 2 2012 8:42 AM
How to bind ComboColumn of data grid view using C#?

I have following code,but it is not displaying any result

private void LoadFromPlaces()
        {
            if (mobj.GetAllPlaces() == true)
            {
                DataSet ds = new DataSet();
                ds.ReadXml("http://localhost:2246/TicketSys/XmlFiles/Places.xml");
                gvDetails.DataSource = ds.Tables["Places"];

                BindingSource bs = new BindingSource();
                bs.DataSource = ds.Tables["places"];
                FromPlace.DataPropertyName = "PlaceID";//FromPlace is the Data Grid View Combo Box
                FromPlace.DataSource = bs;
                FromPlace.DisplayMember = "PlaceName";
                FromPlace.ValueMember = "PlaceID";
                
                
            }
        }

please tell me

Answers (1)