Hi
I have an issue where I am adding a new row to a data grid, but when I press enter or navigate away then new row is just dropped.There are no errors thown or validation issues. The ItemSource is a ria services collection. What could be causing this?
Below is the xaml for the grid:
I have an issue where I am adding a new row to a data grid, but when I press enter or navigate away then new row is just dropped.There are no errors thown or validation issues. The ItemSource is a ria services collection. What could be causing this?
Below is the xaml for the grid:
<
telerikGrid:RadGridView
x:Name
=
"RadGridView1"
Grid.Column
=
"0"
Grid.Row
=
"5"
Grid.ColumnSpan
=
"4"
CanUserFreezeColumns
=
"true"
Margin
=
"0,0,0,1"
ShowGroupPanel
=
"False"
MaxHeight
=
"280"
AutoGenerateColumns
=
"False"
CanUserInsertRows
=
"True"
ShowInsertRow
=
"True"
RowIndicatorVisibility
=
"Collapsed"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
AddingNewDataItem
=
"RadGridView1_AddingNewDataItem"
IsEnabled
=
"{Binding EditSiteProfile.SiteProfileId, Converter={StaticResource GuidIdEmptyToNotEnabledConverter}}"
ItemsSource
=
"{Binding SiteProfileDaysList}"
>
<
telerikGrid:RadGridView.ChildTableDefinitions
>
<
telerikGrid:GridViewTableDefinition
/>
</
telerikGrid:RadGridView.ChildTableDefinitions
>
<
telerikGrid:RadGridView.Columns
>
<
telerikGrid:GridViewComboBoxColumn
ItemsSourceBinding
=
"{Binding Data, Source={StaticResource ProfileDaysDC}}"
DataMemberBinding
=
"{Binding DayId, Mode=TwoWay}"
DisplayMemberPath
=
"DayName"
SelectedValueMemberPath
=
"DayId"
>
<
telerikGrid:GridViewComboBoxColumn.Header
>
<
TextBlock
Text
=
"Day"
Foreground
=
"White"
/>
</
telerikGrid:GridViewComboBoxColumn.Header
>
</
telerikGrid:GridViewComboBoxColumn
>
<
UIGridColumnExtensions:TimePickerColumn
DataMemberBinding
=
"{Binding RestaurantOpenTime}"
TimeInterval
=
"0:30:0"
DataFormatString
=
"{}{0:h:mm tt}"
>
<
UIGridColumnExtensions:TimePickerColumn.Header
>
<
TextBlock
Text
=
"Rest Open"
Foreground
=
"White"
/>
</
UIGridColumnExtensions:TimePickerColumn.Header
>
</
UIGridColumnExtensions:TimePickerColumn
>
<
UIGridColumnExtensions:TimePickerColumn
DataMemberBinding
=
"{Binding RestaurantCloseTime}"
TimeInterval
=
"0:30:0"
DataFormatString
=
"{}{0:h:mm tt}"
>
<
UIGridColumnExtensions:TimePickerColumn.Header
>
<
TextBlock
Text
=
"Rest Close"
Foreground
=
"White"
/>
</
UIGridColumnExtensions:TimePickerColumn.Header
>
</
UIGridColumnExtensions:TimePickerColumn
>
<
UIGridColumnExtensions:TimePickerColumn
DataMemberBinding
=
"{Binding DriveThruOpenTime}"
TimeInterval
=
"0:30:0"
DataFormatString
=
"{}{0:h:mm tt}"
>
<
UIGridColumnExtensions:TimePickerColumn.Header
>
<
TextBlock
Text
=
"Drive Open"
Foreground
=
"White"
/>
</
UIGridColumnExtensions:TimePickerColumn.Header
>
</
UIGridColumnExtensions:TimePickerColumn
>
<
UIGridColumnExtensions:TimePickerColumn
DataMemberBinding
=
"{Binding DriveThruCloseTime}"
TimeInterval
=
"0:30:0"
DataFormatString
=
"{}{0:h:mm tt}"
>
<
UIGridColumnExtensions:TimePickerColumn.Header
>
<
TextBlock
Text
=
"Drive Close"
Foreground
=
"White"
/>
</
UIGridColumnExtensions:TimePickerColumn.Header
>
</
UIGridColumnExtensions:TimePickerColumn
>
</
telerikGrid:RadGridView.Columns
>
<
telerikGrid:RadGridView.HierarchyChildTemplate
>
<
DataTemplate
>
<
telerikGrid:RadGridView
x:Name
=
"RadGridView_SiteProfileDayParts"
Grid.Column
=
"0"
Grid.Row
=
"5"
Grid.ColumnSpan
=
"4"
CanUserFreezeColumns
=
"true"
Margin
=
"0,0,0,1"
ShowGroupPanel
=
"False"
MaxHeight
=
"100"
DataLoadMode
=
"Asynchronous"
ScrollMode
=
"Deferred"
AutoGenerateColumns
=
"False"
CanUserInsertRows
=
"True"
ShowInsertRow
=
"True"
RowIndicatorVisibility
=
"Collapsed"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
AddingNewDataItem
=
"RadGridView_SiteProfileDayParts_AddingNewDataItem"
ItemsSource
=
"{Binding SiteProfileDayParts}"
>
<
telerikGrid:RadGridView.Columns
>
<
telerikGrid:GridViewComboBoxColumn
ItemsSourceBinding
=
"{Binding Data, Source={StaticResource DayPartsDC}}"
DataMemberBinding
=
"{Binding DayPartId, Mode=TwoWay}"
DisplayMemberPath
=
"DayPartName"
SelectedValueMemberPath
=
"DayPartId"
>
<
telerikGrid:GridViewComboBoxColumn.Header
>
<
TextBlock
Text
=
"Day Part Name"
Foreground
=
"White"
/>
</
telerikGrid:GridViewComboBoxColumn.Header
>
</
telerikGrid:GridViewComboBoxColumn
>
<
UIGridColumnExtensions:TimePickerColumn
DataMemberBinding
=
"{Binding StartTime}"
TimeInterval
=
"0:30:0"
DataFormatString
=
"{}{0:h:mm tt}"
>
<
UIGridColumnExtensions:TimePickerColumn.Header
>
<
TextBlock
Text
=
"Start Time"
Foreground
=
"White"
/>
</
UIGridColumnExtensions:TimePickerColumn.Header
>
</
UIGridColumnExtensions:TimePickerColumn
>
<
UIGridColumnExtensions:TimePickerColumn
DataMemberBinding
=
"{Binding EndTime}"
TimeInterval
=
"0:30:0"
DataFormatString
=
"{}{0:h:mm tt}"
>
<
UIGridColumnExtensions:TimePickerColumn.Header
>
<
TextBlock
Text
=
"End Time"
Foreground
=
"White"
/>
</
UIGridColumnExtensions:TimePickerColumn.Header
>
</
UIGridColumnExtensions:TimePickerColumn
>
</
telerikGrid:RadGridView.Columns
>
</
telerikGrid:RadGridView
>
</
DataTemplate
>
</
telerikGrid:RadGridView.HierarchyChildTemplate
>
</
telerikGrid:RadGridView
>