try
{
RID = id;
object[,] ParamArray = new object[,] { { "@RoomID", id } };
DataSet ds = new DataSet();
ds = DB.ExecuteQuery_SP("SelectRoomDetails", ParamArray);
if (ds.Tables.Count > 0)
{
txtroomno.Text = ds.Tables[0].Rows[0]["RoomNo"].ToString();
cmbroomcat.SelectedValue = ds.Tables[0].Rows[0]["RoomCategoryID"].ToString();
txtcapac.Text = ds.Tables[0].Rows[0]["RoomCapacity"].ToString();
txtrent.Text = ds.Tables[0].Rows[0]["PerdayRent"].ToString();
//txtstatus.Text = ds.Tables[0].Rows[0]["RoomStatus"].ToString();
txttaxperc.Text = ds.Tables[0].Rows[0]["TaxPerc"].ToString();
txttaxamnt.Text = ds.Tables[0].Rows[0]["TaxAmount"].ToString();
}
IsEdit = true;
}
catch(Exception ex){}
cmbroomcat.SelectedValue = ds.Tables[0].Rows[0]["RoomCategoryID"].ToString(); ::
cmbbroomcat.selectedValue showing null value
cmbroomcat.SelectedValue = ds.Tables[0].Rows[0]["RoomCategoryID"].ToString(); ::
cmbbroomcat.selectedValue showing null value

Munesh SharmaPosted Oct 9, 2014, 3:00 AM
}
mohammed shamsheerPosted Oct 9, 2014, 12:27 AM
Munesh SharmaPosted Oct 8, 2014, 7:57 AM
mohammed shamsheerPosted Oct 8, 2014, 7:46 AM
Munesh SharmaPosted Oct 8, 2014, 6:40 AM
http://dotnet-munesh.blogspot.in/2014/04/display-selected-row-from-datagrid-view.html