iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello
I've prepared example base on your template with DevForce. There is applied model Region +Territory.
In northindmodel.edms I've changed only TerritoryID (of Territory entity) property to Identity.
Constructor of TerritoryViewModel has implemented Region as argument. Base on Region we get property navigation about Territories.
//public class TerritoryViewModel1 : EditableGridViewModelBase<Territory>
public TerritoryViewModel1(Region region) : base() { _region = region; Items = region.Territories; }
Property items is binding to UXGrid.
The problem is when we try to add new territory to initial region.
It's necessery to set Region property in Territory entity. We can do that in 3-way:
1. override method ExecutePrepareNewRow (in my example it's Territory1 on menu)
protected override void ExecutePrepareNewRow(object parameter) { base.ExecutePrepareNewRow(parameter); this.NewItem.Region = _region; }
Problem: when I click on new row , the same one appear on bottom
2. override method ExecuteInsertRow (in my example it's Territory2 on menu)
protected override void ExecuteInsertRow(object parameter) { ((Territory)parameter).Region = _region; //this.NewItem.Region = _region; base.ExecuteInsertRow(parameter); }
Problem : after insert we get double record on list but one of them couldn't be selected
3. override method ExecuteValidateRow
protected override void ExecuteValidateRow(object parameter) { ((Territory)parameter).Region = _region; base.ExecuteValidateRow(parameter); }
This is one solution which working properly
Could you investigate why 1 and 2 solution not working ?
Kind Regards
Andrzej
Hi Andrzej,
I'm currently still investigating your problem and need more time to provide a solution for you. I will get back to you as soon as possible.
Regards.Riendy
The first solution is execute when you click add new row. And the second one, execute when you press enter after you type a new data.
But, I have to discuss with our development team to ensure when the event execute and also forward the issue which appear while using these events.
Could you please give me more time ?
Thank you for your patience.Riendy
This issue appears because you are using navigation property (region).
ExecutePrepareNewRow event, executed when you click on add new row, so when you click new row, the new data appear on grid with the default value, just like appear on add new row.
ExecuteInsertRow event, executed in last action after you approve the adding with pressing enter, etc. After insert, we get double record on list, it might be appear because set true the AutoGenerateColumn property, so the collection called twice.
In addition, your scenario is a missing scenario when we did QA. I have reported this issue to our development team for further investigation.
Regards,Riendy
Hi Riendy,
Double records appear also when I set AutoGenerateColumn=false. In my opinion it's a bug
I think a freely operation on entities , not depending on navigation properties level, should be able to use with UXGrid.
Could you give me some roadmap to implement navigation properties.
It's seriously limits use of UXGrid in our project
Kind regards
To implement navigation properties, it should operated just like another entities. But unfortunately, just like I said before, this is our missing scenario.
Our development team has known this issue and will fix it soon. For now, You might use your own solution that use ExecuteValidateRow event.
I will let you know the updates.
Hi
Thank you and look forward
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname