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
Dealy
NA
213
0
Add combobox to dataGridView
Apr 17 2014 5:09 AM
Hello,
I load data from a database into a dataGridView. How can I set one of the columns to combobox that loads data from a stored procedure?
Here's my code for loading data
:
using (conn = new SqlConnection(connectionString))
{
SqlCommand cmd = new SqlCommand("SELECT_TASKS", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@UserID", System.Environment.UserName));
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
tasksGridView.DataSource = dt;
}
conn.Close();
Thank you in advance.
Reply
Answers (
4
)
Buttons types
Changing non client area of form