I have a DGV bound to a list of objects whose properties include a DateTime value. I’d like to display, and allow editing the Date and Time components in separate columns. How would I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s how I’d do it.
Make your property that exposes the
DateTime(together) invisible in theDataGridView.Have two other properties,
DateandTimeand have these properties essentially link back to yourDateTimeproperty.Like this: