HI,
I use in my application a gridview with four buttons to delete and add a row and to save or cancel the edit. The delete and add buttons work perfectly but not the save insert/edit button. I don't understand where is the problem in my code, if someone could help.
This is my xaml :
I use in my application a gridview with four buttons to delete and add a row and to save or cancel the edit. The delete and add buttons work perfectly but not the save insert/edit button. I don't understand where is the problem in my code, if someone could help.
This is my xaml :
<Grid Name="indicatorPage" Visibility="Hidden" Margin="0,194,0,-194"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,5,0,0"> <telerik:RadButton Width="150" Content="Delete selected rows" Margin="0,0,5,0" Command="telerikGrid:RadGridViewCommands.Delete" CommandTarget="{Binding ElementName=gvIndicatorConf}" /> <telerik:RadButton Width="150" Content="Add new row" Margin="0,0,5,0" Command="telerikGrid:RadGridViewCommands.BeginInsert" CommandTarget="{Binding ElementName=gvIndicatorConf}" /> <telerik:RadButton Width="150" Content="Save insert/edit" Margin="0,0,5,0" Command="telerikGrid:RadGridViewCommands.CommitEdit" CommandTarget="{Binding ElementName=gvIndicatorConf}" /> <telerik:RadButton Width="150" Content="Cancel insert/edit" Command="telerikGrid:RadGridViewCommands.CancelRowEdit" CommandTarget="{Binding ElementName=gvIndicatorConf}" /> </StackPanel> <telerik:RadGridView x:Name="gvIndicatorConf" ItemsSource="{Binding IndicatorConf}" AddingNewDataItem="radGridView_AddingNewDataItem" Margin="0,5,0,0" Grid.Row="1" AutoGenerateColumns="False" telerik:StyleManager.Theme="Windows8" MaxHeight="7000" MaxWidth="1000"> <telerik:RadGridView.Columns> <telerik:GridViewColumn Width="90"> <telerik:GridViewColumn.CellTemplate> <DataTemplate> <telerik:RadButton Content="Delete" Command="telerikGrid:RadGridViewCommands.Delete" CommandParameter="{Binding}" /> </DataTemplate> </telerik:GridViewColumn.CellTemplate> </telerik:GridViewColumn> <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Header="Code" UniqueName="Code" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Descritpion}" Header="Descritpion" UniqueName="Descritpion" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Connecter}" Header="Connecter" UniqueName="Connecter" IsReadOnly="True"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Period}" Header="Period" UniqueName="Period" /> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid>
Thanks !