<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Intersoft Solutions Corporate Blog &#187; DevForce</title>
	<atom:link href="http://blog.intersoftsolutions.com/tag/devforce/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.intersoftsolutions.com</link>
	<description>All about development productivity – ASP.NET, Silverlight, WPF, iOS, Android, Windows Phone, Windows 8</description>
	<lastBuildDate>Sat, 21 Apr 2018 06:57:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.33</generator>
	<item>
		<title>DevForce 2012 Support in ClientUI for Silverlight &amp; WPF</title>
		<link>http://blog.intersoftsolutions.com/2013/04/devforce-2012-support-in-clientui-for-silverlight-wpf/</link>
		<comments>http://blog.intersoftsolutions.com/2013/04/devforce-2012-support-in-clientui-for-silverlight-wpf/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 12:03:16 +0000</pubDate>
		<dc:creator><![CDATA[yudhiy]]></dc:creator>
				<category><![CDATA[2013 R1]]></category>
		<category><![CDATA[Asynchronous Programming]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/?p=3047</guid>
		<description><![CDATA[Since 2010, we’ve partnered with IdeaBlade to provide our customers with a comprehensive and robust solution for building highly scalable line-of-business applications. The successful integration between IdeaBlade’s DevForce and our flagship ClientUI toolset significantly improves developer’s productivity – allowing them to leverage the MVVM pattern [...]]]></description>
				<content:encoded><![CDATA[<img width="436" height="250" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/08/banner-blog-clientui-436x270.jpg" class="attachment-post-thumbnail wp-post-image" alt="banner-blog-clientui-436x270" style="float:right; margin:0 0 10px 10px;" /><p>Since 2010, we’ve partnered with IdeaBlade to provide our customers with a comprehensive and robust solution for building highly scalable line-of-business applications. The successful integration between IdeaBlade’s DevForce and our flagship ClientUI toolset significantly improves developer’s productivity – allowing them to leverage the MVVM pattern to build beautiful interface and at the same time enjoying the client-side LINQ query capability as well as many other advanced features available in DevForce.</p>
<p>As DevForce 2012 is now officially released to the market, we’re committed to continue supporting the latest DevForce version and leverage its new features in our toolset.  DevForce 2012 is the sevent-generation of the DevForce n-tier architecture released by IdeaBlade. This version has supported some noteworthy features such as .NET 4.5 asynchronous programming support, Entity Framework 5 support, and Windows Store Apps support. For more details, please visit <a href="http://www.ideablade.com">DevForce 2012</a> information page.</p>
<h2>DevForce 2012 Support</h2>
<p>The latest suite of Intersoft WebUI Studio 2012 R2 ships with DevForce 2010 (version 6.1.7.0). In the next release, we’ll include full support for DevForce 2012. However, we’ll make available the new DevForce 2012 support assemblies so you can start using them today. In this blog post, I’ll share how to implement DevForce 2012 support in your existing applications.</p>
<p>We provide two kind of support for DevForce 2012 which are detailed in the following sections.</p>
<h3>Using Backward Compatibility</h3>
<p>This solution is intended for existing DevForce 2010 .NET and Silverlight projects which uses the “operation/callback” asynchronous API.</p>
<p>Migrating from existing DevForce 2010 projects to DevForce 2012 are made easy by applying the following rule.</p>
<ul>
<li>Add a using/Imports statement to your code file for IdeaBlade.EntityModel.Compat.</li>
<li>Add a using/Imports statement to your code file for the new Intersoft data provider of DevForce 2012, Intersoft.Client.Data.Provider.DevForce2012.</li>
<li>Add a using/Imports statement of Intersoft.Client.Data.Provider.DevForce2012.Compatibility.</li>
</ul>
<p>With this approach, you don’t need to change a single line of code in your project, while enjoying the benefits and new features available in DevForce 2012 and Entity Framework 5. I recommend you to go with this approach if your existing application is considerably large and you prefer to do the transition in progressive fashion.</p>
<p>Click <a href="https://github.com/IntersoftSolutions/clientui_devforce2012/tree/master/DevForce2012-BackwardCompatibility" target="_blank">here</a> to browse the sample project which was created using Intersoft ClientUI MVVM Data Application using DevForce 2010. The project was later modified by migrating the DevForce 2010 to DevForce 2012.</p>
<h3>Using Native DevForce 2012 API</h3>
<h4>Asynchronous patterns</h4>
<p>The Task-based Asynchronous Pattern (TAP) is based on the Task and Task&lt;TResult&gt; types in the System.Threading.Tasks namespace, which are used to represent arbitrary asynchronous operations. TAP is the recommended asynchronous design pattern for new development.</p>
<p>DevForce 2012 has implemented the use of TAP. By implementing this, we are able to use the <i>await</i> keyword, which makes asynchronous method calls feel synchronous when we’re writing code.</p>
<p>Instead of writing callback, lambda expressions, or coroutines, we now use <i>await</i>. Here is an example about the implementation of <i>await</i>.</p>
<p>Using lambda expression in DevForce 2010</p><pre class="crayon-plain-tag">public virtual void GetData(Action&lt;IEnumerable&gt; onSuccess, Action&lt;Exception&gt; onFail)
{
    if (Intersoft.Client.Framework.ISControl.IsInDesignModeStatic)
        return;

    var query = this.EntityQuery;

    query.ExecuteAsync(
        op =&gt;
        {
            if (op.CompletedSuccessfully)
            {
                if (onSuccess != null)
                    onSuccess(op.Results);
            }
            else
            {
                if (onFail != null)
                {
                    op.MarkErrorAsHandled();
                    onFail(op.Error);
                }
            }
        });
}</pre><p>Using <i>await</i> in DevForce 2012</p><pre class="crayon-plain-tag">public virtual async Task&lt;IEnumerable&gt; GetData()
{
    if (Intersoft.Client.Framework.ISControl.IsInDesignModeStatic)
        return null;

    var query = this.EntityQuery;

    IEnumerable results = await query.ExecuteAsync();
    return results;
}</pre><p>GetData() method which previously doesn’t return anything (void) now returns Task. The lambda expression is replaced with following line of code.</p><pre class="crayon-plain-tag">IEnumerable results = await query.ExecuteAsync();
return results;</pre><p>onSuccess and onFail parameters – the callback to invoke when the operation succeeded or failed – are no longer available. You handle them in the same way and manner as you wrote synchronous code, that is by wrapping them in a try-catch syntax.</p>
<p>We now provide a new version of DevForce data provider that supports <em>async</em> and <em>await</em> operations which conforms to DevForce 2012 native API. For example, you can now use the following code to query a list of customers from the repository.</p><pre class="crayon-plain-tag">private async void LoadCustomers()
{
    try
    {
        var customers = await this.CustomersSource.GetData();
        this.Customers = customers;
        this.IsCustomersLoaded = true;
    }
    catch (Exception ex)
    {
        this.Presenter.ShowErrorMessage(
                "An exception has occurred during data loadingn." +
                "Message: " + ex.Message +
                "Stack Trace: " + ex.StackTrace);
    }
}</pre><p>Click <a href="https://github.com/IntersoftSolutions/clientui_devforce2012/tree/master/DevForce2012-NativeDevForce2012API" target="_blank">here</a> to browse the sample project in github which was created using Intersoft ClientUI MVVM Data Application using DevForce 2012. Note that the new DevForce support assemblies can be found in the sample project.</p>
<p>Definitely there are so much exciting stuff in the continuing collaboration of ClientUI and DevForce 2012. Let me know if you have any questions or feedback about the DevForce 2012 support, or how we can improve it better for you.</p>
<p>Warm Regards,<br />
Yudi</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2013/04/devforce-2012-support-in-clientui-for-silverlight-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Silverlight Tutorials: Building business applications with ClientUI and DevForce</title>
		<link>http://blog.intersoftsolutions.com/2011/08/new-silverlight-tutorials-building-business-applications-with-clientui-and-devforce/</link>
		<comments>http://blog.intersoftsolutions.com/2011/08/new-silverlight-tutorials-building-business-applications-with-clientui-and-devforce/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 16:11:23 +0000</pubDate>
		<dc:creator><![CDATA[Jimmy Petrus]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/2011/08/08/new-silverlight-tutorials-building-business-applications-with-clientui-and-devforce/</guid>
		<description><![CDATA[By the latest release, we’ve shipped a whopping 300+ rich controls for Silverlight and WPF development – and that’s not to mention the included advanced frameworks like MVVM, commands, event aggregators and more! Fortunately, we included a comprehensive documentation and dozens of new tutorial videos [...]]]></description>
				<content:encoded><![CDATA[<img width="466" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/salesinvoiceline1-604x350.png" class="attachment-post-thumbnail wp-post-image" alt="" style="float:right; margin:0 0 10px 10px;" /><p>By the latest release, we’ve shipped a whopping 300+ rich controls for Silverlight and WPF development – and that’s not to mention the included advanced frameworks like MVVM, commands, event aggregators and more! Fortunately, we included a comprehensive <a href="http://www.intersoftpt.com/Support/ClientUI/Documentation" target="_blank">documentation</a> and dozens of <a href="http://intersoftpt.wordpress.com/2011/07/22/9-new-clientui-tutorial-videos/" target="_blank">new tutorial videos</a> to help you getting on the board fast. If those are still not enough, make sure you check out the new ClientUI tutorials focusing on line-of-business application development – thanks to our friend, Bill Gower, for such the great contributions.</p>
<p>In the first series of his post, Bill overviews the application that he’s going to build using Intersoft ClientUI for the presentation layer and IdeaBlade DevForce for the data service layer. And Bill picks up the line just right, you’ll be surely excited to explore through the steps of creating a fully-functional sales/retail application – from the Customers, Inventory, Sales Invoices to Purchases and more. </p>
<p><img src="http://silverlightandwpf.files.wordpress.com/2011/08/salesinvoiceline.png" width="621" height="480"></p>
<p>Best of all, you can learn how to build the applications right using the best design and architectural patterns. You can check out the post <a href="http://silverlightandwpf.wordpress.com/2011/08/06/nested-dialog-boxes-using-intersoft-clientui/" target="_blank">here</a>.</p>
<p>Furthermore, Bill has written a series of great articles to share his experiences while developing in Silverlight and WPF. Some of the noteworthy links are as follows.</p>
<ul>
<li><a href="http://silverlightandwpf.wordpress.com/2011/07/22/much-ado-about-nothing/" target="_blank">Slash 7,000 lines of code with MVVM design pattern</a></li>
<li><a href="http://silverlightandwpf.wordpress.com/2011/07/18/my-two-favorite-new-classes-that-i-use-constantly/" target="_blank">Data retrieval made easy with QueryDescriptor from Intersoft ClientUI toolkit</a></li>
<li><a href="http://silverlightandwpf.wordpress.com/2011/07/02/no-false-advertising-here/" target="_blank">Cloning a Silverlight application to WPF in under an hour</a></li>
<li><a href="http://silverlightandwpf.wordpress.com/2011/06/29/which-mvvm-framework-should-i-use-for-my-silverlight-application/" target="_blank">Which MVVM Framework should I use for my Silverlight application?</a></li>
</ul>
<p>Best,<br />Jimmy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/08/new-silverlight-tutorials-building-business-applications-with-clientui-and-devforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ClientUI &amp; DevForce Part 3: Enhance Editing Experiences with MVVM Advanced Input Controls</title>
		<link>http://blog.intersoftsolutions.com/2011/06/clientui-devforce-part-3-enhance-editing-experiences-with-mvvm-advanced-input-controls/</link>
		<comments>http://blog.intersoftsolutions.com/2011/06/clientui-devforce-part-3-enhance-editing-experiences-with-mvvm-advanced-input-controls/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 13:13:17 +0000</pubDate>
		<dc:creator><![CDATA[Jimmy Petrus]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/2011/06/08/clientui-devforce-part-3-enhance-editing-experiences-with-mvvm-advanced-input-controls/</guid>
		<description><![CDATA[In the previous series of the joint ClientUI and DevForce sample, you have learnt how to build a simple Contacts application that runs in both Silverlight and WPF using the architectural best practice such as MVVM design pattern. The first series discussed about the fundamental [...]]]></description>
				<content:encoded><![CDATA[<img width="466" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/image_thumb35-604x350.png" class="attachment-post-thumbnail wp-post-image" alt="Rich Contact Editor with Masked Input" style="float:right; margin:0 0 10px 10px;" /><p>In the previous series of the joint ClientUI and DevForce sample, you have learnt how to build a simple Contacts application that runs in both Silverlight and WPF using the architectural best practice such as MVVM design pattern. The first series discussed about the fundamental data access architecture, while the second series talked about sandboxed editing. You can read the first blog post <a href="http://intersoftpt.wordpress.com/2010/11/23/extending-contacts-application-silverlight-wpf-with-devforce-2010/">here</a>, and the second post <a href="http://intersoftpt.wordpress.com/2011/01/11/clientui-devforce-part-2-contact-sandbox-editor/">here</a>.</p>
<p>In this blog post, I’m pleased to introduce the third series of our joint Contacts sample which is strongly focused on improving the editing experiences. The upgraded Contacts sample guides you how to add rich editing capabilities to your Silverlight and WPF applications using the new ClientUI’s advanced input controls. More interestingly, it also addresses a number of challenging technical implementation such as adding a nice photo upload capability using MVVM design pattern. Let’s get it started!</p>
<h2>Eliminate Input Errors with UXMaskedInput</h2>
<p>In the original Contacts application, the Contact Editor uses basic textbox controls to capture the data input such as the Id, name and address of the contact. However, using basic textboxes to accept patterned data input – such as found in zip code or a phone number – is often prone of entry errors which lead to data inconsistency and corruption in the application’s functionality. </p>
<p>Fortunately, the latest ClientUI release now comes with dozens of advanced input controls with various built-in features, each designed to address different needs. For example, UXMaskedInput is designed to restrict data input with patterned format such as zip code or SSN, UXCurrencyEditor for entering number and currency input, and UXDateTimePicker for entering date and time.</p>
<p>Back to our Contacts application, the Contact Editor definitely needs some improvements to provide users with richer editing capabilities which ultimately minimize data entry errors. Some of the possible improvements are as following:</p>
<ul>
<li>Add automatic uppercase conversion to the ID input
<li>Limit the zip code to accept only five optional digits
<li>Add phone number masking to Phone, Cell and Fax input</li>
</ul>
<p>Most of the above requirements can be achieved with UXMaskedInput, thanks to its powerful and comprehensive masking features. Its MVVM-ready architecture also enable us to implement rich masked editing complete with validation in just a few minutes – all without writing code.</p>
<p>The following example shows how to use UXMaskedInput to accept only input with phone number pattern.</p>
<p></p><pre class="crayon-plain-tag">&lt;Intersoft:UXMaskedInput Width="120" EditMask="0-000-000-0000"
     ErrorMessage="Please enter a valid phone number, i.e., 1-510-555-1212"
     Value="{Binding Contact.Phone, ValidatesOnDataErrors=true, Mode=TwoWay}" 
     Intersoft:DataBinding.ClearErrorOnTextInput="True" 
     IsSaveLiteral="True" /&gt;</pre><p></p>
<p>And the results below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/06/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Rich Contact Editor with Masked Input" border="0" alt="Rich Contact Editor with Masked Input" src="http://intersoftpt.files.wordpress.com/2011/06/image_thumb.png" width="642" height="475"></a></p>
<p>To learn more about the features available in UXMaskedInput, please see <a href="http://www.intersoftpt.com/Support/ClientUI/Docs/UXMaskedInput.html" target="_blank">UXMaskedInput Documentation</a>.</p>
<h2>Implement MVVM Photo Upload with UXFileUpload</h2>
<p>Most of modern web applications today leverage the power of multimedia such as images and videos more than ever before to create more engaging user experiences. Even Twitter, the 140 character-limited microblogging social tool, has now evolved allowing people to post and share their photos – <a href="http://thenextweb.com/twitter/2011/06/02/photos-on-twitter-are-live-heres-how-they-look/" target="_blank">announced</a> two days ago. </p>
<p>While file upload might sound easy and is something already common in the web, it’s not so common in Silverlight. The complexity grows up particularly when you’re tasked to implement it using MVVM pattern, not to mention you still have bunch of other things to take care such as the user experiences and the reliability of the file upload process itself. This could take weeks, or&nbsp; months of coding time just to add a file upload capability that really works. The good news is that we have a solution for you. Read on.</p>
<p>In this third joint Contacts sample, we’d love to share how easy it is to add an impressive photo upload feature to the Contact Editor. With UXFileUpload, we’ve got everything we needed – from multiple files upload, progress indicator, upload cancellation, to a fully customizable look and feel. Better yet, it fully supports MVVM pattern which means that you can start the uploading process, identify the progress and capture the uploaded results – all within the ViewModel.</p>
<p>With photo upload implementation that satisfies the MVVM pattern, it enables us to easily reflect the changes to the DevForce’s entity through a two-way data binding. The following code snippet shows the photo upload implementation with UXFileUpload using MVVM pattern.</p>
<p></p><pre class="crayon-plain-tag">&lt;Intersoft:UXFileUpload ServiceUrl="http://localhost:1215/UXFileUploadHandler.ashx" 
     TargetFolder="~/Assets/Photos" TargetWebUrl="./" MaxFileSize="512000" 
     OverwriteExistingFiles="True" IsAutomaticUpload="True" CanSelectMultiple="False" 
     ShowStatisticsOnCompleted="False" FileTypeFilter="Image Files (*.jpg)|*.jpg" 
     EnforceFileTypeValidation="True" 
     UploadedFileUrl="{Binding Contact.PhotoUrl, Mode=TwoWay}"/&gt;</pre><p></p>
<p>Notice that the <strong>UploadedFileUrl</strong> is bound two-way to the contact’s <strong>PhotoUrl </strong>property. When the upload completes, the <strong>PhotoUrl</strong> reflects the changes immediately. As the results, you don’t even have to add any code in the ViewModel, because the existing SaveChanges function will automatically take account the changes in the PhotoUrl property.</p>
<p>The following screenshot shows the polished Contact Editor with photo upload capability.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/06/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Contact Editor with photo upload capability" border="0" alt="Contact Editor with photo upload capability" src="http://intersoftpt.files.wordpress.com/2011/06/image_thumb1.png" width="642" height="420"></a></p>
<p>When saved, the newly uploaded photo in the Contact List will be automatically updated as well without any additional effort, this is made possible with a two-way binding between the image source and the image property in the DevForce’s entity, see below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/06/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://intersoftpt.files.wordpress.com/2011/06/image_thumb2.png" width="587" height="550"></a></p>
<p>All in all, the advanced input controls with solid MVVM architecture combined are true productivity booster! It helps make development faster, easier and more maintainable. </p>
<p>To learn more how to implement the advanced input controls and the photo upload in depth details, please read the <a href="http://www.intersoftpt.com/ClientUI/3_EnrichDataEditing.pdf" target="_blank">PDF walkthrough</a>.</p>
<h2>Download the Solution</h2>
<p>Click <a href="http://www.intersoftpt.com/ClientUI/ClientUI_DevForceIntegration_v3.zip">here</a> to download the latest Contacts project source code along with the walkthrough document. Please note that the download package contains updated files and a number of bug fixes, thus is newer than the one installed in ClientUI 5. The latest project source will be shipped in the upcoming ClientUI 5 service pack. </p>
<p>As usual, the release includes both Silverlight and WPF projects which are built with identical codebase. Feel free to play around with the code and use it in your apps! Note that you will need the latest version of ClientUI and DevForce to run this sample. You can download the latest ClientUI release <a href="http://www.clientui.com/download" target="_blank">here</a>, and DevForce <a href="http://www.ideablade.com/DevForceUniversal/DevForceUniversal_DownloadEditions.aspx">here</a>. </p>
<p>Any feedback and thoughts are warmly welcomed. </p>
<p>Best,<br />Jimmy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/06/clientui-devforce-part-3-enhance-editing-experiences-with-mvvm-advanced-input-controls/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ClientUI 5: Unlock The Amazing Possibilities</title>
		<link>http://blog.intersoftsolutions.com/2011/05/clientui-5-unlocking-the-amazing-possibilities/</link>
		<comments>http://blog.intersoftsolutions.com/2011/05/clientui-5-unlocking-the-amazing-possibilities/#comments</comments>
		<pubDate>Fri, 06 May 2011 04:45:03 +0000</pubDate>
		<dc:creator><![CDATA[jemmyh]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/?p=2315</guid>
		<description><![CDATA[The latest ClientUI brings so many new innovations and technology advancement available no-where else. The release debuts with a host of various data visualization controls like grid view, tree view, document viewers, and more. Even better, the deep integration with IdeaBlade’s DevForce provides the fastest [...]]]></description>
				<content:encoded><![CDATA[<img width="466" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/uxgridview_assetsmanagement11-604x350.png" class="attachment-post-thumbnail wp-post-image" alt="Assets management with rich UI/X features" style="float:right; margin:0 0 10px 10px;" /><p>The latest ClientUI brings so many new innovations and technology advancement available no-where else. The release debuts with a host of various data visualization controls like grid view, tree view, document viewers, and more. Even better, the deep integration with IdeaBlade’s DevForce provides the fastest way to build MVVM-enabled business applications. All of this innovations are geared towards a better development experience to build any business applications of any size and any complexity.</p>
<p>In this blog post, I will review the new shinny samples demonstrating the new products and the features, as well as sharing my top favorite new samples.</p>
<p>Below are the top 10 my favorite picks of new ClientUI 5 samples</p>
<ol>
<li><strong>Assets Management</strong></p>
<p>The assets managements sample is a good demonstration of the latest UXGridView with many features enabled such as Column Freezing, data grouping, column sorting, and the powerful data editing capability.</p>
<p>Data editing is a crucial feature in any grid view control. You can add a new row, edit, or delete a row. UXGridView extends this behavior further with many innovative features such as custom editing control, data validation, read-only binding, value list, and more.</p>
<p>Read-only binding is a unique feature that lets you lock certain columns or a row based on a column’s edited value. For example when an asset status is sold, the Service Date column is lock for editing. Value list is a unique feature which translates a foreign key column into a more meaningful data. For example Department column refers to DepartmentId from&nbsp; Department table. Instead of showing the number, the department name is showed instead. This feature also works with data editing.</p>
<p>In addition, various user experience features are also demonstrated like column freezing, paging, and more. UXGridView’s column freezing is closely similar to the on in Excel. You can lock certain columns from the left side and prevent it from being horizontally scrolled when the available viewport can’t accommodate all columns. <a href="http://live.clientui.com/#/UXGridView/Reference/Assets" target="_blank">Explore the sample</a>.<img title="Assets management with rich UI/X features" alt="Assets management with rich UI/X features" src="http://intersoftpt.files.wordpress.com/2011/05/uxgridview_assetsmanagement1.png" width="589" height="348"> </p>
<li><strong>eMagazine Viewer</strong><br />Like to read books, magazine in your portable inch+ thick digital reader? With the latest XPSDocumentViewer, you can add the same rich reading experience to your Silverlight or WPF applications. Try to click on the Browse Library to select and load different magazine.<br />&nbsp;<br />The high-performance rendering engine displays the document brilliantly. Images are vibrant and text is crisp. Especially when using the various zooming feature, you will notice that the document is displayed at its best quality even during the zooming process. <a href="http://live.clientui.com/#/DocumentViewers/XPSDocumentViewer/MagazineViewer">Explore the sample</a>.<img title="e-Magazine Reader" alt="e-Magazine Reader" src="http://intersoftpt.files.wordpress.com/2011/05/xps_magazine.png" width="615" height="369"> <br />&nbsp;<br /> 
<li><strong>Getting Started Viewer</strong><br />If the above scenario shows XPSDocumentViewer loading rich media content, this specific sample demonstrate its powerful multiple page document loading capability without any slow down.<br />&nbsp;<br />The innovative feature behind all this is the load-on-demand engine. It prioritizes visible pages to be loaded and rendered while the rest are loaded conditionally. Another great feature is the background loading. It allows pages to be preloaded in the background during application’s idle time. In this sample, you will notice that both document and applications is loaded at the same time.<br />&nbsp;<br />You should try the built-in page navigation. There are two types, thumbnail and outline. Thumbnail mode displays a small preview image of every page, while outline provide the entire document’s TOC hierarchically (depending on the document’s structure). <a href="http://live.clientui.com/#/DocumentViewers/XPSDocumentViewer/MultiplePageXPS">Explore the sample</a>.<img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Getting Started Document Viewer" border="0" alt="Getting Started Document Viewer" src="http://intersoftpt.files.wordpress.com/2011/05/uxgridview_gettingstartedguide_thumb.png" width="617" height="372"> <br />&nbsp;<br /> 
<li><strong>Baseball Player</strong><br />Rejoice baseball fan, now you can see your all-time favorite baseball player attractively in UXGridView. Try to select a row and notice that the detailed information is displayed under. This row detail feature is enhanced with selector functionality to easily incorporate certain business rules. You can also change the row detail behavior, whether it is shown all the time or on selected item only. <a href="http://live.clientui.com/#/UXGridView/Reference" target="_blank">Explore the sample</a>.<img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="UXGridView Baseball Sample" border="0" alt="UXGridView Baseball Sample" src="http://intersoftpt.files.wordpress.com/2011/05/uxgridview_baseball_thumb.png" width="612" height="437"> </p>
<li><strong>Employee Leave Records</strong><br />One of the most unique sample in UXGridView is the Employee Leave Records – emphasizing on the grid’s various data interaction features. Click on the filter button on a column to reveal the filter box. You can use the check box to filter the row or type, or use type in the textbox to narrow down the available filter options.<br />&nbsp;<br />Sorting feature is available out-of-the-box controlled by a property. In addition to single column sorting, UXGridView is enhanced to support multiple sorting. Click on the first column to sort. Hold shift and click on the second column, and so on. To change the sort direction, click on the same column while holding shift to maintain the multiple sorting behavior or UXGridView will discard the previous sorting order.<br />&nbsp;<br />The loosely coupled architecture adoption enables users to externally execute certain grid view features. The most notable implementation is the Export and Refresh button. The default location is on the grid footer, but in this sample a second button is added above the grid.<br />&nbsp;<br /><a href="http://live.clientui.com/#/UXGridView/Reference/LeaveRecords" target="_blank">Try the sample here</a> to discover more features.<img class="alignnone size-full wp-image-2339" title="Employee Leave Records" alt="Employee Leave Records" src="http://intersoftpt.files.wordpress.com/2011/05/leaverecord.png" width="640" height="365"> <br />&nbsp;<br /> 
<li><strong>My Outlook<br /></strong>UXNavigationPane is a flexible, space-saving navigation control adopted after Office 2010. User can easily collapse the entire control to when more screen estate is required and restore it when needed. It also feature real-time resizing feature with “snapping” feature. You can also try to explore various pane items and see its content. <a href="http://live.clientui.com/#/UXControls/UXNavigationPane" target="_blank">Explore the sample</a>.<img class="alignnone size-full wp-image-2322" title="My Outlook" alt="My Outlook" src="http://intersoftpt.files.wordpress.com/2011/05/navigationpane.png" width="640" height="376"> <br />&nbsp;<br /> 
<li><strong>Corporate File Explorer</strong><br />In most business applications, tree view is often used as the primary navigation system for its hierarchical display – enabling users to directly jump into a sub page. And in most cases, it gets sluggish when the structure gets too complex with many nodes.<br />&nbsp;<br />This sample demonstrates UXTreeView with its blazing-fast loading regardless of the structure. Using a custom Load-on-Demand technique, UXTreeView allows developer to custom-code the child node retrieval process. When enabled, the expand toggle indicator will be shown. <a href="http://live.clientui.com/#/NavigationControls/UXTreeView/FileExplorer">Explore the sample</a>.<img class="alignnone size-full wp-image-2324" title="File Explorer" alt="File Explorer" src="http://intersoftpt.files.wordpress.com/2011/05/treeview_fileexp.png" width="640" height="399"> </p>
<li><strong>Online Book Store<br /></strong>Despite the nature as a navigation control, UXTreeView can be used to display a list of items in hierarchical order, just like the following online book store sample. User can use the checkbox to select or deselect the desired category.<br />&nbsp;<br />UXTreeView’s checkbox is designed to accommodate non-linear structure selection with three-state mode, checked, unchecked, and indeterminate. Indeterminate is a state indicating a parent, whose child nodes are partially checked. If all child nodes are selected, the parent’s checked status is checked. You can also check on the parent to select all of its child nodes. <a href="http://live.clientui.com/#/NavigationControls/UXTreeView/BookStore">Explore the sample</a>.<img class="alignnone size-full wp-image-2323" title="TreeView Bookstore" alt="TreeView Bookstore" src="http://intersoftpt.files.wordpress.com/2011/05/treeview_bookstore.png" width="640" height="442"> <br />&nbsp;<br /> 
<li><strong>My Tasks and Events<br /></strong>This “My Tasks and Events’ sample uses UXTreeView as its category navigator. Click on a node to select different category. You can also move an event to different category by dragging it and drop it on the desired node. <a href="http://live.clientui.com/#/NavigationControls/UXTreeView/MyEvents">Explore the sample</a>.<img class="alignnone size-full wp-image-2331" title="My Events" alt="My Events" src="http://intersoftpt.files.wordpress.com/2011/05/treeview_events.png" width="553" height="345"> <br />&nbsp;<br /> 
<li><strong>Order List<br /></strong>This sample demonstrates UXGridView displaying data in hierarchical order. Depending on your data structure, you can have unlimited nested table with on-demand data retrieval. You can click on the plus sign to expand the child table.This sample also demonstrate the visual customizability. You can easily experiment and apply any custom color and theme to UXGridView, for example the black color. <a href="http://live.clientui.com/#/UXGridView/Reference/OrdersList" target="_blank">Explore the sample</a>.<img class="alignnone size-full wp-image-2329" title="UXGridView OrderList" alt="UXGridView OrderList" src="http://intersoftpt.files.wordpress.com/2011/05/uxgridview_orderlist.png" width="640" height="378"> </li>
</ol>
<p>Above are only some small collection of business-inspiring samples featured on ClientUI live demo page. Please visit <a href="http://live.clientui.com/" target="_blank">live.clientui.com</a> to experience all. Want to build an amazing application such as shown above? <a href="http://www.clientui.com/download" target="_blank">Grab</a> the 30-day trial now. Existing customers with valid subscription can obtain the latest WebUI Studio from <a href="http://dev2.intersoftpt.com/" target="_blank">Developer Network</a>, under My Components shortcut.</p>
<p>Happy developing.</p>
<p>Best regards,<br />Jemmy Haryono</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/05/clientui-5-unlocking-the-amazing-possibilities/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebUI Studio 2011 Goes Gold!</title>
		<link>http://blog.intersoftsolutions.com/2011/05/webui-studio-2011-goes-gold/</link>
		<comments>http://blog.intersoftsolutions.com/2011/05/webui-studio-2011-goes-gold/#comments</comments>
		<pubDate>Mon, 02 May 2011 18:53:18 +0000</pubDate>
		<dc:creator><![CDATA[Jimmy Petrus]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[New Releases]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[WebUI Studio]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/2011/05/02/webui-studio-2011-goes-gold/</guid>
		<description><![CDATA[The past few weeks were probably the busiest days in this first quarter as we are preparing for the huge 2011 volume release. Even sparing a few minutes to write blogs seems to be uneasy to the team due to super tight schedules. Nevertheless, our [...]]]></description>
				<content:encoded><![CDATA[<img width="466" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/install2_thumb1-604x350.png" class="attachment-post-thumbnail wp-post-image" alt="WebUI Studio 2011 New Installation Experiences" style="float:right; margin:0 0 10px 10px;" /><p>The past few weeks were probably the busiest days in this first quarter as we are preparing for the huge 2011 volume release. Even sparing a few minutes to write blogs seems to be uneasy to the team due to super tight schedules. Nevertheless, our diligent works are well paid off as we managed to (still) release on schedule.&nbsp; </p>
<p>The wait is over! The highly-anticipated WebUI Studio 2011 finally goes gold today, which includes the new data controls lineup that have been made available in several beta releases. It delivers a total of 30 new controls for ASP.NET, Silverlight and WPF development – another fantastic release! To see what the new WebUI Studio has in store for you, please head to <a href="http://www.intersoftpt.com/2011" target="_blank">What’s New in WebUI Studio 2011</a>.</p>
<p>Next, please refer to the following links for more details on the new release.</p>
<ul>
<li><a href="http://www.intersoftpt.com/Corporate/PressRelease.aspx?page=PressRelease&amp;PressID=2a279a7a-c505-4b6b-b960-398d2d12b6cb" target="_blank">Read 2011 Press Release</a>
<li><a href="http://www.clientui.com/NewInClientUI5" target="_blank">What’s New in ClientUI 5</a>
<li><a href="http://www.clientui.com/showcase" target="_blank">See the new ClientUI Showcase</a>
<li><a href="http://www.webuistudio.com/try" target="_blank">Download WebUI Studio 2011</a></li>
</ul>
<p align="left">In addition, major sites such as <a href="http://www.intersoftpt.com/Support" target="_blank">Intersoft Support Site</a>, <a href="http://www.intersoftpt.com/Support/ClientUI/Documentation" target="_blank">Online Documentation</a>&nbsp;&nbsp; and <a href="http://live.intersoftpt.com/" target="_blank">ASP.NET live demos</a> have been updated as well to reflect the new releases. Be sure to check out the updated ClientUI demos too where we have added around 80&nbsp;&nbsp; business-inspiring samples with amazing user experiences. To try the demos now, jump to <a href="http://live.clientui.com/" target="_blank">ClientUI live demos</a>.</p>
<p>In this blog post, I will share a quick recap on the key highlight of the new release. In addition to many new exciting stuff as you can read in the <a href="http://www.intersoftpt.com/2011" target="_blank">2011 Tour</a> page, the new 2011 release is highly focused in improving the overall user experiences in an end-to-end approach – from the installation and getting started to licensing and deployment.</p>
<p>To that end, WebUI Studio 2011 now ships with a new installation experience that integrates with the operating system’s look and feel. So if you’re using Windows 7 with Aero-glass enabled, you will see the new WebUI Studio setup to use the same glass theme. The overall user interface has also been redesigned for simplicity and elegancy. To stimulate your appetite, let’s see some of the new installation shots below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/05/install2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="WebUI Studio 2011 New Installation Experiences" border="0" alt="WebUI Studio 2011 New Installation Experiences" src="http://intersoftpt.files.wordpress.com/2011/05/install2_thumb.png" width="642" height="487"></a></p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/05/install5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="WebUI Studio 2011 New Installation Experiences" border="0" alt="WebUI Studio 2011 New Installation Experiences" src="http://intersoftpt.files.wordpress.com/2011/05/install5_thumb.png" width="642" height="478"></a></p>
<p>However, the new installation experience isn’t just about the glassy user interface. More importantly, the new WebUI Studio setup has been further simplified to require only a few clicks to complete a common installation – reducing from 8 to 4 in the total number of clicks. In this “automatic” setup mode, the installer detects your computer configuration and smartly decides the best settings to apply to your installation session. For instances, if you have Visual Studio 2011 installed, then all the samples and help files for Visual Studio 2010 will be automatically chosen.</p>
<p>Of course, you can still customize the installation the way you accustomed to, by checking the customize checkbox in the initial screen before hitting the Next button, see the screenshot below for a close-up.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/05/install1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="WebUI Studio 2011 Setup Customization" border="0" alt="WebUI Studio 2011 Setup Customization" src="http://intersoftpt.files.wordpress.com/2011/05/install1_thumb.png" width="642" height="469"></a></p>
<p>All in all, WebUI Studio 2011 is our best release yet. It ships with a dramatically improved user experience, 12 new time-saving business project templates, native DevForce integration, and delivers over 30 new and essential business controls to the already comprehensive portfolio – positioning it as the developer’s top choice for all .NET application development needs.</p>
<p>Definitely there are so much exciting stuff to share in this new release, but I decided to not polluting this blog post with product-specific and new samples coverage. I’ll surely recap those topics in my next post. For now, <a href="http://www.webuistudio.com/try" target="_blank">download</a> the new WebUI Studio if you haven’t done so.</p>
<p>Last but not least, we hope you enjoy the new release as much as we enjoy building it!</p>
<p>All the best,<br />Jimmy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/05/webui-studio-2011-goes-gold/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>UXGridView RC Adds MVVM Data Exporting, Multi Aggregates, Selectors, and more</title>
		<link>http://blog.intersoftsolutions.com/2011/03/uxgridview-rc-adds-mvvm-data-exporting-multi-aggregates-selectors-and-more/</link>
		<comments>http://blog.intersoftsolutions.com/2011/03/uxgridview-rc-adds-mvvm-data-exporting-multi-aggregates-selectors-and-more/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 03:16:32 +0000</pubDate>
		<dc:creator><![CDATA[Jimmy Petrus]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Release Candidate]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[UXGridView]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/2011/03/22/uxgridview-rc-adds-mvvm-data-exporting-multi-aggregates-selectors-and-more/</guid>
		<description><![CDATA[After going through a series of technology preview releases,  UXGridView is finally topping off with the complete feature sets. Today, I’m excited to announce the immediate availability of UXGridView Release Candidate. In case you missed the stories, UXGridView is Intersoft’s brand-new data grid built to [...]]]></description>
				<content:encoded><![CDATA[<img width="454" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/image_thumb111-588x350.png" class="attachment-post-thumbnail wp-post-image" alt="Exporting user interface" style="float:right; margin:0 0 10px 10px;" /><p>After going through a series of <a href="http://intersoftpt.wordpress.com/tag/uxgridview/">technology preview releases</a>,  UXGridView is finally topping off with the complete feature sets. Today, I’m excited to announce the immediate availability of UXGridView Release Candidate.</p>
<p>In case you missed the stories, UXGridView is Intersoft’s brand-new data grid built to handle the most demanding line-of-business development requirements – from server-side paging and filtering support, data editing and validation, batch update to data aggregates and data exporting. Each feature is thoughtfully engineered to work best with MVVM pattern implementation. UXGridView runs on both Silverlight and WPF with single identical markups. Learn more about UXGridView <a href="http://intersoftpt.wordpress.com/tag/uxgridview/">here</a>.</p>
<p>In this post, I will share the key highlights of the new features implemented in the UXGridView RC. As defined in the roadmap that I posted in my <a href="http://intersoftpt.wordpress.com/2011/02/07/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/">blog post</a>, the RC milestone will include advanced data-centric features such as data exporting, row virtualization improvements, multi aggregates, custom grouping logics, and a bunch of style selectors and template selectors.</p>
<h2>Data Exporting the MVVM-way</h2>
<p>In the previous CTPs, you have learned how UXGridView handles real-world data access scenarios like <a href="http://intersoftpt.wordpress.com/2011/02/07/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/">paging</a>, <a href="http://intersoftpt.wordpress.com/2011/02/09/uxgridview-part-ii-data-access-the-mvvm-way-with-querydescriptor/">filtering</a>, <a href="http://intersoftpt.wordpress.com/2011/02/21/uxgridview-ctp2-mvvm-data-editing/">data validation and editing</a> – all implemented entirely with MVVM design pattern. In this RC release, UXGridView adds data exporting capability which you can implement using the solid MVVM pattern. Unlike other grids, the data exporting in UXGridView supports both server-side and client-side mode. The most advanced mode is the server-side data exporting which allows you to export all rows in the data source even though the UXGridView is paged.</p>
<p>Just because UXGridView supports displaying millions of rows, that doesn’t mean you should. In real-world scenarios, most users browse and look only for a piece of data at a time. So in most cases, you would enable the server-side paging in the UXGridView so it loads only a subset of data at a time. For instances, a Grid with the page size set to 20 will load only 20 rows per page. The data exporting, quite the opposite, requires all data to be fetched before the exporting can execute. That’s one of the key challenges that we managed to address in UXGridView, enabling data exporting to work in harmony with the server paging and other features using the MVVM pattern implementation.</p>
<p>To handle the server-side data operation consistently, we built the data exporting upon the same key component that powers the server paging and filtering, the QueryDescriptor. Perhaps you still recall, QueryDescriptor encapsulates the query definitions which consisted of FilterDescriptors, SortDescriptors and PageDescriptor. That’s just perfect because we can simply use the existing instance of the QueryDescriptor in the ViewModel, and perform re-query that doesn’t include the paging descriptor. If you need a refresh on QueryDescriptor, please head to <a href="http://intersoftpt.wordpress.com/2011/02/09/uxgridview-part-ii-data-access-the-mvvm-way-with-querydescriptor/">Data-access the MVVM-way</a>.</p>
<p>The best way to handle the data exporting using MVVM is to implement a DelegateCommand in the ViewModel and bind it to the <strong>ExportCommand</strong>, a new command property introduced in the RC release. In the Executed handler, you call a server query that returns complete data, and finally pass it to the collection in the ViewModel which is bound to the <strong>ExportItems</strong> property of UXGridView. Take a look at the following code snippet to learn how it’s done.</p><pre class="crayon-plain-tag">public class ServerExportingViewModel : ServerSideOperationViewModel
{
    public ServerExportingViewModel()
        : base()
    {
        this.CanUserExport = true;
        this.ExportCommand = new DelegateCommand(ExecuteExportCommand);
    }

    public void ExecuteExportCommand(object parameter)
    {
        QueryDescriptor <strong>exportQueryDescriptor</strong> =
                     this.QueryDescriptor.<strong>CreateCopy</strong>(true, true, false);

        this.ProductsSource.GetData
        (
            <strong>exportQueryDescriptor</strong>,
            (products) =&gt;
            {
                PagedCollectionView current =
                                   this.Products as PagedCollectionView;
                PagedCollectionView exportedItems =
                                   new PagedCollectionView(products);                    

                exportedItems.<strong>CopyDefinitionsFrom</strong>(current, true,
                                   false, false, false);

                this.ExportItems = <strong>exportedItems</strong>;
            },
            (totalItemCount) =&gt;
            {

            },
            (error) =&gt;
            {

            }
        );
    }
}</pre><p>Quite simple and straightforward, isn’t it? Also notice that the QueryDescriptor now has a <strong>CreateCopy</strong>, a new time-saving method that returns a clone based on the given source and options. The most important point here is the flexibility that UXGridView offered since it gives you full control over how the data retrieval is done in the ViewModel.</p>
<h2>4 Built-in Exporting Data Format</h2>
<p>UXGridView allows you to export the data source into four data format – not only one, or two. Users have the choice to export data to HTML, Excel, CSV or just a plain text file. From the user interface perspective, all you need to do is to set the <strong>CanUserExport</strong> property to true. A tiny, stylish dropdown button will then appear in the status bar, next to the data pager. The available data format is listed in the menu when the dropdown button is clicked, such as shown below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Exporting user interface" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb11.png" border="0" alt="Exporting user interface" width="588" height="482" /></a></p>
<p>Although the user interface has been well predefined, they are fully customized thanks to the loosely-coupled UI architecture. For instances, you can change the dropdown button to a more stylish callout, or just a plain command button if you preferred.</p>
<p>When the data exporting process completes, you’ll be prompted to save the results to your local computer. The following illustration shows the Excel spreadsheet that contains the exported results.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image12.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="UXGridView data exported to Excel" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb12.png" border="0" alt="UXGridView data exported to Excel" width="642" height="401" /></a></p>
<p>UXGridView also offers a number of exporting options such as whether to include column footers, column headers or the group footers in the exported results. For even more fine-grained HTML results, you can customize the style of each generated row and cell output through the <strong>ExportCssStyleSelector</strong>, another big plus for MVVM implementation!</p>
<h2>Style and Template Selectors</h2>
<p>UXGridView implements a wealth of style selectors and template selectors, giving the freedom you need to create rich data presentation the way you want. The selector pattern is a first-class MVVM citizen that enables you to write custom logics in a separate class instead of in the view level. You get two benefits immediately: greater reusability and cleaner implementation due to the view/code separation.</p>
<p>One of the most common scenarios, for instances, is to show discontinued products in a different background color, allowing users to quickly distinguish the useful information they need to work with. The following illustration shows the results of a <strong>RowStyleSelector</strong> implementation.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image13.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="RowStyleSelector in UXGridView" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb13.png" border="0" alt="RowStyleSelector in UXGridView" width="642" height="213" /></a></p>
<p>Another common scenario is to display different information based on specific conditions. For instances, showing a Reorder hyperlink button in the case that the products were out-of-stock. This can be done through an implementation of <strong>CellTemplateSelector</strong>, see the results below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image14.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="CellTemplateSelector in UXGridView" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb14.png" border="0" alt="CellTemplateSelector in UXGridView" width="642" height="213" /></a></p>
<p>Or how about a more advanced scenario like applying a different background brush in the row header of each different group level? That’s also possible to be done through an implementation of <strong>RowGroupHeaderStyleSelector</strong>.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image15.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="RowGroupHeaderStyleSelector in UXGridView" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb15.png" border="0" alt="RowGroupHeaderStyleSelector in UXGridView" width="519" height="482" /></a></p>
<p>I hope the above illustrations give you a clear idea what the style and template selectors are all about.</p>
<p>To be more exact, UXGridView provides 13 selectors for the row, cell, column header, column footer and group elements. The complete list is as follows:</p>
<ul>
<li>Row Style Selector</li>
<li>Row Template Selector</li>
<li>Cell Style Selector</li>
<li>Cell Template Selector</li>
<li>Column Header Style Selector</li>
<li>Column Header Template Selector</li>
<li>Column Footer Style</li>
<li>Column Footer Cell Style</li>
<li>Column Footer Cell Template</li>
<li>Row Details Template Selector</li>
<li>Row Group Header Style Selector</li>
<li>Row Group Footer Style</li>
<li>Row Group Footer Cell Style</li>
</ul>
<p>Note that the above selectors have not included the selectors of other elements such as editing and exporting.</p>
<h2>Multi Aggregates</h2>
<p>Another nice addition in the RC release is the support for multiple aggregates in both the column footer and group footer. It will be definitely useful for line-of-business applications, particularly in financial extensive applications. So here the feature is when you need it.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image16.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Multi aggregates support in UXGridView" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb16.png" border="0" alt="Multi aggregates support in UXGridView" width="642" height="328" /></a></p>
<h2>Custom Grouping</h2>
<p>The RC release adds more powerful features allowing developers to fine-tuning the grouping results in UXGridView. While most competing grids used locked-down approaches, UXGridView is quite the opposite. You can now define your own custom groups by writing custom logics in a separate class which is then instantiated in the XAML and assigned to the <strong>GroupConverter</strong> property of the <strong>UXGridViewGroupDescriptor</strong>.</p>
<p>The sample in the following illustration groups the products data based on a range of CategoryID values.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image17.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Grouping with custom logic" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb17.png" border="0" alt="Grouping with custom logic" width="642" height="322" /></a></p>
<p>Another popular scenario that can be achieved using the group converter is the value list capability where more meaningful information can be displayed in the group header instead of useless IDs, for instances, displaying the actual name of a category instead of the ID such as shown below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image18.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Grouping with value list" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb18.png" border="0" alt="Grouping with value list" width="642" height="268" /></a></p>
<h2>Read-only Binding</h2>
<p>Last but not least, among the top requested features is the read-only binding which we managed to ship in the RC release. With the read-only binding expression, you can write a custom logic that determines when a particular row or cell should be read-only (not editable).</p>
<p>UXGridView provides read-only binding at both the row and cell level. The read-only binding expression at row level, if returns true when evaluated, will supersede the read-only binding expression at the cell level. This means that if the read-only binding is specified at the row level and returns a true value, the entire row will no longer editable regardless of the value of the binding expression specified in the cells.</p>
<p>For  examples, consider a scenario where discontinued products should be not editable. In such case, the <strong>IsReadOnlyBinding </strong>of the UXGridView is bound to the <strong>Discontinued </strong>property of the product entity. To prevent users to accidentally uncheck the Discontinued value, the same property can be bind to the <strong>IsReadOnlyBinding</strong> of the <strong>UXGridViewColumn</strong>. The binding expression at the UXGridView level applies to the rows, while the one at the UXGridViewColumn applies to the cells.</p>
<p>Luckily, the RC release shipped with an example based on the above scenarios. The following illustration shows the discontinued product which can no longer be edited.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/03/image19.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="IsReadOnlyBinding in UXGridView" src="http://intersoftpt.files.wordpress.com/2011/03/image_thumb19.png" border="0" alt="IsReadOnlyBinding in UXGridView" width="642" height="402" /></a></p>
<h2>WCF RIA SP1 Support</h2>
<p>The UXGridView, UXDataPager and UXDataFilter controls in the RC release have been updated to support the recently released WCF RIA SP1. Most notable is the paging support for new data model returned in the children of the navigator properties. The data controls are also backward compatible with the previous WCF RIA.</p>
<h2>Download the RC Bits</h2>
<p>UXGridView Release Candidate includes complete feature sets and near-RTM quality, which means that you can start using UXGridView to build amazingly rich data-centric applications for the Silverlight and WPF platforms. As you have learned through the series of <a href="http://intersoftpt.wordpress.com/tag/uxgridview/">technology preview releases</a>, each UXGridView feature is uniquely engineered to work best for many MVVM scenarios, making it the industry’s first and most advanced MVVM-ready data grid for the Silverlight and WPF development.</p>
<p>To summarize, the RC release adds a host of exciting new and essential features such as data exporting, style and template selectors, multi aggregates, and much more. We’ve also added many new samples that demonstrate real-world development scenarios such as using different sort member for value list and displaying an image in the cells. The RTM version will add a couple “extra” features, so stay tuned for the next announcement!</p>
<p>Click <a href="http://www.intersoftpt.com/ClientUI/Intersoft.ClientUI.Data.RC.zip">here</a> to download the RC bits and test-drive the new UXGridView features today. The download package includes latest ClientUI assemblies as well as updated and new samples for both Silverlight and WPF platforms.</p>
<p>Please note that the UXGridView RC is the last public community release. The next milestone would be the UXGridView RTM release together with dozens of new members in ClientUI 5. For now, we’d love to hear what you think about the new features and enhancements available in the RC. Please post your feedback, questions or issues to our <a href="http://www.intersoftpt.com/Community/ClientUI">community forum</a>.</p>
<p>Best,<br />
Jimmy<br />
Chief Software Architect</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/03/uxgridview-rc-adds-mvvm-data-exporting-multi-aggregates-selectors-and-more/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UXGridView Part 4: Data Editing the MVVM-way with Commands</title>
		<link>http://blog.intersoftsolutions.com/2011/02/uxgridview-part-4-data-editing-the-mvvm-way-with-commands/</link>
		<comments>http://blog.intersoftsolutions.com/2011/02/uxgridview-part-4-data-editing-the-mvvm-way-with-commands/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 15:33:23 +0000</pubDate>
		<dc:creator><![CDATA[ansoesil]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[Command Framework]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Editing]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[UXGridView]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://intersoftpt.wordpress.com/?p=2147</guid>
		<description><![CDATA[In the previous post, Jimmy announced the latest CTP for UXGridView with the CUD (Create, Update and Delete) capability. In this post, I will provide the step-by-step instructions to work with these new features. Enabling the CUD capability First of all, let’s enable the CUD [...]]]></description>
				<content:encoded><![CDATA[<p>In the previous <a href="http://intersoftpt.wordpress.com/2011/02/21/uxgridview-ctp2-mvvm-data-editing/">post</a>, Jimmy announced the latest CTP for UXGridView with the CUD (Create, Update and Delete) capability. In this post, I will provide the step-by-step instructions to work with these new features.</p>
<h2>Enabling the CUD capability </h2>
<p>First of all, let’s enable the CUD (Create, Update, Delete) capability in UXGridView. You can enable these features by simply setting the <strong>CanUserAdd</strong>, <strong>CanUserEdit</strong>, and <strong>CanUserDelete</strong> properties to <strong>True</strong>.</p>
<p>  </p><pre class="crayon-plain-tag">&lt;Intersoft:UXGridView CanUserAdd=&quot;True&quot; 
                      CanUserDelete=&quot;True&quot; 
                      CanUserEdit=&quot;True&quot;/&gt;</pre><p></p>
<p>Notice that there will be a NewRow element at the top of the Grid when you set the <strong>CanUserAdd</strong> property to <strong>True</strong>.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/gridedit1.png"><img class="alignnone size-full wp-image-2148" title="gridedit1" alt="" src="http://intersoftpt.files.wordpress.com/2011/02/gridedit1.png?w=640&amp;h=179" width="640" height="179" /></a></p>
<p>Furthermore, you can also delete or edit the selected item(s) when the <strong>CanUserEdit</strong> or <strong>CanUserDelete</strong> properties are set to <strong>True</strong>.</p>
<p>To edit a row you can use either mouse or keyboard. The following list shows you some configuration that you can change to edit a record using mouse / keyboard.</p>
<p>To edit a row using mouse:</p>
<ul>
<li>EditMouseGesture
<ul>
<li>Single Click
<p>Directly begin edit to the current selected cell.</p>
</li>
<li>Second Click
<p>Begin edit to the current selected cell after the row is selected.</p>
</li>
<li>Double Click
<p>Directly begin edit to the current selected cell when double click fires.</p>
</li>
</ul>
</li>
</ul>
<p>To edit a row using keyboard:</p>
<ul>
<li>EditKeyGEditKeyGesture
<ul>
<li>F2
<p>Directly begin edit to the current selected cell using F2 key.</p>
</li>
<li>Any Keystroke
<p>Directly begin edit to the current selected cell from any key stroke.</p>
</li>
</ul>
</li>
<li>EnterKeyAction
<ul>
<li>EnterEdit
<p>Directly begin edit to the current selected cell using Enter key.</p>
</li>
<li>MoveToNextRow
<p>Move to next row (does not edit the cell).</p>
</li>
</ul>
</li>
<li>EditEnterKeyAction
<ul>
<li>CommitAndMovetoNextRow
<p>Commit the changes at current edited row and move to the next row.</p>
</li>
<li>ExitEdit
<p>Exit the cell edit of the current edited cell.</p>
</li>
<li>MoveToNextEditableCell
<p>Move to next editable cell. (Will move to next row&#8217;s cell when it reach the end of the row)</p>
</li>
</ul>
</li>
</ul>
<p>Beside these options, you can also use several common keystroke as listed below during editing.</p>
<ul>
<li>Tab / Shift + Tab
<p>To move to next / previous editable cell.</p>
</li>
<li>Shift + Enter
<p>Commit the changes at current edited row and stay in the current selection</p>
</li>
<li>Delete
<p>Delete the current selected record(s)</p>
</li>
<li>Escape
<p>Cancel current changes. If currently you are in an active edit cell, it will cancel the cell changes. If you are in current active edit row, it will cancel the row changes.</p>
</li>
</ul>
<h2>Handling the CUD operation</h2>
<p>To handle the CUD operation, UXGridView provides several command-related properties that you can specify to execute a method depending on the actions. These command- properties are listed as follows:</p>
<ul>
<li>PrepareNewRowCommand
<p>Called when you begin edit at the NewRow element. Used to initialized the NewRowItem.</p>
</li>
<li>ValidateRowCommand
<p>Validate the row before the row is committed.</p>
</li>
<li>InsertRowCommand
<p>Called when a new row is committed. You can directly save the changes and/or refresh the UXGridView if necessary.</p>
</li>
<li>UpdateCellCommand
<p>Called when the cell is committed.</p>
</li>
<li>UpdateRowCommand
<p>Called when an existing row is committed. You can directly save the changes and/or refresh the UXGridView if necessary.</p>
</li>
<li>DeleteRowCommand
<p>Called when a row is deleted. You can directly save the changes and / or refresh the UXGridView if necessary.</p>
</li>
<li>RejectRowCommand
<p>Called when the changes in the row is cancelled. This command is used to reject the changes in the data entity if required (such as in DevForce).</p>
</li>
<li>SaveChangesCommand
<p>Called when the save changes command is executed. You handle this command to save all the pending changes made in the UXGridView.</p>
</li>
<li>RejectChangesCommand
<p>Called when the reject changes command is executed. You handle this command to reject all the pending changes made in the UXGridView.</p>
</li>
</ul>
<p>These command properties can be bound to your ViewModel using delegate command. Next, I will show you how to bind these commands along with some important properties that are necessary for the CUD operation.</p>
<h3>Binding the CUD Commands to UXGridView using MVVM Pattern</h3>
<p>Let’s create the ViewModel for our example. First, define the delegate commands and the required selection properties, then instantiate them in the constructor.</p>
<p></p><pre class="crayon-plain-tag">using System.Collections;
using Intersoft.Client.Framework;
using Intersoft.Client.Framework.Input;
using Intersoft.Client.UI.Data;
using UXGridView.Samples.ModelServices;

namespace UXGridView.Samples.ViewModels
{
    public class ServerEditingViewModel : ServerSideOperationViewModel
    {        
        public ServerEditingViewModel()
            : base()
        {            
            this.DeleteRowCommand = 
                new DelegateCommand(ExecuteDeleteRow);
            this.InsertRowCommand = 
                new DelegateCommand(ExecuteInsertRow);
            this.PrepareNewRowCommand = 
                new DelegateCommand(ExecutePrepareNewRow);
            this.UpdateCellCommand = 
                new DelegateCommand(ExecuteUpdateCell);
            this.UpdateRowCommand = 
                new DelegateCommand(ExecuteUpdateRow);
            this.RejectRowCommand = 
                new DelegateCommand(ExecuteRejectRow);
            this.RejectChangesCommand = 
                new DelegateCommand(ExecuteRejectChanges);
            this.SaveChangesCommand = 
                new DelegateCommand(ExecuteSaveChanges);
            this.ValidateRowCommand = 
                new DelegateCommand(ExecuteValidateRow);
        }

        #region Fields

        private bool _hasChanges;
        private bool _isRefreshed;        
        private object _newProduct;
        private object _selectedProduct;
        private IEnumerable _selectedProducts;

        #endregion

        #region EditableProductsSource

        private IEditableDataRepository EditableProductsSource
        {
            get
            {
                return this.ProductsSource as IEditableDataRepository;
            }
        }

        #endregion

        #region Selection and Editing Properties

        public object NewProduct
        {
            get { return this._newProduct; }
            set
            {
                if (this._newProduct != value)
                {
                    this._newProduct = value;
                    this.OnPropertyChanged(&quot;NewProduct&quot;);
                }
            }
        }

        public object SelectedProduct
        {
            get { return this._selectedProduct; }
            set
            {
                if (this._selectedProduct != value)
                {
                    this._selectedProduct = value;
                    this.OnPropertyChanged(&quot;SelectedProduct&quot;);
                }
            }
        }

        public IEnumerable SelectedProducts
        {
            get { return this._selectedProducts; }
            set
            {
                if (this._selectedProducts != value)
                {
                    this._selectedProducts = value;
                    this.OnPropertyChanged(&quot;SelectedProducts&quot;);
                }
            }
        }

        public bool IsRefreshed
        {
            get { return this._isRefreshed; }
            set
            {
                if (this._isRefreshed != value)
                {
                    this._isRefreshed = value;
                    this.OnPropertyChanged(&quot;IsRefreshed&quot;);
                }
            }
        }

        public bool HasChanges
        {
            get { return _hasChanges; }
            set
            {
                if (_hasChanges != value)
                {
                    _hasChanges = value;
                    OnPropertyChanged(&quot;HasChanges&quot;);
                }
            }
        }

        #endregion

        #region Commands

        public DelegateCommand DeleteRowCommand { get; set; }
        public DelegateCommand InsertRowCommand { get; set; }
        public DelegateCommand PrepareNewRowCommand { get; set; }
        public DelegateCommand UpdateCellCommand { get; set; }
        public DelegateCommand UpdateRowCommand { get; set; }
        public DelegateCommand RejectRowCommand { get; set; }
        public DelegateCommand RejectChangesCommand { get; set; }
        public DelegateCommand SaveChangesCommand { get; set; }
        public DelegateCommand ValidateRowCommand { get; set; }

        #endregion
    }
}</pre><p></p>
<p>Next, we will bind these commands to the UXGridView.</p>
<p></p><pre class="crayon-plain-tag">&lt;Intersoft:UXPage 
	xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
	xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot; 
	xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
	xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
	mc:Ignorable=&quot;d&quot;
	xmlns:Intersoft=&quot;http://intersoft.clientui.com/schemas&quot;
          xmlns:IntersoftModel=&quot;clr-namespace:Intersoft.Client.Data.Component<br />          Model.CollectionViews;assembly=Intersoft.Client.Data.ComponentModel&quot;
          xmlns:ViewModels=&quot;clr-namespace:UXGridView.Samples.ViewModels&quot;
	x:Class=&quot;UXGridView.Samples.Views.ServerSideOperation.Editing&quot; 
	Title=&quot;Editing Page&quot;
	d:DesignWidth=&quot;1024&quot; d:DesignHeight=&quot;800&quot;&gt;
	
	&lt;Grid x:Name=&quot;LayoutRoot&quot;&gt;
            &lt;Grid.DataContext&gt;
               &lt;ViewModels:ServerEditingViewModel/&gt;
            &lt;/Grid.DataContext&gt;<br />
        &lt;Intersoft:DockPanel&gt;

            &lt;Intersoft:UXGridView 
                AutoGenerateColumns=&quot;False&quot; QueryOperation=&quot;Server&quot;
                CanUserPage=&quot;True&quot; PageSize=&quot;20&quot;
                RowHeaderVisibility=&quot;Visible&quot;
                IsBusy=&quot;{Binding IsBusy, Mode=TwoWay}&quot;
                IsRefreshed=&quot;{Binding IsRefreshed, Mode=TwoWay}&quot;
                ItemsSource=&quot;{Binding Products}&quot; 
                SortDescriptors=&quot;{Binding QueryDescriptor.SortDescriptors, Mode=TwoWay}&quot;
                PageDescriptor=&quot;{Binding QueryDescriptor.PageDescriptor}&quot;
                GroupFootersVisibility=&quot;Visible&quot; GroupByBoxVisibility=&quot;Visible&quot;
                CanUserAdd=&quot;true&quot; 
                CanUserDelete=&quot;true&quot;
                CanUserEdit=&quot;true&quot;
                NewItem=&quot;{Binding NewProduct, Mode=TwoWay}&quot;
                SelectedItem=&quot;{Binding SelectedProduct, Mode=TwoWay}&quot;
                ValidateRowCommand=&quot;{Binding ValidateRowCommand}&quot;
                InsertRowCommand=&quot;{Binding InsertRowCommand}&quot;
                DeleteRowCommand=&quot;{Binding DeleteRowCommand}&quot;
                PrepareNewRowCommand=&quot;{Binding PrepareNewRowCommand}&quot;
                UpdateCellCommand=&quot;{Binding UpdateCellCommand}&quot;
                UpdateRowCommand=&quot;{Binding UpdateRowCommand}&quot;
                SaveChangesCommand=&quot;{Binding SaveChangesCommand}&quot;
                RejectRowCommand=&quot;{Binding RejectRowCommand}&quot;
                RejectChangesCommand=&quot;{Binding RejectChangesCommand}&quot;
                HasChanges=&quot;{Binding HasChanges}&quot;&gt;

                &lt;Intersoft:UXGridView.GroupDescriptors&gt;
                    &lt;Intersoft:UXGridViewGroupDescriptor PropertyName=&quot;CategoryID&quot;/&gt;
                &lt;/Intersoft:UXGridView.GroupDescriptors&gt;

                &lt;Intersoft:UXGridView.Columns&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Category ID&quot; 
                        Binding=&quot;{Binding CategoryID}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Product ID&quot; 
                        Binding=&quot;{Binding ProductID}&quot; 
                        IsReadOnly=&quot;True&quot; 
                        Aggregate=&quot;Count&quot; 
                        FooterFormatString=&quot;Count = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Product Name&quot; 
                        Binding=&quot;{Binding ProductName}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Units In Stock&quot; 
                        Binding=&quot;{Binding UnitsInStock}&quot; 
                        Aggregate=&quot;Max&quot; FooterFormatString=&quot;Max = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Unit Price&quot; 
                        Binding=&quot;{Binding UnitPrice}&quot; 
                        Aggregate=&quot;Avg&quot; 
                        FooterFormatString=&quot;Avg = {0:n2}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Units On Order&quot; 
                        Binding=&quot;{Binding UnitsOnOrder}&quot; 
                        Aggregate=&quot;Min&quot; 
                        FooterFormatString=&quot;Min = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Quantity Per Unit&quot; 
                        Binding=&quot;{Binding QuantityPerUnit}&quot;/&gt;
                &lt;/Intersoft:UXGridView.Columns&gt;

            &lt;/Intersoft:UXGridView&gt;
            
        &lt;/Intersoft:DockPanel&gt;
    &lt;/Grid&gt;
&lt;/Intersoft:UXPage&gt;</pre><p></p>
<h3>Handling the CUD Operation in ViewModel Using DevForce</h3>
<p>After the commands are bound to the ViewModel, it is up to you how you want to handle the CUD operation. </p>
<p>If you prefer to automatically update the records after each CUD operation, you can do that in the InsertRowCommand, UpdateRowCommand and DeleteRowCommand respectively, and probably followed up by RefreshCommand to refresh the data. However, if you prefer a batch update, you can notify the UXGridView by setting the HasChanges property to True, and later call the SaveChanges method to perform the batch update.</p>
<p>This batch update capability might not be available in all data providers such as WCF RIA. When you enable server query in WCF RIA such as paging, sorting, and filtering; you always get a new fresh data from the database regardless of the changes in the client. This behavior is due to the WCF RIA not supporting client-side caching. In this case, you might want to do automatic update and/or refresh after each CUD operation. There are samples that show how to do this in our CTP package.</p>
<p>Next, I will show you how to handle the CUD Operation in the ViewModel. To save time, I will only cover the one using DevForce which allows you to enable batch update.</p>
<p>Since the sample used <strong>ProductsRepository</strong> to encapsulate all data operation, I&#8217;ll show you first what I&#8217;m doing in the <strong>ProductsRepository</strong>.</p>
<p></p><pre class="crayon-plain-tag">using System;
using System.Collections;
using System.ComponentModel;
using IdeaBlade.EntityModel;
using IdeaBlade.Validation;
using Intersoft.Client.Data.ComponentModel;
using Intersoft.Client.Data.Provider.DevForce;
using UXGridView.Samples.Data.DevForce;

namespace UXGridView.Samples.ModelServices
{
    public class ProductsRepository : IEditableDataRepository
    {
        public ProductsRepository(NorthwindEntities entityManager)
        {
            this.Manager = entityManager;
        }

        private static IDataRepository _repository;

        public static IDataRepository Instance
        {
            get
            {
                return _repository ?? (_repository = CreateRepository());
            }
            set
            {
                _repository = value;
            }
        }

        private NorthwindEntities Manager { get; set; }

        public static IDataRepository CreateRepository()
        {
            return new ProductsRepository(EntityManager.Create());
        }

        public void GetData(Action&lt;IEnumerable&gt; onSuccess, <br />                            Action&lt;Exception&gt; onFail)
        {
            this.Manager.Products
                .ExecuteAsync(
                op =&gt;
                {
                    if (op.CompletedSuccessfully)
                    {
                        if (onSuccess != null)
                            onSuccess(op.Results);
                    }
                    else
                    {
                        if (onFail != null)
                        {
                            op.MarkErrorAsHandled();
                            onFail(op.Error);
                        }
                    }
                }
               );
        }

        public void GetData(QueryDescriptor queryDescriptor, 
            Action&lt;IEnumerable&gt; onSuccess, 
            Action&lt;int&gt; onItemCountRetrieved, 
            Action&lt;Exception&gt; onFail)
        {
            this.Manager.Products.OrderBy(p =&gt; p.ProductID).Parse(queryDescriptor)
                .ExecuteAsync(
                op =&gt;
                {
                    if (op.CompletedSuccessfully)
                    {
                        if (onSuccess != null)
                            onSuccess(op.Results);

                        if (onItemCountRetrieved != null)
                            onItemCountRetrieved(-1); // not applicable;
                    }
                    else
                    {
                        if (onFail != null)
                        {
                            op.MarkErrorAsHandled();
                            onFail(op.Error);
                        }
                    }
                }
               );
        }

        public void GetTotalItemCount
            (QueryDescriptor queryDescriptor, 
            Action&lt;int&gt; onSuccess)
        {
            var op = this.Manager.Products
                .Parse(queryDescriptor, false).AsScalarAsync().Count();
            op.Completed += (o, e) =&gt;
            {
                if (onSuccess != null)
                    onSuccess(e.Result);
            };
        }

        public void Insert(object entity)
        {            
            this.Manager.AddEntity(entity);
        }

        public void Delete(IList entities)
        {
            foreach (object o in entities)
            {
                this.Delete(o);
            }
        }

        public void Delete(object entity)
        {
            Product product = entity as Product;
            product.EntityAspect.Delete();            
        }

        public void RejectChanges()
        {
            this.Manager.RejectChanges();
        }

        public void SaveChanges(
            Action onSuccess, 
            Action&lt;Exception&gt; onError)
        {
            this.Manager.SaveChangesAsync
            (
                op =&gt;
                {
                    if (op.IsCompleted)
                    {
                        if (op.HasError)
                        {
                            // handle error
                            op.MarkErrorAsHandled();
                            onError(op.Error);
                        }
                        else
                        {
                            onSuccess();
                        }
                    }
                },
                null
            );
        }

        public object Create()
        {
            return this.Manager.CreateEntity&lt;Product&gt;();
        }

        public void Validate(object entity)
        {
            Product product = (Product)entity;

            product.EntityAspect.ValidationErrors.Clear();
            product.EntityAspect.VerifierEngine.Execute(product);

            if (product.CategoryID &lt; 1 || product.CategoryID &gt; 8)
                product.EntityAspect.ValidationErrors
                    .Add(new VerifierResult(
                        VerifierResultCode.Error, 
                        &quot;Specified CategoryID does not exist&quot;, 
                        new string[] { &quot;CategoryID&quot; }));

            if (product.UnitPrice &lt; 0)
                product.EntityAspect.ValidationErrors
                    .Add(new VerifierResult
                        (VerifierResultCode.Error, 
                        &quot;Unit Price can not be less than 0&quot;, 
                        new string[] { &quot;UnitPrice&quot; }));

            if (product.UnitsInStock &lt; 0)
                product.EntityAspect.ValidationErrors
                    .Add(new VerifierResult(
                        VerifierResultCode.Error, 
                        &quot;Units in Stock can not be less than 0&quot;,
                        new string[] { &quot;UnitsInStock&quot; }));

            if (product.UnitsOnOrder &lt; 0)
                product.EntityAspect.ValidationErrors
                    .Add(new VerifierResult(
                        VerifierResultCode.Error, 
                        &quot;Units on Order can not be less than 0&quot;,
                        new string[] { &quot;UnitsOnOrder&quot; }));
        }

        public void RejectChanges(object entity)
        {
            IRevertibleChangeTracking revertible = <br />                                     (IRevertibleChangeTracking)entity;
<br />            revertible.RejectChanges();
        }
    }
}</pre><p></p>
<p>Finally, let’s handle the CUD commands in our ViewModel.</p>
<h3>For Create Operation </h3>
<p></p><pre class="crayon-plain-tag">public void ExecuteInsertRow(object parameter)
{
    this.NewProduct = null;

    if (!this.IsBatchUpdate)
        this.SaveChanges();
    else
        this.HasChanges = true;
}

public void ExecutePrepareNewRow(object parameter)
{

    // It's possible to initialize the new row with default values
    // Example:
    // product.ProductName = &quot;New Product&quot;;

    this.NewProduct = this.EditableProductsSource.Create();
    this.EditableProductsSource.Insert(this.NewProduct);
}</pre><p></p>
<h3>For Update Operation </h3>
<p></p><pre class="crayon-plain-tag">public void ExecuteUpdateCell(object parameter)
{
    object[] updateCellParameters = (object[])parameter;
    object product = updateCellParameters.GetValue(0);
    string property = updateCellParameters.GetValue(1).ToString();

    // perform cell-level validation if required
}

public void ExecuteUpdateRow(object parameter)
{
    if (!this.IsBatchUpdate)
        this.SaveChanges();
    else
        this.HasChanges = true;
}</pre><p></p>
<h3>For Delete Operation </h3>
<p></p><pre class="crayon-plain-tag">public void ExecuteDeleteRow(object parameter)
{
    this.EditableProductsSource.Delete(parameter as IList);

    if (!this.IsBatchUpdate)
        this.SaveChanges();
    else
        this.HasChanges = true;
}</pre><p></p>
<h3>For Validation, Reject Row and Refresh Operation </h3>
<p></p><pre class="crayon-plain-tag">public void SaveChanges()
{
    this.IsBusy = true;

    this.EditableProductsSource.SaveChanges
    (
        () =&gt;
        {
            this.IsRefreshed = true;
            this.LoadProducts(); // refresh
            this.HasChanges = false;
            this.IsBusy = false;
        },
        exception =&gt;
        {
            this.IsBusy = false;

            MessagePresenter presenter = new MessagePresenter();
            presenter.ShowErrorMessage(&quot;An unexpected error has occurred: &quot; <br />                       + exception.Message);
        }
    );
}

public void ExecuteValidateRow(object parameter)
{
    this.EditableProductsSource.Validate(parameter);
}

public void ExecuteRejectRow(object parameter)
{
    if (parameter != null)
        this.EditableProductsSource.RejectChanges(parameter);

    this.NewProduct = null;
}</pre><p></p>
<h3>For Batch Operation </h3>
<p></p><pre class="crayon-plain-tag">public void ExecuteRejectChanges(object parameter)
{
    this.EditableProductsSource.RejectChanges();
    this.HasChanges = false;
}

public void ExecuteSaveChanges(object parameter)
{
    // if users click on the save changes while the new row is being edited,
    // presume the new row isn't intended
    if (this.NewProduct != null)
        this.EditableProductsSource.RejectChanges(this.NewProduct);

    this.SaveChanges();
}</pre><p></p>
<p>I hope this post gives you a comprehensive understanding on handling the CUD (Create, Update, Delete) operation in UXGridView using MVVM design pattern. In the next post, I will blog about customizing editing controls in UXGridView, for instance, customizing the editing control of certain columns to more advanced input controls such as UXDateTimePicker, UXNumericUpDown, UXSliderBar, and so forth.</p>
<p>If you have any questions regarding the CUD operation, please post some questions in our <a href="http://www.intersoftpt.com/Community/">community</a> website.</p>
<p>Regards,<br />
  <br />Andry</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/02/uxgridview-part-4-data-editing-the-mvvm-way-with-commands/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>UXGridView CTP2: MVVM Data Editing</title>
		<link>http://blog.intersoftsolutions.com/2011/02/uxgridview-ctp2-mvvm-data-editing/</link>
		<comments>http://blog.intersoftsolutions.com/2011/02/uxgridview-ctp2-mvvm-data-editing/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 19:13:55 +0000</pubDate>
		<dc:creator><![CDATA[Jimmy Petrus]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Editing]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[UXGridView]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/2011/02/21/uxgridview-ctp2-mvvm-data-editing/</guid>
		<description><![CDATA[Two weeks ago, we released the first CTP of our new data controls for Silverlight and WPF. The first CTP was focused on MVVM Grid architecture and server-based data access, as well as data operation such as paging and filtering. More information can be found [...]]]></description>
				<content:encoded><![CDATA[<img width="466" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/image_thumb43-604x350.png" class="attachment-post-thumbnail wp-post-image" alt="Intuitive row validation" style="float:right; margin:0 0 10px 10px;" /><p>Two weeks ago, we released the <a href="http://intersoftpt.wordpress.com/2011/02/07/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/" target="_blank">first CTP</a> of our new data controls for Silverlight and WPF. The first CTP was focused on MVVM Grid architecture and server-based data access, as well as data operation such as paging and filtering. More information can be found <a href="http://intersoftpt.wordpress.com/2011/02/09/uxgridview-part-ii-data-access-the-mvvm-way-with-querydescriptor/" target="_blank">here</a>.</p>
<p>Today, I’m excited to announce the availability of the second CTP of our data controls. Our milestone in this release is strongly focused on data validation and data editing that supports MVVM design pattern. The release also includes a number of great features like batch update support for DevForce data service, native ValueList support for display and edit mode, customizable editing controls, and a host of UI/X tweaking.</p>
<p>Click <a href="http://www.intersoftpt.com/ClientUI/Intersoft.ClientUI.Data.CTP2.zip" target="_blank">here</a> to download the CTP2, and read the details below to discover what’s new.</p>
<h2>Data Validation &amp; Editing with MVVM Pattern</h2>
<p>For decades, developers have to write a bunch of code to implement an editable grid, from wiring editing events to writing validation code in a number of places. That’s even true for the latest built-in Silverlight DataGrid, for instances, you should write code to perform data validation in the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.roweditended%28v=vs.95%29.aspx" target="_blank">RowEditEnded</a> event. This pattern of development, unfortunately, makes your code difficult to test and maintain. And it definitely violates the MVVM pattern as the event wiring requires a strong reference to the view elements.</p>
<p>Unlike other Silverlight grids, UXGridView supports MVVM-style data editing out-of-the-box. It allows you to write data validation and editing logic entirely in the ViewModel without trading-off the rich editing features in the grid. The benefits of using MVVM in data editing applications are obvious – you can easily reuse, test and extend the interactions logics in the ViewModel without affecting the view or data access layers.</p>
<p>With UXGridView, you don’t wire events in order to perform data validation. While we still provided routed events as a mean to work with the Grid using the classic MVP pattern, it’s unnecessary to wire any editing events to perform editing operations such as begin, commit or cancel edit. Implementing data validation and editing using MVVM pattern is simple and straightforward. First, you create the delegate commands for each editing command in the ViewModel, then bind the commands to the UXGridView through data binding declaration.</p>
<p>The following illustration shows a simple MVVM implementation of data validation and editing in UXGridView.</p>
<p>  </p><pre class="crayon-plain-tag"><strong>ViewModel:</strong>

 public DelegateCommand DeleteRowCommand { get; set; }
 public DelegateCommand InsertRowCommand { get; set; }
 public DelegateCommand UpdateRowCommand { get; set; }
 public DelegateCommand ValidateRowCommand { get; set; }

 public void ExecuteValidateRow(object parameter)
 {
      this.EditableProductsSource.Validate(parameter);
 }

public void ExecutePrepareNewRow(object parameter)
{
    this.NewProduct = this.EditableProductsSource.Create();
    this.EditableProductsSource.Insert(this.NewProduct);
}

public void ExecuteDeleteRow(object parameter)
{
    this.EditableProductsSource.Delete(parameter as IList);
}

 ...

<strong>XAML Page:</strong>

 &lt;Intersoft:UXGridView ItemsSource=&quot;{Binding Products}&quot; 
              CanUserAdd=&quot;True&quot; 
              CanUserDelete=&quot;True&quot;
              CanUserEdit=&quot;True&quot;
              SelectedItem=&quot;{Binding SelectedProduct, Mode=TwoWay}&quot;
              ValidateRowCommand=&quot;{Binding ValidateRowCommand}&quot;
              InsertRowCommand=&quot;{Binding InsertRowCommand}&quot;
              DeleteRowCommand=&quot;{Binding DeleteRowCommand}&quot;
              UpdateRowCommand=&quot;{Binding UpdateRowCommand}&quot; /&gt;</pre><p></p>
<p>As you can see from the above code snippet, the beautiful of the MVVM pattern is that you have full control over your business and interaction logic. For example, if you used a powerful data service like DevForce, you can simply delegate the call to a repository that automatically execute the validation to the given entity.</p>
<p>You really don’t need to worry about the change tracking, dirty state, or valid state – the UXGridView takes care of them automatically. For an instance, when the modified row contains validation errors, UXGridView will not allow you to commit the changes until you correct the error, or cancel the changes – see the screenshot below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Intuitive row validation" border="0" alt="Intuitive row validation" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb4.png" width="642" height="365" /></a></p>
<p>In addition to the solid MVVM-ready editing architecture, UXGridView also sports great looking interface, which includes a handy error message displayed in the status bar, as well as error notification in the row and row header.</p>
<h2>New Row &amp; Delete </h2>
<p>You asked for it, we deliver! The new UXGridView brings back the features you loved to use such as the “new row” interface for quick data adding, inline editing, and delete row support. While these features sound common in most ASP.NET grids, they aren’t in Silverlight, so we built one.</p>
<p>The &quot;new row” interface works pretty much similar to the ASP.NET version of our flagship WebGrid. You click on the new row bar to begin adding new rows. Keyboard arrow keys are also fully supported for navigating to the new row.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="New row interface" border="0" alt="New row interface" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb5.png" width="642" height="366" /></a></p>
<p>The other nice feature is the support for multiple selection and row delete. The multiple selection is enabled by default, so you can easily select multiple rows by using the combination of Ctrl and Shift keys. Once selected, press Delete to delete the selection.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Multiple selection" border="0" alt="Multiple selection" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb6.png" width="642" height="361" /></a></p>
<h2>Batch Update Support for DevForce</h2>
<p>If you noticed on the above screenshots close enough, chances are that you’ll spot two interesting buttons beside the pager control. Think you’ve seen these buttons before? Well, you must have seen it in the batch update feature we implemented in the ASP.NET version of our WebGrid.</p>
<p>If you haven’t heard much about batch update, it is a very powerful feature in data-aware applications which allows you to make multiple edits locally and submit them in a single round trip. Unfortunately, the batch update implementation in Silverlight is fairly challenging since the UXGridView control should not be tightly coupled to any data access strategy. This means that the batch update should be supported by the data service provider as well.</p>
<p>Luckily, DevForce from <a href="http://www.ideablade.com" target="_blank">IdeaBlade</a> includes full support for batch update, thanks to their client-side caching feature. The WCF RIA Services, on the other hands, has very limited support for batch update, you might notice the options to be disabled in several editing samples for RIA.</p>
<p>When the batch update feature is enabled, all changes you made in the UXGridView will be kept locally. Consequently, your implementation for the Insert, Update and Delete in the ViewModel is not required to call the Save method. This, and many other benefits, make batch update an ideal approach to your data intensive applications as data input becomes more responsive and faster with reduced server-client round trip.</p>
<p>The changes you made in the grid can be submitted to server in batch through the SaveChanges command; or rejected through the RejectChanges command. The UXGridView control provides default buttons in the status bar interface which execute these commands, see the illustration below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Batch update commands" border="0" alt="Batch update commands" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb7.png" width="642" height="368" /></a></p>
<p>The SaveChanges and RejectChanges commands will be automatically disabled when they cannot execute. For instances, when the grid is busy, or when the grid has no more changes. Again, this process is controlled from your ViewModel through the binding to the HasChanges property in UXGridView.</p>
<p>You can also explore a bunch of editing behaviors implemented in the UXGridView. In the DevForce samples, you can try to use inline or batch update mode via the Options panel, see below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Sample options" border="0" alt="Sample options" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb8.png" width="642" height="177" /></a></p>
<h2>Customizable Editing Controls</h2>
<p>Now that we’ve got MVVM-ready editing architecture covered, as well as the editing behaviors like the enter key action and edit mouse gesture, the CTP2 release also shipped with powerful editing architecture that you’ll definitely excited to see. </p>
<p>Unlike other grid controls that require you to write specific interface to properly work in editing mode, we introduced editing cell template that allows you to use any existing input controls as the editing control for that specific column.</p>
<p>One of my favorite features is the easy plug-in to use the advanced input controls we introduced in the previous release such as UXNumericUpDown, UXDateTimePicker, UXCurrencyEdit and UXSliderBar just to name a few. For an instance, the following code shows how to use the UXNumericUpDown control as the editing control for UnitsInStock column:</p>
<p></p><pre class="crayon-plain-tag">&lt;Intersoft:UXGridViewTextColumn Header=&quot;Units In Stock&quot;
                                 Binding=&quot;{Binding UnitsInStock}&quot;&gt;
     &lt;Intersoft:UXGridViewTextColumn.CellEditingTemplate&gt;
         &lt;DataTemplate&gt;
             &lt;Intersoft:UXNumericUpDown Maximum=&quot;9999&quot; 
                        Value=&quot;{Binding UnitsInStock, Mode=TwoWay}&quot;/&gt;
         &lt;/DataTemplate&gt;
     &lt;/Intersoft:UXGridViewTextColumn.CellEditingTemplate&gt;
 &lt;/Intersoft:UXGridViewTextColumn&gt;</pre><p></p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Using UXNumericUpDown as editing control" border="0" alt="Using UXNumericUpDown as editing control" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb9.png" width="642" height="38" /></a></p>
<p>You can also use a more unique, non-textbox input control such as UXSliderBar, by simply defining the control in the CellEditingTemplate similar to the above example.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Using UXSliderBar as editing control" border="0" alt="Using UXSliderBar as editing control" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb10.png" width="642" height="34" /></a></p>
<p>The release also includes many other exciting features such as native ValueList support on both cell and editing mode, column template, and editing template selector. More on these in the next post.</p>
<h2>Download the CTP2 Bits</h2>
<p>Click <a href="http://www.intersoftpt.com/ClientUI/Intersoft.ClientUI.Data.CTP2.zip" target="_blank">here</a> to download the CTP2 and test-drive the new UXGridView features today. The download package includes latest ClientUI assemblies as well as updated and new samples for both Silverlight and WPF platforms.</p>
<p>Make sure you checked out the new samples shipped in this CTP2 release, see the red-highlighted sections below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="New samples" border="0" alt="New samples" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb11.png" width="642" height="460" /></a></p>
<p>Enjoy the new CTP bits! In the next several posts, we will cover more code-level details and usages on the UXGridView related to the editing features, so stay tuned.</p>
<p>We’d love to hear what you think about the new features available in CTP2, please post your feedback, questions or issues to our <a href="http://www.intersoftpt.com/Community/ClientUI">community forum</a>.</p>
<p>All the best,<br />
  <br />Jimmy </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/02/uxgridview-ctp2-mvvm-data-editing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>UXGridView Part II: Data Access the MVVM-way with QueryDescriptor</title>
		<link>http://blog.intersoftsolutions.com/2011/02/uxgridview-part-ii-data-access-the-mvvm-way-with-querydescriptor/</link>
		<comments>http://blog.intersoftsolutions.com/2011/02/uxgridview-part-ii-data-access-the-mvvm-way-with-querydescriptor/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 10:05:22 +0000</pubDate>
		<dc:creator><![CDATA[ansoesil]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[QueryDescriptor]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[UXGridView]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://intersoftpt.wordpress.com/?p=2074</guid>
		<description><![CDATA[As Jimmy wrote in his blog post, our upcoming Grid control for Silverlight and WPF, UXGridView, allows you to perform data operation with MVVM pattern elegantly using QueryDescriptor. In this post, I will explain some of fundamental concepts of the QueryDescriptor in more practical ways. [...]]]></description>
				<content:encoded><![CDATA[<p>As Jimmy wrote in his <a href="http://intersoftpt.wordpress.com/2011/02/07/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/">blog post</a>, our upcoming Grid control for Silverlight and WPF, UXGridView, allows you to perform data operation with MVVM pattern elegantly using QueryDescriptor. In this post, I will explain some of fundamental concepts of the QueryDescriptor in more practical ways.</p>
<h2>Understanding QueryDescriptor</h2>
<p>First let’s take a look the QueryDescriptor class below.</p>
<p><img class="alignnone size-full wp-image-2083" title="QueryDescriptor Class" alt="QueryDescriptor Class" src="http://intersoftpt.files.wordpress.com/2011/02/gridview2_image1.png" width="399" height="248" /></p>
<p>As you can see, the QueryDescriptor has three properties that hold the information about the query. It also has a QueryChanged event that will be raised when any of the QueryDescriptor’s properties are changed. The following illustration shows some examples on how query information is stored in the QueryDescriptor.</p>
<p>  </p><pre class="crayon-plain-tag">QueryDescriptor queryDescriptor = new QueryDescriptor();

// filtering
// get records that have 
// (UnitPrice &gt;= 0 AND UnitPrice &lt; 50) OR (UnitPrice == 0)
CompositeFilterDescriptorCollection groupFilter1 = 
    new CompositeFilterDescriptorCollection();

groupFilter1.LogicalOperator = FilterCompositionLogicalOperator.And;
groupFilter1.Add(
    new FilterDescriptor() 
    { 
        PropertyName = &quot;UnitPrice&quot;, 
        Operator = FilterOperator.IsGreaterThanOrEqualTo, Value = 0 
    }
);
groupFilter1.Add(
    new FilterDescriptor() 
    { 
        PropertyName = &quot;UnitPrice&quot;, 
        Operator = FilterOperator.IsLessThan, Value = 50 
    }
);

CompositeFilterDescriptorCollection groupFilter2 = 
    new CompositeFilterDescriptorCollection();

groupFilter2.LogicalOperator = FilterCompositionLogicalOperator.And;
groupFilter2.Add(
    new FilterDescriptor() 
    { 
        PropertyName = &quot;UnitsInStock&quot;, 
        Operator = FilterOperator.IsEqualTo, Value = 0 
    }
);

queryDescriptor.FilterDescriptors.LogicalOperator = 
    FilterCompositionLogicalOperator.Or;

queryDescriptor.FilterDescriptors.Add(groupFilter1);
queryDescriptor.FilterDescriptors.Add(groupFilter2);

// paging
// get the record 6 - 10
queryDescriptor.PageDescriptor.PageSize = 5;
queryDescriptor.PageDescriptor.PageIndex = 1;

// sorting
// sort by category ascending then by product id descending
queryDescriptor.SortDescriptors.Add(
    new SortDescriptor() 
    { 
        PropertyName = &quot;CategoryID&quot;, 
        Direction = System.ComponentModel.ListSortDirection.Ascending 
    }
);
queryDescriptor.SortDescriptors.Add(
    new SortDescriptor() 
    { 
        PropertyName = &quot;ProductID&quot;, 
        Direction = System.ComponentModel.ListSortDirection.Descending 
    }
);</pre><p></p>
<p>With our data controls, the QueryDescriptor will be updated automatically whenever users perform data operations through our data controls such as paging, filtering and sorting. So all you need to do here is simply wiring up the QueryDescriptor to the data controls and listen to its QueryChanged event.</p>
<p>In the QueryChanged function delegate, you will need to parse the information in QueryDescriptor to a data operation command for your specific data source. Fortunately, our data provider libraries come with some methods allowing you to easily parse the QueryDescriptor into WCF RIA or DevForce data service.</p>
<p>Next, I will show you how to bind the QueryDescriptor to UXGridView, listen to its QueryChanged and perform the data operation.</p>
<h2>Binding QueryDescriptor to UXGridView using MVVM Pattern</h2>
<p>First, let’s create the ViewModel for our example.</p>
<p></p><pre class="crayon-plain-tag">using System.Collections.Specialized;
using Intersoft.Client.Data.ComponentModel;

namespace UXGridView.Samples.ViewModels
{
    public class ListProductsViewModel : ViewModelBase
    {
        public ListProductsViewModel()
        {
            this._queryDescriptor = new QueryDescriptor();
        }

        private INotifyCollectionChanged _products;
        private QueryDescriptor _queryDescriptor;

        public INotifyCollectionChanged Products
        {
            get { return this._products; }
            set
            {
                if (this._products != value)
                {
                    this._products = value;
                    this.OnPropertyChanged(&quot;Products&quot;);
                }
            }
        }

        public QueryDescriptor QueryDescriptor
        {
            get
            {
                return this._queryDescriptor;
            }
            set
            {
                if (this._queryDescriptor != value)
                {
                    if (this._queryDescriptor != null)
                        this._queryDescriptor.QueryChanged 
                            -= new System.EventHandler(OnQueryChanged);

                    this._queryDescriptor = value;
                    this._queryDescriptor.QueryChanged 
                        += new System.EventHandler(OnQueryChanged);

                    this.OnPropertyChanged(&quot;QueryDescriptor&quot;);
                }
            }
        }

        public virtual void LoadProducts()
        {

        }

        private void OnQueryChanged(object sender, System.EventArgs e)
        {
            this.LoadProducts();
        }
    }
}</pre><p></p>
<p>Notice that the LoadProducts() is still empty now, we&#8217;ll get to that later. Next we will bind this to our UXGridView in our View.</p>
<p></p><pre class="crayon-plain-tag">&lt;Intersoft:UXPage
	xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
	xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
	xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
	xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
	mc:Ignorable=&quot;d&quot;
	xmlns:Intersoft=&quot;http://intersoft.clientui.com/schemas&quot;
        xmlns:ViewModels=&quot;clr-namespace:UXGridView.Samples.ViewModels&quot;
	x:Class=&quot;UXGridView.Samples.Views.UXGridView.ListProducts&quot;
	Title=&quot;ListProducts Page&quot;
	d:DesignWidth=&quot;640&quot; d:DesignHeight=&quot;480&quot;&gt;

    &lt;Grid x:Name=&quot;LayoutRoot&quot;&gt;
        &lt;Grid.DataContext&gt;
            &lt;ViewModels:ListProductsViewModel/&gt;
        &lt;/Grid.DataContext&gt;

        &lt;Grid MaxWidth=&quot;700&quot; Margin=&quot;12&quot;&gt;
            &lt;Intersoft:UXGridView 
                Margin=&quot;8&quot; AutoGenerateColumns=&quot;False&quot; 
                ItemsSource=&quot;{Binding Products}&quot;
                QueryOperation=&quot;Server&quot;
                SortDescriptors=&quot;{Binding QueryDescriptor.SortDescriptors}&quot;
                PageDescriptor=&quot;{Binding QueryDescriptor.PageDescriptor}&quot; 
                PageSize=&quot;20&quot; CanUserPage=&quot;True&quot;&gt;
                &lt;Intersoft:UXGridView.Columns&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Category ID&quot; 
                        Binding=&quot;{Binding CategoryID}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Product ID&quot; 
                        Binding=&quot;{Binding ProductID}&quot; 
                        Aggregate=&quot;Count&quot; FooterFormatString=&quot;Count = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Product Name&quot; 
                        Binding=&quot;{Binding ProductName}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Unit Price&quot; 
                        Binding=&quot;{Binding UnitPrice}&quot; 
                        Aggregate=&quot;Avg&quot; FooterFormatString=&quot;Avg = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Units In Stock&quot; 
                        Binding=&quot;{Binding UnitsInStock}&quot; 
                        Aggregate=&quot;Max&quot; FooterFormatString=&quot;Max = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Units On Order&quot; 
                        Binding=&quot;{Binding UnitsOnOrder}&quot; 
                        Aggregate=&quot;Min&quot; FooterFormatString=&quot;Min = {0}&quot;/&gt;
                    &lt;Intersoft:UXGridViewTextColumn 
                        Header=&quot;Quantity Per Unit&quot; 
                        Binding=&quot;{Binding QuantityPerUnit}&quot;/&gt;
                &lt;/Intersoft:UXGridView.Columns&gt;
            &lt;/Intersoft:UXGridView&gt;
        &lt;/Grid&gt;
    &lt;/Grid&gt;
&lt;/Intersoft:UXPage&gt;</pre><p></p>
<p>Note that you will need to set the QueryOperation to Server to enable server-side data operation. That’s required because UXGridView also has the capability to manipulate the data at client side, which is the default setting. For now, let’s focus on the server-side query mode.</p>
<p>The QueryChanged event of the QueryDescriptor will be raised when it is bind to any of our data controls such as UXGridView, UXDataFilter or UXDataPager. The event will also be raised whenever there are changes in the QueryDescriptor, so it is the only place where you want to handle all data operations.</p>
<p>Now, let’s start processing this QueryDescriptor and retrieve a piece of data from our repository.</p>
<h2>Parsing QueryDescriptor and Retrieving Data from WCF RIA</h2>
<p>To parse the QueryDescriptor to WCF RIA, you need to include the Intersoft.Client.Data.Provider.Ria assembly in your project. This data provider assembly provides several methods that will allow you to easily parse the QueryDescriptor to the WCF RIA data service.</p>
<p>Now, let’s parse our QueryDescriptor and write some code to load the data in the LoadProducts() method that we&#8217;ve prepared in the previous section.</p>
<p></p><pre class="crayon-plain-tag">private NorthwindDomainContext _manager;
private NorthwindDomainContext Manager
{
    get
    {
        if (this._manager == null)
            this._manager = new NorthwindDomainContext();

        return this._manager;
    }
}

public virtual void LoadProducts()
{
    if (Intersoft.Client.Framework.ISControl.IsInDesignModeStatic)
        return;

<strong>
    var query = this.Manager.GetProductsQuery()
                         .OrderBy(p =&gt; p.ProductID)
                         .Parse(this.QueryDescriptor);
    query.IncludeTotalCount = true;
</strong>

    this.Manager.Load(
        query,
        op =&gt;
        {
            if (op.IsComplete)
            {
                this.Products = new PagedCollectionView(op.Entities);
                if (op.TotalEntityCount != -1)
                    this.QueryDescriptor.PageDescriptor.TotalItemCount 
                        = op.TotalEntityCount;
            }
            else
            {
                // error handling
            }
        },

        true);
}

private void OnQueryChanged(object sender, System.EventArgs e)
{
    this.LoadProducts();
}</pre><p></p>
<p>As you can see, the implementation is very straightforward, you just need to call <strong>.Parse(this.QueryDescriptor)</strong> to produce a query that WCF RIA can process. Note that <strong>IncludeTotalCount</strong> is set to True, which is important in paging scenarios as we will need to set the <strong>QueryDescriptor.PageDescriptor.TotalItemCount </strong>property to the total entity count of the particular query<strong>. </strong>This enables the data pager UI to determine the total number of pages available.</p>
<h2>Parsing QueryDescriptor and Retrieving Data from Dev Force</h2>
<p>In addition to the WCF RIA, you can also parse the QueryDescriptor to a DevForce service using similar approaches, with minor adjustments. First, you need to include the Intersoft.Client.Data.Provider.DevForce assembly in your project. This data provider provides similar methods as available in the RIA counterpart. Next, you need to adjust some of the code such as declaring the relavant DevForce type, see below.</p>
<p></p><pre class="crayon-plain-tag">private NorthwindEntities _manager;
private NorthwindEntities Manager
{
    get
    {
        if (this._manager == null)
            this._manager = new NorthwindEntities();

        return this._manager;
    }
}

public virtual void LoadProducts()
{
    if (Intersoft.Client.Framework.ISControl.IsInDesignModeStatic)
        return;

    <strong>this.Manager.Products
        .OrderBy(p =&gt; p.ProductID).Parse(this.QueryDescriptor)
        .ExecuteAsync(
        op =&gt;
        {
            if (op.CompletedSuccessfully)
            {
                this.Products = new PagedCollectionView(op.Results);
            }
            else
            {
                // error handling
            }
        }
        );  </strong>               
}

public virtual void GetTotalItemCount()
{
    <strong>var queryCount = this.Manager.Products
        .Parse(this.QueryDescriptor, false).AsScalarAsync().Count();

    queryCount.Completed += (o, e) =&gt;
    {
        if (e.Result != -1)
            this.QueryDescriptor.PageDescriptor.TotalItemCount = 
                e.Result;
    };    </strong>
}

private void OnQueryChanged(object sender, System.EventArgs e)
{
    this.GetTotalItemCount();
    this.LoadProducts();
}</pre><p></p>
<p>Notice that you need to retrieve the total item count in two separate calls. This is required since DevForce handles the total item count retrieval differently.</p>
<p>I hope you agree that the QueryDescriptor makes MVVM and data service significantly easier and straightforward to implement. Also, remember that the QueryDescriptor can be shared across multiple controls such as UXDataFilter and UXDataPager, in addition to the UXGridView.</p>
<p>In my next post, I will cover about some nice Grid features that we shipped in the first CTP release. For now, download the CTP1 bits <a href="http://www.intersoftpt.com/ClientUI/Intersoft.ClientUI.Data.Samples.zip">here</a>, and enjoy building your data-centric application the MVVM way.</p>
<p>Best Regards,<br />
  <br />Andry</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/02/uxgridview-part-ii-data-access-the-mvvm-way-with-querydescriptor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Introducing UXGridView: The MVVM-ready Grid for Silverlight and WPF</title>
		<link>http://blog.intersoftsolutions.com/2011/02/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/</link>
		<comments>http://blog.intersoftsolutions.com/2011/02/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 12:24:24 +0000</pubDate>
		<dc:creator><![CDATA[Jimmy Petrus]]></dc:creator>
				<category><![CDATA[2011 R1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ClientUI]]></category>
		<category><![CDATA[DevForce]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[UXDataFilter]]></category>
		<category><![CDATA[UXDataPager]]></category>
		<category><![CDATA[UXGridView]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://intersoftpt.wordpress.com/2011/02/07/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/</guid>
		<description><![CDATA[A while back, I posted a blog that describes our plan to release a new Grid control to join our flagship ClientUI suite. One of the key goals of the new Grid control is to provide a full MVVM-ready data grid implementation that supports our [...]]]></description>
				<content:encoded><![CDATA[<img width="466" height="270" src="http://blog.intersoftsolutions.com/wp-content/uploads/2014/09/querydescriptor_thumb1-604x350.png" class="attachment-post-thumbnail wp-post-image" alt="ClientUI Data Framework &amp; QueryDescriptor" style="float:right; margin:0 0 10px 10px;" /><p>A while back, I <a href="http://intersoftpt.wordpress.com/2010/11/12/the-next-clientui-roadmap-unveiled/">posted</a> a blog that describes our plan to release a new Grid control to join our flagship ClientUI suite. One of the key goals of the new Grid control is to provide a full MVVM-ready data grid implementation that supports our long-term vision in cross-platform lineups, particularly for the Silverlight and WPF platforms. </p>
<p>The new Grid control, named UXGridView, will also be “LoB centric”, which means many of its features will be focused on line-of-business scenarios and usage, such as support for server paging and filtering through loosely-coupled MVVM pattern and data providers, grouping and totaling, and data exporting to name a few.</p>
<p>In this first series of the UXGridView blogs, I’m excited to introduce the first public preview of our most anticipated data controls. The first CTP release includes UXGridView, UXDataPager and UXDataFilter. Both Silverlight and WPF versions are available. Let’s see what they have to offer.</p>
<h2>MVVM &amp; Data Service Made Easy</h2>
<p>Data access in Silverlight and WPF has always been a challenging task, particularly when it comes to a combination of server-based operations like server filtering and paging. Put it together with another two design goals, MVVM pattern and unified cross-platform API, you will be surprised no one had ever addressed this elegantly, yet. As the matter of fact, I’ve tried to goggle this myself for a few hours without any luck.</p>
<p>Simplifying data access with our UI lineups has always been the utmost priority and motivation in our products engineering. This is reflected in our new data control lineups – the UXGridView, UXDataPager and UXDataFilter – which targeted to run in both Silverlight and WPF platforms; including support for server operations without coupled to any data access strategy.</p>
<p>UXGridView makes MVVM-compliant server operations possible through QueryDescriptor, a simple CLR object that developers can consume in their ViewModel classes. The QueryDescriptor contains information about the query which are two-way bound to the View components such as data grid, pager and filter. The descriptor is then parsed to the data provider, resulting the data shape to be processed further in the ViewModel. The interesting part here is that the View doesn’t know the existence of the descriptor, nor the other way around. And more importantly, the descriptor is not coupled to any data access strategy, which means you can parse it yourself in the way that meaningful to you, or let our extensions did it for you. More on that soon.</p>
<p>Let’s take a look at the following illustration for a big picture on the architectural design around the QueryDescriptor, MVVM and the data controls.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/querydescriptor.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="ClientUI Data Framework &amp; QueryDescriptor" border="0" alt="ClientUI Data Framework &amp; QueryDescriptor" src="http://intersoftpt.files.wordpress.com/2011/02/querydescriptor_thumb.png" width="642" height="466" /></a></p>
<p>As seen in the above illustration, the ViewModel does all the works, from parsing the descriptor, perform the query asynchronously, to setting the result into the collection property. The View simply accepts whatever data the ViewModel provided through two-way binding, and is completely agnostic to the operations or objects used in the ViewModel.</p>
<p>It’s important to note that the QueryDescriptor and its related classes are implemented in a lightweight assembly called Intersoft.Client.Data.ComponentModel, makes it ideal for use within your Model or ViewModel. This assembly contains only simple CLR objects – strictly no View/UI stuff.</p>
<p>In the high level implementation, the data view controls are declared in the following XAML example.</p>
<p>  </p><pre class="crayon-plain-tag">&lt;Intersoft:UXGridView QueryOperation=&quot;Server&quot;
                      IsBusy=&quot;{Binding IsBusy}&quot;
                      ItemsSource=&quot;{Binding Products}&quot; 
                      <strong>SortDescriptors=&quot;{Binding QueryDescriptor.
                               SortDescriptors, Mode=TwoWay}&quot;</strong>/&gt;

&lt;Intersoft:UXDataFilter ItemsSource=&quot;{Binding Categories}&quot;
                        QueryOperation=&quot;Server&quot;
                        <strong>FilterDescriptors=&quot;{Binding QueryDescriptor.
                                FilterDescriptors, Mode=TwoWay}&quot;</strong>/&gt;

&lt;Intersoft:UXDataPager PageSize=&quot;20&quot; QueryOperation=&quot;Server&quot;
                       <strong>PageDescriptor=&quot;{Binding QueryDescriptor.
                                PageDescriptor}&quot;</strong>/&gt;</pre><p></p>
<p>Next, you create a new instance of the QueryDescriptor in the ViewModel. The descriptor is a simple CLR property that is no difference with other properties in the ViewModel, such as shown below. </p>
<p></p><pre class="crayon-plain-tag">private QueryDescriptor _queryDescriptor;

public QueryDescriptor QueryDescriptor
{
    get
    {
        return this._queryDescriptor;
    }
    set
    {
        if (this._queryDescriptor != value)
        {
            if (this._queryDescriptor != null)
                this._queryDescriptor.QueryChanged -= 
                   new System.EventHandler(OnQueryChanged);

            this._queryDescriptor = value;
            this._queryDescriptor.QueryChanged += 
                new System.EventHandler(OnQueryChanged);

            this.OnPropertyChanged(&quot;QueryDescriptor&quot;);
        }
    }
}

public DefaultViewModel()
{
      <strong>this.QueryDescriptor = new QueryDescriptor();</strong>
}</pre><p></p>
<p>Clearly, any changes that users made at runtime, such as sorting on the UXGridView, navigating to certain page on the UXDataPager, or applying filter on the UXDataFilter; automatically raises the QueryChanged event of the descriptor. Since the descriptor contains all information about the requested query, it allows you to centralize all data operations in a single entry point in your ViewModel, such as shown below.</p>
<p></p><pre class="crayon-plain-tag">private void OnQueryChanged(object sender, EventArgs e)
{
      this.LoadProducts();
}</pre><p></p>
<p>Hopefully I have shown it clear to you how easy it is to create a high-performance data grid with server filtering and server paging. And with MVVM pattern, it allows you to consistently apply the same technique to the rest of grids in your applications.</p>
<h2>Intersoft Data Extension for DevForce 6.0.8</h2>
<p>For DevForce’s users, get ready to query your data in a whole new light! In this first CTP release, we’re excited to ship the data provider extension that makes it extremely easy to query data using DevForce 6.0.8. The data provider extension takes the QueryDescriptor as an input, parses it, and automatically translates it into something that DevForce understood.</p>
<p>This means that all server-based data operations, such as sorting, filtering and paging, are taken care in a single syntax, see the following code.</p>
<p></p><pre class="crayon-plain-tag">public virtual void LoadProducts()
{
    this.IsBusy = true;

    this.ProductsSource.GetData
    (
        <strong>this.QueryDescriptor</strong>,

        (products) =&gt;
        {
            this.Products = new PagedCollectionView(products);
            this.IsBusy = false;
        },
        (error) =&gt;
        {
	    // handle error
        }
    );
}</pre><p></p>
<p>Again, remember that the data extension is not coupled to the descriptor nor the data controls. It’s implemented in a separate lightweight assembly that establishes a reference to both Intersoft.Client.Data.ComponentModel and DevForce assemblies.</p>
<p><strong>Update 2/15/2010</strong>: Our friend, Bill Gower, posted a series of great tutorials explaining how to use QueryDescriptor and UXGridView in real-world scenarios. Check out his thought on UXGridView <a href="http://billgower.wordpress.com/2011/02/10/first-thoughts-on-the-new-intersoft-uxgridview/" target="_blank">here</a>, the basics of QueryDescriptor <a href="http://billgower.wordpress.com/2011/02/11/goodbye-predicatebuilder-hello-querydescriptor/" target="_blank">here</a>, and how to configure multiple FilterDescriptors <a href="http://billgower.wordpress.com/2011/02/13/enhancing-our-members-listing/" target="_blank">here</a>.</p>
<h2>Download the CTP1 Bits</h2>
<p>The first CTP bits released today includes a handful of samples that you can play around to test drive the core Grid features. The sample project comes with a simple navigation interface, built entirely with ClientUI’s navigation framework, shown below.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="UXGridView Samples" border="0" alt="UXGridView Samples" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb.png" width="607" height="482" /></a></p>
<p>Click <a href="http://www.intersoftpt.com/ClientUI/Intersoft.ClientUI.Data.Samples.zip">here</a> to download the CTP1 bits of the new data controls. This single download includes a number of solutions tailored for different platforms and different data access provider. The download contains the following:</p>
<ul>
<li>Latest ClientUI assemblies (Framework, Aqua, Interactivity) </li>
<li>ClientUI Data CTP1 assemblies (Silverlight and WPF) </li>
<li>Sample solution using WCF RIA Services (Silverlight) </li>
<li>Sample solution using DevForce 6.0.8 (Silverlight and WPF) </li>
</ul>
<p>All solutions share the same XAML file despite the differences in platforms and data access technologies – another interesting sample project to learn about MVVM and unified development model, see the following screenshot.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Solution files" border="0" alt="Solution files" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb1.png" width="642" height="212" /></a></p>
<p>We’d love to hear what you think about our new data controls. Be sure to send your thoughts to <a href="mailto:feedback@intersoftpt.com">feedback@intersoftpt.com</a>. And before you asked for a feature, please check out the CTP milestones in the last section below.</p>
<p><strong>IMPORTANT</strong>: You are required to install ClientUI in your development machine to develop and run the sample solutions. Click <a href="http://www.clientui.com/download">here</a> to download the ClientUI free trial. The latest DevForce (6.0.8) is required to run the DevForce samples, which can be obtained <a href="http://www.ideablade.com/DevForceUniversal/DevForceUniversal_DownloadEditions.aspx">here</a>.</p>
<h2>CTP Milestones</h2>
<p>Last but not least, I’d like to share about our release plans with you. Instead of releasing huge feature-sets in fairly longer timespan, we’ve chosen to release the UXGridView bits in more iterations with shorter timespan, focusing on each core feature-set at a time. This also allows our valued customers and partners to get an early preview, and send feedback while the product is being baked.</p>
<p>The UXGridView will be released in three CTPs before it reaches its RTM release scheduled on March this year. See the following chart for the milestone details.</p>
<p><a href="http://intersoftpt.files.wordpress.com/2011/02/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="UXGridView Milestones" border="0" alt="UXGridView Milestones" src="http://intersoftpt.files.wordpress.com/2011/02/image_thumb2.png" width="642" height="481" /></a></p>
<p>In summary, the first CTP release is highly focused on the following feature sets:</p>
<ul>
<li>Core UXGridView infrastructure, including MVVM-ready design. </li>
<li>Core UXGridView features:
<ul>
<li>Layout features, such as dynamic row height, column freezing. </li>
<li>Interaction features, such as column resizing, reordering, fluid drag-drop. </li>
<li>Data features like group totals and aggregates. </li>
<li>UI features, such as status bar, commands, busy management. </li>
<li>Performance features, allows you to display millions of rows without lagging. </li>
</ul>
</li>
<li>Core data infrastructure, supporting both client-side and server-side query operation. </li>
<li>Core platform infrastructure, supporting both Silverlight and WPF. </li>
<li>Data component model, including QueryDescriptor and related data model. </li>
<li>Data providers:
<ul>
<li>For WCF RIA Services (Silverlight only, RIA did not support WPF) </li>
<li>For DevForce (Silverlight and WPF) </li>
</ul>
</li>
<li>UXDataPager with MVVM-ready architecture leveraging commands, visual state and multi-binding for loosely-coupled UI engineering. This allows you to completely customize the pager user interface without affecting the behaviors. </li>
<li>UXDataFilter with binding and core features, more UI stuff to come. </li>
</ul>
<p>Enjoy the CTP bits, and stay tuned for more exciting details!</p>
<p>PS: UXGridView is fully supported starting from this CTP release. Please post your questions or issues to our <a href="http://www.intersoftpt.com/Community/ClientUI">community forum</a>.</p>
<p>All the best,<br />
  <br />Jimmy Petrus </p>
<p>Chief Software Architect</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intersoftsolutions.com/2011/02/introducing-uxgridview-the-mvvm-ready-grid-for-silverlight-and-wpf/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
