I have a grid that has a combo box to display possible values for the cell and a datecontrol. These 2 fields are optional.
Grid displays everything great when a value is selcted from the comboBox and a date from the date control.
But if nothing is selected then I see a 0(zero) for the cell that has the combo embedded and default date of 01/01/0001
I would like them to be blank when nothing has been selected....
Is there an easy way to achieve this?
Another problem I have with a decimal type cell is it always gets formatted to display a $ sign in front of the decimal value, how to format it so that I dont see the $ sign as my data is really laboratory data....
Thanks!
I came up with a workaround for this, changed the following line
<
igDP:Field Name="StatusUpdatedDate" Label="Last Status Date" ToolTipService.ToolTip="Last time status changed"/>
to....
igDP:UnboundField Name="StatusUpdatedDate" BindingPath="StatusUpdatedDate" Label="Last Status Date" ToolTipService.ToolTip="Last time status changed"/>
Basically changed the Field to an UnboundField, that fixed the issue for me.....
hope this helps someone having this problem with a default value of null in datetimecontrol field of a grid
Hello,
I am really sorry. My last answer was not correct at all. These settings can be set only if the editor is not embedded in the XamDataGrid. It needs the default values ( as for date it is 01/01/0001 and for Combo (int or double - 0).
Alex.
Is it possible to send me your sample for this so I can see what I am doing wrong?
Thanks
As it works in my scenario and not in yours, please send us a sample project with your scenario to be able to investigate it closely.
Alex,
I greatly appreciate your response.
I have tried the following:
<igDP:Field.Settings>
<igDP:FieldSettings EditorType="{x:Type igEditors:XamDateTimeEditor}">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamDateTimeEditor}">
<Setter Property="PromptChar" Value="?" />
<Setter Property="PadChar" Value="/" />
<Setter Property="NullText" Value = " ">
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
But I really didn't see any difference. Is this the right way to do this?