Hello Infragistics,
I needed a help regarding to UltraControlContainerEditor.
I am using UltraControlContainerEditor inside UltraGrid to accept a Date value.
I am facing following two issues
Please find attached sample application demonstrating this issue.
Kindly let me know on further details.
Thanks,
Arjun
Hello Mallikarjun,
When you add a new row the value of the StartDate cell in your data table is DBNull and the value of the related grid’s cell is null. When the cell is rendered DateTimePicker is trying to render this null value. As it is not capable of doing so it renders its current value, or if its current value was not set it renders DateTime.Now. So this is expected behavior. What you can do is set the StartDate cell value, e.g. you can set it to DateTime.Now, when a new row is added. One way to achieve this is to handle AfterRowInsert event like this:
private void UltraGrid1_AfterRowInsert(object sender, RowEventArgs e){ e.Row.Cells["StartDate"].Value = DateTime.Now;}
Please let me know if you have any additional questions.
It works like a charm.. Thank you very much for the solution and for the prompt response. :)