I Have a XamDataPresenter fill with a dataview :
XDPChAff.DataSource = DsetChAff.Tables[0].DefaultView;
I Bind this xamdatapresenter with a StactPanel :
<StackPanel Grid.Column="1" Grid.Row="1" Name="SPanSaisie" DataContext="{Binding ElementName=XDPChAff, Path=ActiveDataItem }"
And all work fine.
Now , I Want set the ActiveDataItem Automatic par program . How do ?
Tank you CaisseOdev
HI Caiseodev,
The XamDataGrid has GetRecordFromDataItem method, you can use this method to get a Record from the dataitem it is bound to.
Here a help link:
http://help.infragistics.com/NetAdvantage/WPF/2011.2/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v11.2~Infragistics.Windows.DataPresenter.DataPresenterBase~GetRecordFromDataItem.html
Sincerely,
Matt Developer Support Engineer
Thank you
But How to know the Item of the record : xdpgrid1.Records[?] when I know the datarowView to Select.
Cordialement Caisseodev
HI,
If you set the XamDataPresenter's ActiveRecord property, this will also set the ActiveDataItem.
Code Snippet:
xdpgrid1.ActiveRecord = xdpgrid1.Records[0];
Sincerely,MattDeveloper Support Engineer