1
I’m trying to display data from a table field MySQL
in a control DatePicker
. The code is as follows::
if (dataGridProdutos.SelectedIndex != -1)
{
DateTime selectedDate;
DataRowView selectedRecord = (DataRowView)dataGridProdutos.SelectedItem;
selectedDate = (DateTime)selectedRecord.Row.ItemArray[2];
dataNascTextBox.Text = selectedDate.Date.ToString("yyyy/MM/dd");
dataNascDatePicker ????
...
}
How can I complete this line concerning dataNascDatePicker
?
This dataNascDatePicker.Value=selectedDate.Date; does not work? see link https://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.value
– William John Adam Trindade
I had already tried and not ... unless I’m missing some detail!
– gtpt
What happens when Voce does this: dataNascDatePicker.Value=selectedDate.Date; ?
– William John Adam Trindade