﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - UXGridView UpdateRow is not fired</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-UpdateRow-is-not-fired/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>UXGridView UpdateRow is not fired</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-UpdateRow-is-not-fired/</link><pubDate>Thu, 03 Nov 2011 05:27:44 GMT</pubDate><dc:creator>yudi</dc:creator><category>binding</category><category>uxgridview</category><description>&lt;blockquote&gt;&lt;pre&gt;...
&amp;lt;Intersoft:UXGridViewTextColumn Binding="{Binding FQDN, Mode=TwoWay, ValidatesOnExceptions=True,NotifyOnValidationError=True,ValidatesOnNotifyDataErrors=True}"/&amp;gt;
...&lt;/pre&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;pre&gt;...
&amp;lt;Intersoft:FieldLabel Header="FQDN:"&amp;gt;
    &amp;lt;Intersoft:UXTextBox Text="{Binding SelectedItem.FQDN, Mode=TwoWay}" Style="{StaticResource FieldLabelTextBoxStyle}"/&amp;gt;
&amp;lt;/Intersoft:FieldLabel&amp;gt;
...&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;From the snippet code, changes that you made in “FQDN” UXTextBox will be updated on both the target (the UXTextBox itself) and the source (the SelectedItem property). In TwoWay bindings, changes to the target automatically update the source. Instead of updating through UXGridView, this action will directly update the changes on the source.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Silverlight/WPF supports simple data validation in TwoWay bindings for target-to-source updates. To receive notification that a validation error has occurred or has been resolved, you should set the NotifyOnValidationError property to true on the binding object. This tells the binding engine to raise the BindingValidationError event when a validation error is added to or removed from the Validation.Errors collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The following example shows how to provide custom binding validation using ValidatesOnExceptions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;View Model&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;using ClientUI.Samples.Models;
using System.ComponentModel;
using System;

namespace ClientUI.Samples.ViewModels
{
    public class MainPageViewModel : INotifyPropertyChanged
    {
        public MainPageViewModel()
        {

        }

        private double _value;

        public double Value
        {
            get { return this._value; }
            set
            {
                if (this._value != value)
                {
                    if (value &amp;lt; 0)
                        throw new Exception("Amount must be greater than zero.");

                    this._value = value;
                    this.OnPropertyChanged("Value");
                }
            }
        }

        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;

            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;View&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Intersoft="http://intersoft.clientui.com/schemas"    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"      
    xmlns:vm="clr-namespace:ClientUI.Samples.ViewModels"
    mc:Ignorable="d"
        x:Class="ClientUI.Samples.MainPage" Width="800" Height="600"&amp;gt;
    &amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;
        &amp;lt;Grid.DataContext&amp;gt;
            &amp;lt;vm:MainPageViewModel/&amp;gt;
        &amp;lt;/Grid.DataContext&amp;gt;
        &amp;lt;StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"&amp;gt;
            &amp;lt;Intersoft:UXTextBox Width="50" Margin="10"&amp;gt;
                &amp;lt;Intersoft:UXTextBox.Text&amp;gt;
                    &amp;lt;Binding Mode="TwoWay" Path="Value" NotifyOnValidationError="true" ValidatesOnExceptions="true"/&amp;gt;
                &amp;lt;/Intersoft:UXTextBox.Text&amp;gt;
            &amp;lt;/Intersoft:UXTextBox&amp;gt;
            &amp;lt;Intersoft:UXButton Height="50" Width="150" Content="Click To Update Source"/&amp;gt;
        &amp;lt;/StackPanel&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;After the sample starts, type in letters instead of numbers to get an error caused by the type converter. Type in a negative number to get an error from the source object’s set accessor. Type in a positive number to resolve the validation error. UXTextBox target-to-source updates occurs only when the UXTextBox loses focus. The button is provided to change the focus.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>UXGridView UpdateRow is not fired</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-UpdateRow-is-not-fired/</link><pubDate>Wed, 02 Nov 2011 03:52:41 GMT</pubDate><dc:creator>mg@hsig.ch</dc:creator><category>binding</category><category>uxgridview</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have a UXGridView and for each column a FieldLabel (please see attached picture).&lt;br /&gt;The changes I make on FieldLabel will be synchronized directly with the UXGridView. But the Row is not in edit mode. The events ValidateRow and UpdateRow are not fired!&lt;br /&gt;I want the same behavior as when I change a cell in UXGridView and leave the row&lt;br /&gt;How can I do this?&lt;/p&gt;
&lt;p&gt;Update:  I could display the FieldLabel read-only and only editable in edit mode. I have not found a property like "IsEditMode".&lt;/p&gt;
&lt;p&gt;Here some code:&lt;/p&gt;&lt;pre&gt;&amp;lt;Intersoft:UXGridView Intersoft:DockPanel.IsFillElement="True" AutoGenerateColumns="False"
                        Style="{StaticResource UXGridViewStyle}"
                        IsBusy="{Binding IsBusy, Mode=TwoWay}" 
                        IsRefreshed="{Binding IsRefreshed, Mode=TwoWay}"
                        SortDescriptors="{Binding QueryDescriptor.SortDescriptors, Mode=TwoWay}"
                        PageDescriptor="{Binding QueryDescriptor.PageDescriptor}"
                        FilterDescriptors="{Binding QueryDescriptor.FilterDescriptors, Mode=TwoWay}"
                        PageSize="{Binding ElementName=PageSize, Path=Text}"
                        ItemsSource="{Binding Path=Items}"
                        SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                        NewItem="{Binding NewItem, Mode=TwoWay}"
                        HasChanges="{Binding HasChanges}"
                        AutoEditOperation="{Binding AutoEditOperation}" 
                        PrepareNewRowCommand="{Binding PrepareNewRowCommand}"
                        ValidateRowCommand="{Binding ValidateRowCommand}" 
                        InsertRowCommand="{Binding InsertRowCommand}"
                        DeleteRowCommand="{Binding DeleteRowCommand}" 
                        UpdateCellCommand="{Binding UpdateCellCommand}" 
                        UpdateRowCommand="{Binding UpdateRowCommand}"
                        SaveChangesCommand="{Binding SaveChangesCommand}" 
                        RejectRowCommand="{Binding RejectRowCommand}"
                        RejectChangesCommand="{Binding RejectChangesCommand}"
                        RefreshCommand="{Binding RefreshCommand}"
                        CanUserAddRows="True"&amp;gt;
    &amp;lt;Intersoft:UXGridView.Columns&amp;gt;
        &amp;lt;Intersoft:UXGridViewTextColumn Binding="{Binding ID}" Visibility="Collapsed"/&amp;gt;
        &amp;lt;Intersoft:UXGridViewTextColumn Binding="{Binding FQDN, Mode=TwoWay, ValidatesOnExceptions=True,NotifyOnValidationError=True,ValidatesOnNotifyDataErrors=True}"/&amp;gt;
        &amp;lt;Intersoft:UXGridViewTextColumn Binding="{Binding Description}"/&amp;gt;
        &amp;lt;Intersoft:UXGridViewCheckBoxColumn Binding="{Binding Hide}" /&amp;gt;
        &amp;lt;Intersoft:UXGridViewTextColumn Binding="{Binding Version}" Visibility="Collapsed"/&amp;gt;
    &amp;lt;/Intersoft:UXGridView.Columns&amp;gt;
&amp;lt;/Intersoft:UXGridView&amp;gt;&lt;/pre&gt;&lt;pre&gt;&amp;lt;Intersoft:UXItemsControl ItemContainerStyle="{StaticResource FieldLabelStyle}"&amp;gt;
    &amp;lt;Intersoft:FieldLabel Header="ID:"&amp;gt;
        &amp;lt;Intersoft:UXTextBox Text="{Binding SelectedItem.ID}" Style="{StaticResource FieldLabelReadOnlyTextBoxStyle}"/&amp;gt;
    &amp;lt;/Intersoft:FieldLabel&amp;gt;
    &amp;lt;Intersoft:FieldLabel Header="FQDN:"&amp;gt;
        &amp;lt;Intersoft:UXTextBox Text="{Binding SelectedItem.FQDN, Mode=TwoWay}" Style="{StaticResource FieldLabelTextBoxStyle}"/&amp;gt;
    &amp;lt;/Intersoft:FieldLabel&amp;gt;
    &amp;lt;Intersoft:FieldLabel Header="Beschreibung:" Style="{StaticResource RequiredFieldLabelStyle}"&amp;gt;
        &amp;lt;Intersoft:UXTextBox Text="{Binding SelectedItem.Description}" Style="{StaticResource FieldLabelTextBoxStyle}" /&amp;gt;
    &amp;lt;/Intersoft:FieldLabel&amp;gt;
    &amp;lt;Intersoft:FieldLabel Header="Ausblenden:"&amp;gt;
        &amp;lt;Intersoft:UXCheckBox IsChecked="{Binding SelectedItem.Hide}" Style="{StaticResource FieldLabelCheckBoxStyle}" /&amp;gt;
    &amp;lt;/Intersoft:FieldLabel&amp;gt;
&amp;lt;/Intersoft:UXItemsControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>