This is a migrated thread and some comments may be shown as answers.

LostKeyboardFocus after enter key pressed

1 Answer 107 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Karel
Top achievements
Rank 1
Karel asked on 14 May 2014, 12:50 AM
Hello,

I have problem with RadDataPager. If I try to write specific page number into current page textbox and press enter key (or tab key as well), nothing happens, only LostKeyboardFocus is fired. These are the only two keys that fires that event. Have you faced that issue before?

This is the code of my page:

<UserControl
    x:Class="GTrade.App.Views.TradeTickets.TradeTicketSearchView"
    xmlns:cal="http://www.caliburnproject.org"
    xmlns:convertors="clr-namespace:GTrade.App.Helpers.Convertors"
    Background="Transparent" Language="cs-CZ"
    mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="800">
     
    <UserControl.Resources>
        <convertors:WidthConverter x:Key="WidthConverter" />
        <DataTemplate x:Key="TotalPriceWithCurrency">
            <TextBlock Text="{Binding TotalPriceWithCurrency}" HorizontalAlignment="Right" />
        </DataTemplate>
    </UserControl.Resources>
 
    <telerik:RadBusyIndicator IsBusy="{Binding Busy.IsBusy}">
 
            <Grid>
 
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
 
                <telerik:RadGridView
                    Grid.Row="0"
                    x:Name="Grid"
                    ItemsSource="{Binding Items}"
                    SelectedItem="{Binding CurrentItem}"
                    RowIndicatorVisibility="Collapsed"
                    IsReadOnly="True"
                    AutoGenerateColumns="False"
                    CanUserReorderColumns="True"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    HorizontalAlignment="Left"
                    MaxHeight="500"
                    cal:Message.Attach="[Event RowActivated] = [Action ChangeSelectedItem(Grid.SelectedItem)]"
                    >
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="ID" Width="60"
                            DataMemberBinding="{Binding Id}" TextAlignment="Right"/>
                        <telerik:GridViewDataColumn Header="Název obchodu" Width="160"
                            DataMemberBinding="{Binding Name}" />
                        <telerik:GridViewDataColumn Header="Typ obch." Width="100"
                            DataMemberBinding="{Binding TradeType}" />
                        <telerik:GridViewDataColumn Header="Produkt" Width="100"
                            DataMemberBinding="{Binding Product}" />
                        <telerik:GridViewDataColumn Header="Obchodník" Width="100"
                            DataMemberBinding="{Binding Trader.Name}" />
                        <telerik:GridViewDataColumn Header="Cílová kniha" Width="120"
                            DataMemberBinding="{Binding SellPortfolio.Name}" />
                        <telerik:GridViewDataColumn Header="Dod. bod" Width="85"
                            DataMemberBinding="{Binding DeliveryPoint.Name}" />
                        <telerik:GridViewDataColumn Header="Protistrana" Width="125"
                            DataMemberBinding="{Binding Partner.Name}" />
                        <telerik:GridViewDataColumn Header="Datum od" Width="100"
                            DataMemberBinding="{Binding StartDate}"
                            DataFormatString="{}{0:d}" TextAlignment="Right"/>
                        <telerik:GridViewDataColumn Header="Datum do" Width="100"
                            DataMemberBinding="{Binding EndDate}"
                            DataFormatString="{}{0:d}" TextAlignment="Right"/>
                        <telerik:GridViewDataColumn Header="Datum založení" Width="120"
                            DataMemberBinding="{Binding TradeDate}"
                            DataFormatString="{}{0:d}" TextAlignment="Right" />
                        <telerik:GridViewDataColumn
                            Header="Cena celkem" Width="165"
                            DataFormatString=""
                            DataMemberBinding="{Binding TotalPrice}"
                            CellTemplate="{StaticResource TotalPriceWithCurrency}"
                            />
                        <telerik:GridViewColumn Width="*" />
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
 
                <telerik:RadDataPager
                    x:Name="DataPager"
                    Grid.Row="1"
                    PageSize="50"
                    Source="{Binding Items, ElementName=Grid}"
                    IsTotalItemCountFixed="False"
                    DisplayMode="All"
                    AutoEllipsisMode="None"
                    NumericButtonCount="10"
                    Width="{Binding Path=ActualWidth,
                                    ElementName=Grid,
                                    Converter={StaticResource WidthConverter}}"
                    HorizontalAlignment="Center"
                    LostKeyboardFocus="DataPager_OnLostKeyboardFocus"
                />
            </Grid>
 
    </telerik:RadBusyIndicator>
     
</UserControl>


Thank you very much.
Karel Bem

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 15 May 2014, 02:48 PM
Hi Karel,

I've tried to reproduce the problem you report, but to no avail. I have prepared a sample project based on the code snippet you provided. You can find it attached. Please give it a try and let me know how it works on your side.

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
DataPager
Asked by
Karel
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or