﻿<?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 - validation</title><link>http://www.intersoftsolutions.com/Community/Tags/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>Validation Questions</title><link>http://www.intersoftsolutions.com/Community/Tags/validation/</link><pubDate>Wed, 10 Jun 2015 04:54:42 GMT</pubDate><dc:creator>soup27</dc:creator><category>validation</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I want to add validation to the UXTextBox using the&amp;nbsp;IDataErrorInfo Interface. My question is when the window is initialized the error info will appears two overlapping red box over the UXTextBox(see the attachments 2.png).&lt;/p&gt;&lt;p&gt;And when I type some in the UXTextBox to insure to pass the validation, one red box disappered and the other overlapping red box is still there&lt;span style="font-size: 13.3333330154419px;"&gt;(see the attachments 3.png)&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;What is the correct setting to use Validation feature?&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description></item><item><title>UXGridView Server Side Validation</title><link>http://www.intersoftsolutions.com/Community/Tags/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><item><title>WebGrid add pending changes from server-side</title><link>http://www.intersoftsolutions.com/Community/Tags/validation/</link><pubDate>Mon, 17 Oct 2011 07:34:17 GMT</pubDate><dc:creator>interfung</dc:creator><category>WebGrid</category><category>server side</category><category>pending changes</category><category>pending</category><category>validation</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Below is the scenario for my project.&lt;/p&gt;
&lt;p /&gt;
&lt;ul&gt;&lt;li&gt;I have a grid for user input&lt;/li&gt;&lt;li&gt;The grid's data-binding, layout and batch update is done at server side&lt;/li&gt;&lt;li&gt;The grid is paged&lt;/li&gt;&lt;li&gt;Call AcceptAllChanges (client-side) to invoke WebGrid1.BatchUpdate&lt;/li&gt;&lt;li&gt;Validation is done in WebGrid1.BatchUpdate (before write to Database, server-side). [ I wonder if there is any other events for the gird's data validation]&lt;/li&gt;&lt;/ul&gt;
&lt;div&gt;As I need to validate before updating data in Database; so I called "AcceptAllChanges" (client-side) to invoke the server-side "WebGrid1.BatchUpdate" event.&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;When Input is valid, everything goes fine. But if the input is invalid, all the Pending changes will be lost (since I call the AcceptAllChanges). Since the WebGrid is paged, so I can't use client-side to add back the pending changes. &lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Is there any way that I could add the Pending changes back when the grid has invalid input, so that, the data inputted before "AcceptAllChanges" can stay on the grid for users to correct.&lt;/div&gt;
&lt;div&gt;Or is there any Event of WebGrid can be provided for validation before the WebGrid.batchUpdate Event.&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Thanks and Regards,&lt;/div&gt;
&lt;div&gt;Fung&lt;/div&gt;</description></item></channel></rss>