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

SanuPosted Nov 5, 2012, 8:47 AM
{
DataGridViewComboBoxColumn colStatus = new DataGridViewComboBoxColumn();
colStatus.DataPropertyName = "STATUS";
colStatus.HeaderText = "LEAVE STATUS";
colStatus.DataSource = LeaveDAO.GetLeaveStatus();
colStatus.DisplayMember = "NAME";
colStatus.ValueMember = "CODE";
colStatus.Name = "LEAVE STATUS";
int colIndx = grd_vw_LeaveList.Columns.Add(colStatus);
}
I am not sure whether this may help u or not, but still, try it. This code help to add a combobox to grid and load values from databse. Change the code according to ur requirement