Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Assign the dateTimePicker control to the datagridView cell
abdelwaheb ammar
Nov 24 2016 6:09 AM
318
Reply
Hi, I'm trying to assign a dateTimePicker control to the datagridview cell as shown in this image:
I find a solution similar to this problem in this site: http://www.c-sharpcorner.com/UploadFile/0f68f2/embedding-calendar-datetimepicker-control-into-datagridvie586/
But in this proposal it uses this slice of code to assign control:
oDateTimePicker =
new
DateTimePicker();
//Adding DateTimePicker control into DataGridView
dataGridView1.Controls.Add(oDateTimePicker);
While I use a datagridview linked with a database and makes a datatable path
ListeSeance = BLL.BLSeance.GetDateseance(numerofiche);
datagridview.ColumnCount = ListeSeance.dt.Rows.Count;
for
(
int
k = 0; k < ListeSeance.dt.Rows.Count; k++)
{
datagridview.Rows[0].Cells[k].Value = ListeSeance.dt.Rows[k][0].ToString();
}
Datagridview.Rows [0] .Cells [i] .Value = oDateTimePicker displays an error. is there a solution ?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How To Get The Value of XDocument Using C#
load data into combobox which is in datagridview.