This question is locked. New answers and comments are not allowed.
Hi,
I am using the GridView as a master view and a DataForm as a detail view. When I edit a field in the data form, it doesn't update the grid. If I double click on the cell in the grid that was supposed to be changed, the new value shows up. If I sort on a column, the data is updated. But it doesn't happen automatically. Is this how it is supposed to work?
Here is my XAML
And here is the code I use to initialize the itemssources:
The dataform and grid synchronize fine when I am selecting a row in the grid--> The data form shows the details for that row. If I use the navigation buttons on the dataform, the selection in the grid changes as well. So that is all working. The only thing that is not working is that when I change a property value in the data form, the changes are not automatically reflected in the grid. I have to manually cause the grid to redraw (sorting or something like that) to get the new value to appear.
This is a serious issue I have to resolve quickly and any help I can get would be greatly appreciated.
Thanks,
Steve Montgomery, Consultant
www.stevetherfguy.com
I am using the GridView as a master view and a DataForm as a detail view. When I edit a field in the data form, it doesn't update the grid. If I double click on the cell in the grid that was supposed to be changed, the new value shows up. If I sort on a column, the data is updated. But it doesn't happen automatically. Is this how it is supposed to work?
Here is my XAML
<telerik:RadGridView Grid.ColumnSpan="4" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5,5,0,0" Name="radGridBoardActions" VerticalAlignment="Top" ItemsSource="{Binding}"/> <dataform:DataForm x:Name="dataForm" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" ItemsSource="{Binding}" CommandButtonsVisibility="All" AutoEdit="False" AutoCommit="True" BindingValidationError="dataForm_BindingValidationError" EditEnded="dataForm_EditEnded"> <dataform:DataForm.EditTemplate> <DataTemplate> <Grid> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <dataform:DataField Grid.Row="0" Grid.Column="0" Label="Action Type"> <ComboBox Width="150" HorizontalAlignment="Left" Margin="3,3,0,3" Height="30" ItemsSource="{Binding Path=AvailableTypes, Mode=TwoWay}" SelectedIndex="{Binding Path=TypeID, Mode=TwoWay}" /> </dataform:DataField> <dataform:DataField Grid.Column="1" Grid.Row="0" Label="Approval Date"> <telerik:RadDatePicker HorizontalAlignment="Left" Margin="3,20,0,0" VerticalAlignment="Top" Width="161" SelectedValue="{Binding Path=DateApproved, Mode=TwoWay}" /> </dataform:DataField> <dataform:DataField Grid.Row="1" Grid.Column="0" Label="Board Resolution Number"> <TextBox Width="150" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Text="{Binding Path=ResolutionNumber, Mode=TwoWay}" /> </dataform:DataField> <dataform:DataField Grid.Column="1" Grid.Row="1" Label="Board Approval Date"> <telerik:RadDatePicker Grid.Column="3" Grid.Row="1" HorizontalAlignment="Left" Margin="3,20,0,0" VerticalAlignment="Top" Width="161" SelectedValue="{Binding Path=DateBoardApproved, Mode=TwoWay}" /> </dataform:DataField> </Grid> </DataTemplate> </dataform:DataForm.EditTemplate> </dataform:DataForm>And here is the code I use to initialize the itemssources:
public METROProjectFormWindow(METROProject Project){ InitializeComponent(); QueryableCollectionView pcv = new QueryableCollectionView(Project.BoardActions); METROProjectForm1.radGridBoardActions.ItemsSource = pcv; METROProjectForm1.dataForm.ItemsSource = pcv;}The dataform and grid synchronize fine when I am selecting a row in the grid--> The data form shows the details for that row. If I use the navigation buttons on the dataform, the selection in the grid changes as well. So that is all working. The only thing that is not working is that when I change a property value in the data form, the changes are not automatically reflected in the grid. I have to manually cause the grid to redraw (sorting or something like that) to get the new value to appear.
This is a serious issue I have to resolve quickly and any help I can get would be greatly appreciated.
Thanks,
Steve Montgomery, Consultant
www.stevetherfguy.com