Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Datatable objects not binded to combobox and textbox
mohammed shamsheer
Sep 30 2014 4:58 AM
868
Reply
public void SendRoomIDtoCheckINNew(int RID)
{
try
{
object[,] ParamArray = new object[,] { { "@RoomID", RID } };
DataSet ds = new DataSet();
ds = DB.ExecuteQuery_SP("SelectRoomDetailsForGridByID", ParamArray);
if (ds.Tables.Count > 0)
{
cmbroomcat.DataSource = ds.Tables[0];
cmbroomcat.Text = ds.Tables[0].Rows[0]["RoomCategoryName"].ToString();
cmbroomno.DataSource = ds.Tables[0];
cmbroomno.DisplayMember = ds.Tables[0].Rows[0]["RoomNo"].ToString();
cmbroomno.Text = ds.Tables[0].Rows[0]["RoomNo"].ToString();
//cmbroomno.ValueMember = ds.Tables[0].Rows[0]["RoomID"].ToString();
txtCapacity.Text= ds.Tables[0].Rows[0]["RoomCapacity"].ToString();
}
}
catch (Exception ex) { ex.ToString(); }
}
above is my code but when i try to bind dt object to respective combo box and textbox it is not binding what is the reason behing it i am still confussing
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Changing TaskBar icons of Application
windows live mail