DetailsGrid-column-binding
Hi.
I'm using MVVM pattern and I have grid with details-grid records. How can I bind for example GridComboBoxColumn.ItemsSource to my ViewModel?
Thanks.
Regards,
Juraj
SIGN IN To post a reply.
3 Replies
SV
Srinivasan Vasu
Syncfusion Team
November 9, 2016 01:09 PM UTC
Hi Juraj,
Thanks for contacting Syncfusion support.
We have checked your query and you can bind the ViewModel property to the ItemsSource of GridComboBoxColumn like the below code example.
Please refer the below code example.
Code Example[XAML]:
|
<syncfusion:GridComboBoxColumn HeaderText="Customer Area"
ItemsSource="{Binding Path=ComboBoxItemsSource,
Source={StaticResource orderInfoRepository},
Mode=TwoWay}"
MappingName="CustomerCity" /> |
If your requirement is differ from this, please let us know the more details about your requirement.
Regards,
Srinivasan
JT
Juraj Tomana
November 10, 2016 07:14 AM UTC
Hi.
Thanks, but I really can't bind to Resources of View. I have dynamically generated views and I can bind just to some visual ancestor's data-context.
Something like:
<MyView>
...
<SfDataGrid>
...
<SfDataGrid.DetailsViewDefinition>
....
<syncfusion:GridComboBoxColumn HeaderText="Customer Area"
ItemsSource="{Binding Path=DataContext.ComboBoxItemsSource, RelativeSource={RelativeSource FindAncestor, Type=myView}"
MappingName="CustomerCity" />
.... but this doesn't work.
Thanks.
Regards,
Juraj
SV
Srinivasan Vasu
Syncfusion Team
November 15, 2016 03:54 AM UTC
Hi Juraj,
We will provide workaround for your query. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates
Please let me know if you have any questions.
Regards,
srinivasan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
JT Juraj Tomana
- Nov 8, 2016 12:39 PM UTC
- Nov 15, 2016 03:54 AM UTC