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
1485
Automatically selecting first record
posted

Hi,

I have some grids where I automatically select the first record after setting the itemssource through code behind. That works fine.

Another application we have (started by another developer) uses DataContext extensively, to the itemssource is just a binding in XAML.  We've tried figuring out where to put the code to select the first record when the grid is displayed, but no luck so far.  For example: We click on a tab that contains a XamDataGrid with the itemssource bound in XAML.  When the tab is activated and the grid shows up on the screen, we'd like the first record to be selected.

We've tried putting the code in a few different events, but for some reason it never works.  We must be overlooking something simple, but we've reached that point where we're just running in circles.

Thanks,
Michel

Parents
  • 69686
    posted

    Hello Michel,

    Which events have you been trying with? For example, Loaded and InitializeRecord events should be working correctly.

Reply Children
No Data