RowIndicator do not synchronized with CurrentItem

5 posts, 1 answers
  1. Harald
    Harald avatar
    48 posts
    Member since:
    Oct 2013

    Posted 04 Jul Link to this post

    Hi,

    i am using a DataGrid with IsSynchronizedWithCurrentItem="True".  It does not work.

    01.<telerik:RadGridView x:Name="MyDataGrid"
    02.        Grid.Row="1"
    03.        SelectionMode="Single"
    04.        IsReadOnly="True"
    05.        AutoGenerateColumns="False"
    06.        IsSynchronizedWithCurrentItem="True"
    07.        CanUserDeleteRows="False"
    08.        CanUserFreezeColumns="False"
    09.        CanUserInsertRows="False"
    10.        CanUserReorderColumns="False"
    11.        CanUserResizeColumns="False"
    12.        CanUserSortColumns="False"
    13.        CanUserSortGroups="False"
    14.        IsFilteringAllowed="False"
    15.        ShowGroupPanel="False"
    16.        ShowColumnHeaders="False"
    17.        ItemsSource="{Binding ItemsSource, ElementName=MyDataForm}"
    18.        SelectedItem="{Binding CurrentItem, ElementName=MyDataForm}">
    19.    <telerik:RadGridView.Columns>
    20.        <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}" Header="Id" Width="20" IsVisible="False"/>
    21.        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Katalogeintrag" Width="*"/>
    22.        <telerik:GridViewDataColumn DataMemberBinding="{Binding Catalog.Id}"  Header="Katalog" Width="20" IsVisible="False"/>
    23.        <telerik:GridViewDataColumn DataMemberBinding="{Binding Locked}" Header="Gesperrt" Width="10" IsVisible="False"/>
    24.        <telerik:GridViewDataColumn DataMemberBinding="{Binding System}" Header="System" Width="10" IsVisible="False"/>
    25.    </telerik:RadGridView.Columns>
    26.</telerik:RadGridView>

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 05 Jul Link to this post

    Hello Harald,

    I'm attaching a sample project where RadGridView's IsSynchronizedWithCurrentItem property is working as expected. Could you please have a look at it and let me know if I'm missing something important? Providing more details about the exact setup at your end would definitely be of help in finding a solution.

    Thank you in advance for your cooperation on the matter.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Harald
    Harald avatar
    48 posts
    Member since:
    Oct 2013

    Posted 06 Jul in reply to Dilyan Traykov Link to this post

    Thank you for the example. In my Application it does not work. I am using a RadEntityFrameworkDataSource as ItemSource for the DataForm. 

    1.<telerik:RadEntityFrameworkDataSource Name="CatalogEntriesDataSource" QueryName="CatalogEntries">
    2.        </telerik:RadEntityFrameworkDataSource>

    Maybe that's wrong?
  5. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 07 Jul Link to this post

    Hello Harald,

    Could you please set the ItemsSource for your RadDataForm like so:

    ItemsSource="{Binding DataView, ElementName=CatalogEntriesDataSource}"

    And for RadGridView:

    ItemsSource="{Binding DataView, ElementName=CatalogEntriesDataSource}"
    SelectedItem="{Binding DataView.CurrentItem, Mode=OneWay, ElementName=CatalogEntriesDataSource}"

    This way the selected item should be synchronized across the two controls. Please give this a try and let me know how it goes.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Harald
    Harald avatar
    48 posts
    Member since:
    Oct 2013

    Posted 07 Jul in reply to Dilyan Traykov Link to this post

    Thank you.
Back to Top
UI for WPF is Visual Studio 2017 Ready