Events in UXGrid (Intersoft ClientUI MVVM Data Application (DevForce))

5 replies. Last post: June 30, 2011 2:58 AM by Riendy Setiadi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi

We prepare own app model using some experiences from template: Intersoft ClientUI MVVM Data Application (DevForce).

Class EditableGridViewModelBase.cs has method ExecutePrepareNewRow.

I'd like to prepare NewItem without adding its to EntityManager, so I comment one line:

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);
        }

  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.

Could you explain me why?:

1.  ExecuteValidationRow is not trigger

2. Why I have to add entity do EntityManager prior confirm to add process new record in UXGrid

I'd like to operate on detached entity.


Other interesting experience:

1. Start new project with unmodified template Intersoft ClientUI MVVM Data Application (DevForce)

2. go to product and add one row (without saving changes)

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.

I understand we can clear entity nad query cache but I thing it should be much better to work on detached entity.


Kind regards

Andrzej


All times are GMT -5. The time now is 2:11 PM.
Previous Next