This is a migrated thread and some comments may be shown as answers.

Programmatically databind Itemssource

0 Answers 79 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark
Top achievements
Rank 1
Mark asked on 29 Mar 2011, 06:46 PM
I'm currently binding a GridView to its ItemSource with XAML as:

ItemsSource="{Binding Path=CurrentItem.tblPOLines, Mode=TwoWay, ElementName=df_POLedger}"

How can achieve this programmatically?

The "tblPOLines" is a child.  If it were the parent, it would be:

dg_tblPOLines.ItemsSource = df_POLedger.CurrentItem;

but I'm trying to go to the children.

Thanks,
Mark

-----
EDIT
-----

This was requested in trying to resolve "blank"comboboxes.  This is a function of Element Binding and has been resolved by the recommended solution of binding ItemSources through codebehind.  You may close this thread.
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Share this question
or