﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><pubDate>Thu, 30 Jun 2011 02:58:22 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Andrzej,&lt;/p&gt;&lt;p&gt;I meant, if you have to clear the cache, but it is not suggested because it same as remove some DevForce service. The batch update on this state should be enabled. Unfortunately in the fact, the batch update is disabled. Our development team has been known this issue and I ensure they will fix it as soon as possible.&lt;/p&gt;
&lt;p&gt;Regarding to your scenario, I'm currently still investigating to provide a solution for you.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 18px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><pubDate>Tue, 28 Jun 2011 04:55:11 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi Riendy,&lt;/p&gt;&lt;p&gt;Anyway ..&lt;/p&gt;
&lt;p&gt;I would imagine the following process:&lt;/p&gt;
&lt;p&gt;1. user click on new row:&lt;/p&gt;
&lt;p&gt;  a. ExecutePrepareNewRow is raising - in code we create new object(entity) and set some default value&lt;/p&gt;
&lt;p&gt;2. user add new row to list&lt;/p&gt;
&lt;p&gt;  a. ExecuteValidateRow is raising - in code we validate object (entity), if 'ok' than insert it into EntityManager&lt;/p&gt;
&lt;p&gt;  b. ExecuteInsertRow is raising&lt;/p&gt;
&lt;p&gt;3. user click Save and all new added entity are saved via DevForce to DB&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;UXGrid offer me another life cycle:&lt;/p&gt;
&lt;p&gt;when user click new row I have to add new entity to EntityManager (in ExecutePrepareNewRow) - I don't do that, because there is no my accept at this moment. &lt;/p&gt;
&lt;p&gt;Have you ever tried some kind of magic:&lt;/p&gt;
&lt;p&gt;1. go to Product&lt;/p&gt;
&lt;p&gt;2. click on new row and write ProductName="abc" and Category="Beverages"&lt;/p&gt;
&lt;p&gt;3. next click on Home&lt;/p&gt;
&lt;p&gt;4. and back again to Product -what you see : new added row &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Why I have to take care to clear cache or permanently use sandbox with new instance of EntityManager&lt;/p&gt;
&lt;p&gt;I think it's not good practic which required more control.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;BTW&lt;/p&gt;
&lt;p&gt;Sandbox is very good practic&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><pubDate>Tue, 28 Jun 2011 02:53:30 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Andrzej,&lt;/p&gt;&lt;p&gt;EntityManager is an item from devforce. The process that you did in UXGrid would be save on entityManager before you save or cancel the processes (save all changes/reject all changes) to dataSource. In simply, we can call it client caching. That is why batch update not available in all data providers such as WCF RIA service.&lt;/p&gt;
&lt;p&gt;In brief, you have to add NewItem to EntityManager, because you use DevForce service.&lt;/p&gt;
&lt;p&gt;For your other experience with our template, if you want to clear the processes that haven't click save all changes button, you may add following code in you xaml, ie :&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;ProductRepository repository = this.DataSource as ProductRepository;
Repository.Context.Clear();&lt;/pre&gt;
&lt;p&gt;When this code applied, the "cache" will be clear when the xaml opened.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Please let me know if it is not answered yet.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 18px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><pubDate>Mon, 27 Jun 2011 09:29:37 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi Riendy,&lt;/p&gt;&lt;p&gt;if I don't add entity to EntityManager like on example below:&lt;/p&gt;
&lt;p&gt;&lt;span style="line-height: 18px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; " /&gt;&lt;/p&gt;&lt;pre style="font-family: 'courier new', tahoma; background-color: rgb(255, 252, 225); font-size: 9pt; white-space: pre-wrap; word-wrap: break-word; "&gt;private void ExecutePrepareNewRow(object parameter)
        {
            // It's possible to initialize the new row with default values
            // Example:
            // product.ProductName = "New Product";
            this.NewItem = this.EditableProductsSource.Create() as T;
            //this.EditableProductsSource.Insert(this.NewItem);
        }&lt;/pre&gt;
&lt;p /&gt;
&lt;p&gt;only RejectRowCommand ( ExecuteRejectRow method) is executed.&lt;/p&gt;
&lt;p&gt;I expect it should be extecuted:  ValidateRowCommand, InsertRowCommand too.&lt;/p&gt;
&lt;p&gt;You can try it  (file: EditableGridViewModelGenericBase.cs)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;</description></item><item><title>Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><pubDate>Mon, 27 Jun 2011 05:47:48 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Andrzej,&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For your experience with a cache, I have informed our development teams for this issue.&lt;/p&gt;
&lt;p&gt;Regarding to your question about ExecuteValidateRow, your sample in this &lt;a href="http://intersoftpt.com/Community/ClientUI/UXGrid-binding-to-property-navigation-DevForce--problem-with-adding-new-record/" target="_blank"&gt;thread&lt;/a&gt; show me that you used ExecuteValidateRow event. Is it still not trigger as you expect ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards.&lt;br /&gt;Riendy&lt;/p&gt;</description></item><item><title>Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Events-in-UXGrid-Intersoft-ClientUI-MVVM-Data-Application-DevForce/</link><pubDate>Tue, 21 Jun 2011 06:19:10 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;We prepare own app model using some experiences from template: Intersoft ClientUI MVVM Data Application (DevForce).&lt;/p&gt;
&lt;p&gt;Class EditableGridViewModelBase.cs has method ExecutePrepareNewRow.&lt;/p&gt;
&lt;p&gt;I'd like to prepare NewItem without adding its to EntityManager, so I comment one line:&lt;/p&gt;&lt;pre&gt;private void ExecutePrepareNewRow(object parameter)
        {
            // It's possible to initialize the new row with default values
            // Example:
            // product.ProductName = "New Product";
            this.NewItem = this.EditableProductsSource.Create() as T;
            //this.EditableProductsSource.Insert(this.NewItem);
        }&lt;/pre&gt;
&lt;p&gt;  I assumend that in the process of adding a row I'll validate (ExecuteValidateRow) a row, next add this one to EntityManager (Context). But what's happend?: First event which is fired is ExecuteRejectRow.&lt;/p&gt;
&lt;p&gt;Could you explain me why?:&lt;/p&gt;
&lt;p&gt;1.  ExecuteValidationRow is not trigger&lt;/p&gt;
&lt;p&gt;2. Why I have to add entity do EntityManager prior confirm to add process new record in UXGrid&lt;/p&gt;
&lt;p&gt;I'd like to operate on detached entity.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Other interesting experience:&lt;/p&gt;
&lt;p&gt;1. Start new project with unmodified template Intersoft ClientUI MVVM Data Application (DevForce)&lt;/p&gt;
&lt;p&gt;2. go to product and add one row (without saving changes)&lt;/p&gt;
&lt;p&gt;3. next click on other item in menu (ex. About) and go to Product again - you'll see added row without  possibility of saving it.&lt;/p&gt;
&lt;p&gt;I understand we can clear entity nad query cache but I thing it should be much better to work on detached entity.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>