Eric Klein
Top achievements
Rank 1
Eric Klein
asked on 12 Apr 2012, 09:42 PM
I had a RadGridView that I allo add new and edit on the grid. All my grids work perfect but one. When ever I either click an existing row, or add a new row then move to another the grid no longer allows me to enter edit mode. It saves ther changes successfully but then the gird is locked, I have to close the screen and reload it to make anotther edit. I have 6 other screens and this work perfect, I can edit a row, add a row, and keep on going to the new row and edit it.
4 Answers, 1 is accepted
0
Hi,
Didie
the Telerik team
We are not aware of such a strange behaviour. Would you please provide some more detailed information on how is the problematic GridView different from the ones that work fine?
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Eric Klein
Top achievements
Rank 1
answered on 13 Apr 2012, 01:24 PM
Here is the xaml
and the .cs
I have other screens that are the same size or larger that work fine.
<Window x:Class="FamilyOffice.EditScreens.EditTransactionTypeLookUp" Title="Edit Transaction Type Lookup" Height="492" Width="451" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Window.Resources> <ResourceDictionary Source="..\Resources\ResourceDirectory.xaml" /> </Window.Resources> <Grid Height="456" Width="433"> <Label Content=" Edit Or Add New Client Transaction Type " Height="28" HorizontalAlignment="Left" Margin="5,12,0,0" Name="label1" VerticalAlignment="Top" FontWeight="Bold" FontSize="14" Style="{StaticResource DefaultPageText}"/> <Label Content="Double click the field you want to edit and make your changes." Height="28" HorizontalAlignment="Left" Margin="10,41,0,0" Name="label2" VerticalAlignment="Top" Width="348" Style="{StaticResource DefaultPageText}"/> <telerik:RadGridView HorizontalAlignment="Left" Margin="12,63,0,0" Name="TransactionTypeLookupGrid" VerticalAlignment="Top" Height="362" Width="410" AutoGenerateColumns="False" CanUserFreezeColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" RowEditEnded="UpdateTransactionTypeLookup" AlternationCount="2" AlternateRowBackground="Cornsilk" ShowInsertRow="True" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Name="TransactionTypeLookupID" DataMemberBinding="{Binding TransactionTypeLookupID}" IsVisible="false" IsReadOnly="True"/> <telerik:GridViewDataColumn Header="Client Transaction Type" DataMemberBinding="{Binding TransactionDescription}" Width="*" /> <telerik:GridViewComboBoxColumn ItemsSource="{Binding}" DataMemberBinding="{Binding Path=TransactionTypeID}" DisplayMemberPath="TransactionTypeDescription" SelectedValueMemberPath="TransactionTypeID" Header="Transaction Type" UniqueName="TransactionType" /> </telerik:RadGridView.Columns> </telerik:RadGridView> <telerik:RadDataPager PageSize="20" Source="{Binding Items, ElementName=TransactionTypeGrid}" IsTotalItemCountFixed="True" DisplayMode="FirstLastPreviousNextNumeric, Text" Height="28" HorizontalAlignment="Left" Margin="12,422,0,0" Name="radDataPager1" VerticalAlignment="Top" Width="410" /> </Grid></Window>and the .cs
using System;using System.Linq;using System.Windows;using FamilyOffice.Data;namespace FamilyOffice.EditScreens{ /// <summary> /// Interaction logic for EditTransactionTypeLookUp.xaml /// </summary> public partial class EditTransactionTypeLookUp : Window { public EditTransactionTypeLookUp() { InitializeComponent(); GetLookups gl = new GetLookups(); TransactionTypeLookupGrid.ItemsSource = gl.GetTransactionTypeLookup(); TransactionTypeLookupGrid.Columns["TransactionType"].DataContext = gl.GetTransactionType(); } public void UpdateTransactionTypeLookup(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e) { TransactionTypeLookupGrid.IsReadOnly = true; EditData ed = new EditData(); TransactionTypeLookup tranType = (TransactionTypeLookup)e.NewData; if (tranType.TransactionDescription != null )//&& tranType.TransactionTypeID > 0) { ed.EditTransactionTypeLookup(tranType.TransactionTypeLookupID, tranType.TransactionDescription, (int)tranType.TransactionTypeID); ed.UpdateFailedTransactions(tranType.TransactionDescription, (int)tranType.TransactionTypeID); } else if(tranType.TransactionDescription == null ) TransactionTypeLookupGrid.Items.Remove(e.NewData); } }}I have other screens that are the same size or larger that work fine.
0
Eric Klein
Top achievements
Rank 1
answered on 13 Apr 2012, 09:10 PM
I rebuilt the screen from scratch and it works, might have had a corrupted file or something.
0
Hi,
Didie
the Telerik team
I am glad to hear that. Probably this is the case.
All the best,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>