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

GridViewDataColumn and TargetUpdated event

3 Answers 434 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 02 Oct 2013, 09:19 AM
I have a RadGridView with data bound columns:

<tk:RadGridView.Columns>
  <tk:GridViewCheckBoxColumn Header="" DataMemberBinding="{Binding IsSelected,NotifyOnTargetUpdated=True}" Width="Auto" AutoSelectOnEdit="True" EditTriggers="CellClick" TargetUpdated="FieldUpdated"/>
  <tk:GridViewDataColumn Header="Field" DataMemberBinding="{Binding Name}" IsReadOnly="True" Width="Auto"/>
  <tk:GridViewDataColumn Header="Filter" DataMemberBinding="{Binding Filter,NotifyOnTargetUpdated=True}" Width="50" TargetUpdated="FieldUpdated"/>
</tk:RadGridView.Columns>

However, when I edit the data, the TargetUpdated event does not seem to be triggered.

Is this event supported by GridViewDataColumns?

Thanks,

Nick.

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 03 Oct 2013, 10:40 AM
Hi Nick,

This event will not be raised. It is inherited and comes from the base class System.Windows.FrameworkContentElement.

May I ask you what would you like to achieve so that I can suggest you another way to do it?
 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Nick
Top achievements
Rank 1
answered on 03 Oct 2013, 11:30 AM
Thanks.

I have a grid containing items data-bound items from a collection, not currently supporting INotifyPropertyChanged. The user can potentially change a Boolean property (via checkbox) or a text property.

I wanted to detect when any change had been made (i.e. when the data can be regarded as "dirty". This can then trigger changes to buttons for saving the data changes. While I could tie into the property set for every individual item in the collection, a neater way was (I thought) to detect the property update via the binding and just register the dirty flag this way.

So the question is whether there is any way to detect that data has been changed at the grid or column level, rather than individual items.
0
Dimitrina
Telerik team
answered on 03 Oct 2013, 02:53 PM
Hi,

Please note that RadGridView will understand about any changes done with the data (in code) only after a PropertyChanged or a CollectionChanged event is raised from it.

If the change is done from the user from the UI, then your bound data (properties) will be updated.
 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Nick
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Nick
Top achievements
Rank 1
Share this question
or