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
Yuvraj Jambhle
NA
93
8.3k
How to read sql data to runtime added combobox in c# winforms
Nov 1 2020 11:00 AM
Hello Friends,
I want to read table data in dynamically added combo boxes.
Actually like besides the image I am adding combo boxes in runtime using button click. if I want 2 more combo box then I will add in runtime using button click.
My problem is how to read SQL server data in these runtime added combo boxes. I know SQL connection method.
But I am unable to read SQL table data for runtime added combo box.
using the below method I have added runtime combo boxes.
int
cmbFieldColm_1Count = 1;
public
System.Windows.Forms.ComboBox AddComboFieldColumnP1()
{
System.Windows.Forms.ComboBox cmbBxFieldColm =
new
System.Windows.Forms.ComboBox();
panel1.Controls.Add(cmbBxFieldColm);
cmbBxFieldColm.Top = cmbFieldColm_1Count * 22;
cmbBxFieldColm.Left = 301;
cmbBxFieldColm.Width = 160;
cmbBxFieldColm.Name =
"cmbSelectColumn"
+
this
.cmbFieldColm_1Count.ToString();
cmbFieldColm_1Count = cmbFieldColm_1Count + 1;
return
cmbBxFieldColm;
}
Please help me.
Thanks in advance.
Reply
Answers (
1
)
Data repository
HTML Agility Pack get specific URL's