Getter Setter and BindableList
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=699
Printed Date: 19-Apr-2024 at 2:36pm
Topic: Getter Setter and BindableList
Posted By: aladdin
Subject: Getter Setter and BindableList
Date Posted: 26-Feb-2008 at 6:58pm
Sorry for my english. - I dont now how to phrase the problem.
I use a sample to explain more easy.
If extended the IdeaBladeTutorial with new two tables Colors ->fields Id, ColorName and Sizes -> fields Id,SizeName and insert new fields in Product GroupId, ColorId, SizeId. and change the relation OrdrerDetail->ProductDetail->Product
Now we have the schema :
OdrerDetail ProductDetail Product ---------------------------------------------------- --------------------------------------------------------------- ------------------------- /OrderSummaryId/ ProductId /Quantity / /GroupId/ ProductId/ColorId/SizeId/ProductName/ / id / ProductName / --------------------------------------------------- ---------------------------------------------------------------- ------------------------ 1000 3 5 1 3 red M P1 1 P1 1000 4 2 2 4 blue L p1 2 P2
1000 5 1 1 5 red XL p1 3 p1 -child 1000 6 4 2 6 green L p1 4 p1 -child
5 p1 -child
6 p1 -child
When add or modify the OrderDetail must to create a new "DynamicTable" for processing.- like pivot - because when created a product we dont now how many colors and sizes to add.
DynamicTable ------------------------------------------ / Id / ColorId / M / L / XL / ----------------------------------------- 1 red 5 0 1 2 blue 0 2 0 3 green 0 4 0
There are many solution to approximate the problem but i believe the best way is with Getter and Setter and i dont now how.There is a hint in Common.EntityModel the GetChildrenPropertyDescriptorFactory method. this is the GetterDelegate but missing the SetterDelegate.
Any idea? Thanks.
|
Replies:
Posted By: Bill Jensen
Date Posted: 26-Mar-2008 at 11:38am
Are you using the DevEx version of Cabana? If so, look at the Admin module. It contains two examples of using a proxy object to display and edit a many-to-many relationship (in this case the associations between users (or groups) and privileges ("security codes"). A similar technique might work for your application.
Bill J.
|
|