Posted 28 June 2018, 5:40 pm EST
Hi,
Thank you for elaborating further and for sharing the images.
This is because C1DatePicker inside uses C1MaskedTextBox. To resolve this issue, you need to handle C1Datagrid’s CommittingEdit event and pass the entered value there, as follows:
private void datagrid_CommittingEdit(object sender, C1.WPF.DataGrid.DataGridEndingEditEventArgs e)
{
if (e.Column.Index == 0)
{
var bdr = e.EditingElement as Border;
if (bdr != null)
{
var dp = bdr.Child as C1DatePicker;
if (dp != null)
{
dp.CustomFormat = "M/d/yyyy";
var tb = FindChild<C1.WPF.C1MaskedTextBox>(dp, "TextBox");
if (tb != null)
{
var val = tb.Value;
try
{
var date = Convert.ToDateTime(val);
dp.SelectedDate = date;
}
catch (Exception ex)
{
MessageBox.Show("The text entered is not a valid date");
}
}
}
}
}
}
```Also attached is modified sample application for your reference.
Thanks,
Ruchir[zip filename="C1DatePickerWithC1DataGrid_fixed.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-788aac7c-6435-4e8c-a054-74bfbdad21ee.zip[/zip]