Handling Foreign Key Fields

Aug 13, 2010 at 10:37 AM

Hi bykinag ,

                         How to apply filter on foreign key fields for example I have two tables countryMaster and RegionMaster , I have RegionCode in CountryMaster table which references the Regioncode field of RegionMaster and while displaying CountryMaster in my Country Master Option I am displaying the Region Name by using RegionMaster.RegionName expression in my Datagrid Cell, but I am not able to see RegionName field in the Field Name drop down of the datafilter control it only shows the RegionCode field of the CountryMaster which is an integer field, please help me in this context as it has become a show stopper Now.

 

Thanks

Ahmed Kapasi

Coordinator
Aug 13, 2010 at 12:21 PM

Hi Ahmed,

 

i see this question twice:

http://riadatafilter.codeplex.com/Thread/View.aspx?ThreadId=208854

 

you want to show related entities, we need to modify Method at Utilities -> GetListOfDomainEntityFields.

we need to look into the Entity, to pull out the related fields.

Coordinator
Aug 15, 2010 at 8:35 PM

Hi Ahmed,

I opened new thread about Entities at forums.silverlight.net

and waiting help from community.

after i get answer, start to implementing this feature.

Coordinator
Sep 11, 2010 at 11:39 PM

found solution how to get RelatedEntities, wait new release!!!

Coordinator
Sep 20, 2010 at 9:41 AM

Ahmed kapasi wrote:

Dear bykinag,

                       Did u find the solution for including the foreign fields in the filter operators? as we r on verge of scrapping this control if we can't acheive this feature.

Thanks

Ahmed Kapasi

 

yes i found solution and implement that.

ahmed, use existing threads for Discussions

Sep 20, 2010 at 12:39 PM
Edited Sep 20, 2010 at 1:17 PM

Dear bykinag,

                             Thats great , can you put sample code in documentation to let us know how to use this beautiful feature of your control.

 

Thanks

Ahmed Kapasi

Coordinator
Sep 20, 2010 at 1:24 PM

feature working "out of the box", you do not need to do anything.

related entities parsed if that is exists at that entity, all what you just need to Include or Exclude this entity fields.