Home Forums WPF controls Xceed DataGrid for WPF Getting count of currently displayed rows in Viewport

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26646 |

    I would like to be able to inform the user which rows I am currently displaying within the viewport with respect to the total number of rows. Is there any way to accomplish this?

    For instance if I have 100 records in my source, and the Viewport only displays 10 at a time, I would like to be able to tell the user:

    1-10 of 100

    If the user scrolls this value would be updated. Is this possible?

    Imported from legacy forums. Posted by Rob (had 3124 views)

    Xceed Support
    Member
    Post count: 5658

    <code>
    <Grid xmlns:xcdg=”http://schemas.xceed.com/wpf/xaml/datagrid”&gt;
    <Grid.Resources>
    <xcdg:DataGridCollectionViewSource x:Key=”cvs_orders”
    Source=”{Binding Source={x:Static Application.Current},
    Path=Orders}” />

    <Style x:Key=”itemIndexSelectorStyle”
    TargetType=”{x:Type xcdg:RowSelector}”>
    <Setter Property=”Content”
    Value=”{Binding RelativeSource={RelativeSource Self}, Path=ItemIndex}”/>
    </Style>
    <Style TargetType=”{x:Type xcdg:DataRow}”>
    <Setter Property=”xcdg:RowSelectorPane.RowSelectorStyle”
    Value=”{StaticResource itemIndexSelectorStyle}” />
    </Style>
    </Grid.Resources>

    <xcdg:DataGridControl x:Name=”OrdersGrid”
    ItemsSource=”{Binding Source={StaticResource cvs_orders}}” />
    </Grid>
    </code>

    Imported from legacy forums. Posted by Jenny [Xceed] (had 331 views)

    User (Old forums)
    Member
    Post count: 23064

    This works great, but how can I get the RowSelector column to automatically size to fit the width of the content?

    Imported from legacy forums. Posted by Rob (had 570 views)

    User (Old forums)
    Member
    Post count: 23064

    Also if a column is filtered, is there a mechanism for retrieving the total number of items in the filtered collection?

    Imported from legacy forums. Posted by Rob (had 4104 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.