is there any difference in controls between windows and web applications?? i ddnt find drop down control in windows application??
About windows and web application controls..
Hi frnds,
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Posted Jul 28, 2013, 11:08 PM EDT
Web controls:
Works based on the browser + HTTP Request context etc.
Windows controls
Depends on the OS
Runs on top of Windows Forms.
When you say, drag & drop, in which control you're trying this?
http://msdn.microsoft.com/en-us/library/ms171546.aspx
iswarya chandran67 reputationPosted Jul 28, 2013, 11:19 PM EDT
bt what u saying about drag and drop i cnt get it??
can u explain??
Posted Jul 28, 2013, 11:30 PM EDT
Exactly what are you trying do here ?
In which control you're trying to implement this?
Drag-and-Drop Functionality in Windows Forms
iswarya chandran67 reputationPosted Jul 29, 2013, 12:02 AM EDT
Posted Jul 29, 2013, 12:06 AM EDT
iswarya chandran67 reputationPosted Jul 29, 2013, 12:21 AM EDT
Posted Jul 29, 2013, 12:23 AM EDT
You need to use ComboBox control.
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 29, 2013, 12:32 AM EDT
but it is different form asp.net dropdown.
it works like both textbox and dropdown. you can enter your value in this but in asp.net only selection.
its a combination of textbox and dropdown in windows form.
iswarya chandran67 reputationPosted Jul 29, 2013, 12:34 AM EDT
yeah i tried that too..
but there is an error
" Complex DataBinding accepts as a data source either an IList or an IListSource"
my code is:
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select name, age from tblinfo", con);
DataTable dt= new DataTable(); da.Fill(dt);
DataRow dr;
dr= dt.NewRow();
dr.ItemArray= new object[] {0, "-- Select an item--"};
dt.Rows.InsertAt(dr,0);
comboBox1.DataSource = da;
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 29, 2013, 12:48 AM EDT
You need to set DataSource as DataTable, not the dataadpter
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select name, age from tblinfo", con);
DataTable dt= new DataTable(); da.Fill(dt);
DataRow dr;
dr= dt.NewRow();
dr.ItemArray= new object[] {0, "-- Select an item--"};
dt.Rows.InsertAt(dr,0);
comboBox1.DataSource = dt;
Regards,
Iftikar
iswarya chandran67 reputationPosted Jul 29, 2013, 12:52 AM EDT
thank you frnds.. nw its working... thnk u murali, sanjeeb, Iftikar..