Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
950
How set ActiveDataItem with code
posted

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 

 

 

 

Parents
  • 28407
    posted

    HI,

     If you set the XamDataPresenter's ActiveRecord property, this will also set the ActiveDataItem.

     Code Snippet:

     xdpgrid1.ActiveRecord = xdpgrid1.Records[0];

    Sincerely,
    Matt
    Developer Support Engineer

     

Reply Children