﻿<?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 Server Side Validation</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-Server-Side-Validation/</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 Server Side Validation</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-Server-Side-Validation/</link><pubDate>Tue, 08 Nov 2011 20:30:18 GMT</pubDate><dc:creator>yudi</dc:creator><category>uxgridview</category><category>validation</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I’m currently still investigating this issue and need more time to provide you with solution, suggestion, or sample.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I’ll get back to you as soon as possible.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>UXGridView Server Side Validation</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-Server-Side-Validation/</link><pubDate>Fri, 04 Nov 2011 04:22:50 GMT</pubDate><dc:creator>mg@hsig.ch</dc:creator><category>uxgridview</category><category>validation</category><description>&lt;p&gt;Hi Yudi&lt;/p&gt;
&lt;p&gt;The data validation is on serverside (ria service class). &lt;/p&gt;
&lt;div lang="undefined" _msthash="826319"&gt;I have by mistake a &lt;a href="http://www.intersoftpt.com/Community/ClientUI/Serverside-Valiation/" target="_blank"&gt;new thread open&lt;/a&gt;. Sorry.&lt;/div&gt;
&lt;div lang="undefined" _msthash="826319"&gt; &lt;/div&gt;
&lt;div lang="undefined" _msthash="826319"&gt;Please have a look.&lt;/div&gt;
&lt;div lang="undefined" _msthash="826319"&gt;Thanks&lt;/div&gt;
&lt;div lang="undefined" _msthash="826319"&gt; &lt;/div&gt;
&lt;div lang="undefined" _msthash="826319"&gt;Regards&lt;/div&gt;
&lt;div lang="undefined" _msthash="826319"&gt;Michael&lt;/div&gt;</description></item><item><title>UXGridView Server Side Validation</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-Server-Side-Validation/</link><pubDate>Thu, 03 Nov 2011 08:17:40 GMT</pubDate><dc:creator>yudi</dc:creator><category>uxgridview</category><category>validation</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;In order to perform data validation to the particular changes, you can implement it by handling the ValidateRow command in the ViewModel. In addition, you can also add custom logic when the row changes are canceled by handling the RejectRow command.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;So, instead of implement the data validation in Insert and Update method, I suggest you to implement it in ValidateRow command.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;For more detail information, please check the ClientUI documentation inside “Editing Data with UXGridView” topic.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>UXGridView Server Side Validation</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXGridView-Server-Side-Validation/</link><pubDate>Wed, 02 Nov 2011 05:19:23 GMT</pubDate><dc:creator>mg@hsig.ch</dc:creator><category>uxgridview</category><category>validation</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I use Client UI MVVM Data Application with RIA Services. I have added Atributes on Metadata Class, eg. DataAnnotations.RequiredAttribute&lt;/p&gt;&lt;pre&gt;[Required(ErrorMessage = "Eingabe erforderlich!")]
[StringLength(250, ErrorMessage = "Es sind max. 250 Zeichen erlaubt!")]
public string FQDN { get; set; }&lt;/pre&gt;

&lt;p&gt;When the Cell is empty, I get the Errormessage in UXGridView Footer and the row has a red background color. Please have a look at attached picture (1). This works fine.&lt;/p&gt;
&lt;p&gt;Now, I have to validate also on server side. In my case, the FQDN must be unique. So I have writ following method:&lt;/p&gt;&lt;pre&gt;public bool IsComputerFQDNRegistered(string fqdn)
{
    return _qmsEntities.Computer.Where(c =&amp;gt; c.FQDN == fqdn).Count() &amp;gt; 0;
}&lt;/pre&gt;

&lt;p&gt;In Insert and Update method, I call IsComputerFQDNRegistered, like this:&lt;/p&gt;&lt;pre&gt;public void InsertComputer(Computer computer)
{
    if (IsComputerFQDNRegistered(computer.FQDN))
    {
        ValidationResult error = new ValidationResult("FQDN ist bereits vorhanden!", new string[] { "FQDN" });
        throw new ValidationException(error, null, computer);
    }

    if ((computer.EntityState != EntityState.Detached))
    {
        _qmsEntities.ObjectStateManager.ChangeObjectState(computer, EntityState.Added);
    }
    else
    {
        _qmsEntities.Computer.AddObject(computer);
    }
}&lt;/pre&gt;

&lt;p&gt;Now I change one FQDN in UXGridView and leave the row to save the changes. I get a Errormessage (see UXGridViewErrorMessageValitationError.png). I would like display the ValidationResult ErrorMessage (FQDN ist bereits vorhanden). Where can I find this Info?&lt;/p&gt;
&lt;p&gt;After clicking OK on Errormessage, I can not see any errors in UXGridView. Only when I mark the row (with Errors) and change in edit mode, the Errormessage will displayed. But in the UXGridView Footer I can not see the message (please have a look at attached picture (2)). It is possible to change this behavoir? It would be great, when the background color would be red.&lt;/p&gt;
&lt;p&gt;Thanks for help&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item></channel></rss>