TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohammed shamsheer
NA
394
143.8k
Datatable objects not binded to combobox and textbox
Sep 30 2014 4:58 AM
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
Reply
Answers (
5
)
Changing TaskBar icons of Application
windows live mail