We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

bind GDC to 3 observable collections ?

Hi SF,

I would like to bind the grid, bi-directionnaly to 3 observable collections.

Each contain the one common field, and one original one. For very size reason size and manipulation reason, I would preffer to let them separate.

See below an example:

result should be visible in SF GDC:
obs. collection: german obs. collection: german obs. collection: spanish
english german english french english spanish english german french spanish
car wagen car voiture car coche car wagen voiture coche
store geschaft store magasin store tienda store geschaft magasin tienda
man mann table table man hombre man mann   hombre
women frau women femme book libro women frau femme  
keyboard clavier screen pa,talla keyboard   clavier  
screen ecran screen   ecran pantalla
table   table  
book     libro

Thanks for help,

Fabrice


4 Replies

FF fff April 26, 2014 08:32 AM UTC

Hi SF,

Any help ?


Two ways binding

If possible without an additional intermediate object, but OK if no other possibility of course. But update shall be possible on the initial 3 objects and then reflected in GDC

Thanks in advance,

F



JS Jayapradha S Syncfusion Team April 30, 2014 03:44 PM UTC

Hi FFF,

We are sorry for the delay in getting back to you.

We have created a sample to achieve your requirement such as binding 3 observable collection using SfDataGrid control and the output will be displayed as shown in your query.

Please refer the below attached sample.

Kindly let us know if this solution helps you.

Regards,
Jayapradha

Attachment: WpfApplication3_9bfaf494.zip


FF fff May 12, 2014 06:25 AM UTC

Hi Jayapradha,

Thanks for that, it works very good and is very helpfull & progressing for me


My "3 collections" were examples : it can be 2 or 6 (...) and not the same every time, but same structure

Is there a way to have that flexibility in your code and to be decided at run time ? In fact, I need the user to select which ones and how many, and the program would then load only the choosen ones & bind them to the GDC.


So is there a way to do that without the fixed structure that I see in your viewmodel.cs ?

I would have imagined the GDC to be binded bidirectionnal to a very basic collection, with only the English for example as it is always present, and then -at run time/after user choice, concat or add new collection(s) to the basic one and GDC to reflect these changes .... is that possible ?

Or not binded al all initially, do the necessary concat, and then binded bidirectionnal.

Thanks,

Fabrice



JS Jayapradha S Syncfusion Team May 15, 2014 11:25 AM UTC

Hi Fabrice,

 

Thanks for your update.

 

You can achieve your requirement by using dynamic item source. You can add the properties based on the user choice.

 

We have created a sample based on your requirement.

 

Please refer the below attached sample.

 

Kindly let us know if this solution helps you.

 

Regards,

Jayapradha S

 


Attachment: Sample_f95f4b1.zip

Loader.
Live Chat Icon For mobile
Up arrow icon