Hi
We are using XamDateTimeInput control, in our silverlight application, in Template column of XamGrid. It has been used for ItemTmplate and EditorTemplate. But it is noticed that the LostFocus event of XamDateTimeInput under EditorTemplate is not firing. Here is the xaml code. Can anyone please help me out here.
<ig:TemplateColumn x:Name="colTime" Key="Time" HeaderText="Point Time" IsFixed="NotFixed" Tag="Time" IsReadOnly="True" CellStyle="{StaticResource cellStyle}" > <ig:TemplateColumn.ItemTemplate> <DataTemplate> <ig:XamDateTimeInput IsReadOnly="{Binding IsReadOnly}" Background="{Binding IsReadOnly,Converter={StaticResource booleanToBackgroundConverter}}" Value="{Binding Time,Converter={StaticResource dateTimeToStringConverterForDateTmeInput}, Mode=TwoWay}" Mask="dd/mm/yyyy hh:mm" Format="dd/MM/yyyy HH:mm" SpinButtonDisplayMode="Never" BorderThickness="0" VerticalContentAlignment="Stretch" DropDownButtonDisplayMode="Always" AllowDropDown="False" Margin="0" KeyDown="dateTimeControl_KeyDown" GotFocus="XamDateTimeInput_GotFocus"/> </DataTemplate> </ig:TemplateColumn.ItemTemplate> <ig:TemplateColumn.EditorTemplate> <DataTemplate> <ig:XamDateTimeInput IsReadOnly="{Binding IsReadOnly}" Background="{Binding IsReadOnly,Converter={StaticResource booleanToBackgroundConverter}}" Value="{Binding Time,Converter={StaticResource dateTimeToStringConverterForDateTmeInput}, Mode=TwoWay}" Mask="dd/mm/yyyy hh:mm" Format="dd/MM/yyyy HH:mm" SpinButtonDisplayMode="Never" BorderThickness="0" VerticalContentAlignment="Stretch" DropDownButtonDisplayMode="Always" AllowDropDown="False" Margin="0" KeyDown="dateTimeControl_KeyDown" LostFocus="dateTimeControl_LostFocus" /> </DataTemplate> </ig:TemplateColumn.EditorTemplate> </ig:TemplateColumn>ThanksChris
Hello Chris,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Thank you for your post. I have been looking into it and I can say that this behavior is expected, because you have set the TemplateColumn’s IsReadOnly Property to true. This way the EditorTemplate will never be used. If you want it to be used you should set the IsReadOnly to false and also set the XamGrid’s EditingSettings’ AllowEdit to Cell, Row or Hover. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.