This question is locked. New answers and comments are not allowed.
Hi,
I changed my telerik version to Q2 2011 and I found a new bug.
I have a RadGridView bind to an ObservableCollection. I add an element into the collection so a new row is creating and I show a childwindow to fill informations.
When i close my popup, I have validation errors in the grid so that my entity does not...
In the previous version, it's work.
To solve this problem I call the 'Rebind' method and errors disapper.
cs:
xaml:
You can show the refresh problem in attached file.
Regards.
I changed my telerik version to Q2 2011 and I found a new bug.
I have a RadGridView bind to an ObservableCollection. I add an element into the collection so a new row is creating and I show a childwindow to fill informations.
When i close my popup, I have validation errors in the grid so that my entity does not...
In the previous version, it's work.
To solve this problem I call the 'Rebind' method and errors disapper.
cs:
ObservableCollection<Checked<Contact>> _contactsList = new ObservableCollection<Checked<Contact>>(); IEnumerable<Checked<Contact>> allContacts = currentActeur.AllContacts.Select(c => new Checked<Contact>() { Value = c, IsChecked = c.IsPrincipal }); foreach (Checked<Contact> contact in allContacts) _contactsList.Add(contact); _grid_Contacts.ItemsSource = _contactsList; private void AddContact_Click(object sender, RoutedEventArgs e) { var c = new Checked<Contact>() { Value = new Contact() { Adresse = new Adresse(), ChoixImage = ImageType.Photo, } }; _contactsList.Add(c); _grid_Contacts.SelectedItem = c;//Navigate to popup MainPage.NavigateTo<ContactControl>(c.Value, true, true, 650, 450); c.Value.Validate(); c.Value.Adresse.Validate();}xaml:
<tlk:RadGridView x:Name="_grid_Contacts" AutoGenerateColumns="False" IsReadOnly="True" RowIndicatorVisibility="Collapsed" Margin="20,10" > <tlk:RadGridView.Columns> <!--Principal ?--> <tlk:GridViewColumn Header="Principal"> <tlk:GridViewColumn.CellTemplate> <DataTemplate> <CheckBox Click="ChangeContactPrincipal_Click" IsThreeState="False" IsChecked="{Binding IsChecked, Mode=TwoWay}" IsEnabled="{Binding IsChecked, Converter={StaticResource BooleanInverterConverter}}" Style="{StaticResource CheckBoxStarStyle}" HorizontalAlignment="Center"/> </DataTemplate> </tlk:GridViewColumn.CellTemplate> </tlk:GridViewColumn> <!--Nom--> <tlk:GridViewDataColumn DataMemberBinding="{Binding Value.Nom}" Header="Nom" Width="*"/> <!--Prénom--> <tlk:GridViewDataColumn DataMemberBinding="{Binding Value.Prenom}" Header="Prénom" Width="*"/><tlk:GridViewColumn IsResizable="False" Width="50"> <tlk:GridViewColumn.Header> <!--Add button--> <tlk:RadButton CornerRadius="5" Click="AddContact_Click" Margin="2" VerticalAlignment="Center"> <Image Source="myProject;component/Images/icons/ajouter.png" ToolTipService.ToolTip="Ajouter un contact" Width="16"/> </tlk:RadButton> </tlk:GridViewColumn.Header></tlk:GridViewColumn /></tlk:RadGridView.Columns></tlk:RadGridView>You can show the refresh problem in attached file.
Regards.