This is a migrated thread and some comments may be shown as answers.

GridView visual update error info issue

3 Answers 132 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Calabonga
Top achievements
Rank 2
Calabonga asked on 04 Aug 2010, 04:17 AM
Hi. I have some trouble.
Briefly...
I'm using:
- Silverlight
- MVVM
- RIA
- RadGridView (2010.2.0714 (July 14, 2010))
- Editing entity in Modal Dialog (RadWindow)
- Modal Dialog content  is DataForm (Silverlight toolkit)
Grid XAML:
...
xmlns:grid="clr-namespace:Bridge.Helpers.Grid"
xmlns
:clb="clr-namespace:Calabonga.Silverlight.Framework;assembly=Calabonga.Silverlight.Framework"

...
<
telerik:RadGridView Grid.Row="1"
                                 EnableColumnVirtualization="True"
                                 EnableRowVirtualization="True"
                                 ActionOnLostFocus="CancelEdit"
                                 SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                                 ItemsSource="{Binding ElementName=Source, Path=Data}"
                                 grid:RadGridViewHelper.ColumnsCollection="{Binding Path=ColumnsCollection}"
                                 AutoGenerateColumns="False">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Deleting">
                        <clb:EventToCommand Command="{Binding Path=DeleteEntityCommand}"
                                            IsSendEventArgsToCommand="True" />
                    </i:EventTrigger>
                    <i:EventTrigger EventName="RowActivated">
                        <clb:EventToCommand Command="{Binding Path=EditEntityCommand}"
                                            IsSendEventArgsToCommand="True" />
                    </i:EventTrigger>
                    <i:EventTrigger EventName="AddingNewDataItem">
                        <clb:EventToCommand Command="{Binding Path=AddEntityCommand}"
                                            IsSendEventArgsToCommand="True" />
                    </i:EventTrigger>
                    <i:EventTrigger EventName="Filtering">
                        <clb:EventToCommand Command="{Binding Path=FilteringCommand}"
                                            IsSendEventArgsToCommand="True" />
                        <clb:EventToCommand Command="{Binding Path=UpdateDDSFilterCommand}"
                                            CommandParameter="{Binding ElementName=Source}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </telerik:RadGridView>

MVVM method EditEntityCommand:
ModalDialogWorker mdw = new ModalDialogWorker();
                    RadWindow dialog = new ExtendedRadWindow();
                    IModalView view = new PersonDialogModalView();
                    dialog.Header = ApplicationStrings.DialogEditingTitle;
                    Person person = (Person)this.SelectedItem;
                    GridViewCell grid = ((GridViewCell)e.OriginalSource);
                    ModalViewContext<Person> cntx = new ModalViewContext<Person>(Dictionary.List, person, new PersonViewModel());
                    mdw.ShowDialog(dialog, view, cntx, p =>
                         {
  
                             if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                             {
                                 this.BridgeContext.SubmitChanges();
                             }
                             else
                             {
                                 this.BridgeContext.RejectChanges();
                             }
                         });

remark: this.BridgeContext = DomainContext (RIA)

Everything work fine, BUT!!!
If I make error in DataForm, I'll see the red validation mark (and in gridview too), that is ok. But when I click Cancel button on ModalDialog, the dialog will closed and this.BridgeContext.RejectChanges. But the gridview stay marked error (see attached images), however, DomainContext has no errors.

Help to fine solution!!! PLEASE!!!







3 Answers, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 05 Aug 2010, 03:49 PM
Hello Calabonga,

This issue is already fixed just update to our next latest internal build assemblies.
Sorry for the inconvenience caused.

P.S. I've updated your Telerik points.

Best wishes,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Calabonga
Top achievements
Rank 2
answered on 05 Aug 2010, 09:14 PM
Thanks! Very pleasant to work with you and with your's RadControls
0
jay
Top achievements
Rank 1
answered on 08 Oct 2010, 10:28 PM
Hello Calabonga,
It just occurred to me that you have successfully implemented a solution i am try to get going. I am using similar technologies and i am interested in seeing more of your solution. Just the area that deals with launching the RadWindow from MVVM, performing the necessary edits, and cancelling changes/updating the database on closing the dialog.

Can you provide me with some more code snippets?

Thanks! 
Tags
GridView
Asked by
Calabonga
Top achievements
Rank 2
Answers by
Nedyalko Nikolov
Telerik team
Calabonga
Top achievements
Rank 2
jay
Top achievements
Rank 1
Share this question
or