Telerik Forums
UI for WPF Forum
5 answers
259 views

Is there a way to  assign a keyboard shortcut to the rad expander so that when pressed, the rad expander will gain focus?

I am referring to both logical and keyboard focus.

For example, if I have 5 rad expanders on my form, and I am at the bottom of the form, I want to press alt+a on the keyboard to jump to the top of the form and bring focus to the address rad expander rather than having to tab several times to get back to the address rad expander.
 
I have the rad expanders in a child wpf user control which is within a window.
I have tried this syntax and it does not work:
FocusManager.SetFocusedElement(stpApplicantInformation, rxpAddressInformation)
 
In my xaml I have this:
Note: I have left out much of the xaml code but the stack panel contains 5 rad expanders and a submit button at the bottom.
<UserControl x:Class="AddressInformation"
...
<StackPanel Grid.Row="1"
                        Margin="0,0,0,0"
                        Name="stpApplicantInformation"
...
VerticalAlignment="Top" Focusable="True" 
                                     KeyboardNavigation.TabNavigation="Cycle" FocusManager.IsFocusScope="True"  Visibility="Visible">
...
<StackPanel.CommandBindings>
                    <CommandBinding Command="Help"
       CanExecute="JumpToAddress">
                    </CommandBinding>
                </StackPanel.CommandBindings>
                <StackPanel.InputBindings>
                    <KeyBinding Command="Help" Key="a" Modifiers="Alt"/>
                </StackPanel.InputBindings>
...
<!-- this rad expander I want to pressd alt+a and move keyboard and logical focus to it -->
<telerik:RadExpander Header="_Address Information"
                                     Name="rxpAddressInformation"
                                     Width="1000"
                                     Margin="0, 0, 0, 0"
                                     AllowDrop="False"
                                     Height="auto"
                                      TabIndex="1" Focusable="True" Visibility="Visible" >
                    <UserControl:Address x:Name="AddressInfo" Width="Auto" Height="Auto"></UserControl:Address>
                </telerik:RadExpander>
...
...
<Button X:Name="btnSubmit" ... />              
</StackPanel>
</UserControl>
What am I doing wrong here?
The JumpToAddress method is fired and is working but using FocusManager.SetFocusedElement(stpApplicantInformation, rxpAddressInformation) does not seem
to move keyboard focus to the address rad expander.
Help!
 
If I am on the submit button, and press alt+a I want to jump to the address rad expander.
Bill
    

Ivan
Telerik team
 answered on 04 Jan 2010
10 answers
213 views
Hello, i created some user control and it has telerik grid inside. Problem is with scrollbars - they dont appear automaticaly. even when grid has many columns. See my attached image.
My user control:
<UserControl x:Class="XSoftArt.WPFengine.BaseClasses.ListTemplate" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    > 
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
         
        <Menu Name="menu1" Height="54" VerticalAlignment="Top" Background="AliceBlue"
             
            <MenuItem Name="MenuItemReports" Background="AliceBlue" Click="MenuItemReports_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/reports.png" /> 
                        <ContentPresenter Content="Reports" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemExport" Background="AliceBlue" Click="MenuItemExport_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/export32x32xp.png" /> 
                        <ContentPresenter Content="Export" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemNewRecord" Background="AliceBlue" Click="MenuItemNewRecord_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/new32.png" /> 
                        <ContentPresenter Content="New record" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemEditRecord" Background="AliceBlue" Click="MenuItemEditRecord_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/edit32.png" /> 
                        <ContentPresenter Content="Edit record" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemDeleteRecord" Background="AliceBlue" Click="MenuItemDeleteRecord_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/delete32.png" /> 
                        <ContentPresenter Content="Delete record" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemSettings" Background="AliceBlue" Click="MenuItemSettings_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/settings32.png" /> 
                        <ContentPresenter Content="Settings" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemRecordHistory" Background="AliceBlue" Click="MenuItemRecordHistory_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/histrory32x32xp.png" /> 
                        <ContentPresenter Content="Record history" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemClose" Background="AliceBlue" Click="MenuItemClose_Click"
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/uzdaryti programa.png" /> 
                        <ContentPresenter Content="Close window" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
        </Menu> 
        <Grid Margin="0,54,0,0" Name="grid1" Height="43" VerticalAlignment="Top" Background="AliceBlue"></Grid> 
        <Grid Margin="0,96,0,0" Name="grid2" Height="36" VerticalAlignment="Top" Background="AliceBlue"
            <Label HorizontalAlignment="Left" Margin="5,7,0,-5" Name="label1" Width="85.223">Record count:</Label> 
            <Label HorizontalAlignment="Left" Margin="85,7,0,4" Name="labelRecordCount" Width="57">0</Label> 
            <dxe:CheckEdit HorizontalAlignment="Left" Margin="124,7,0,7" Name="checkEdit1" Width="72" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Checked="checkEdit1_Checked" Unchecked="checkEdit1_Unchecked">Select all</dxe:CheckEdit> 
            <Button Click="buttonDeleteSelected_Click" Background="AliceBlue" BorderThickness="2" HorizontalAlignment="Left" Margin="202,7,0,4" Name="buttonDeleteSelected" Width="89.183" FontSize="9">Delete selected</Button> 
            <Label HorizontalAlignment="Right" Margin="0,4,6,4" Name="labelSelectTime" Width="122" FlowDirection="RightToLeft">0</Label> 
            <Button HorizontalAlignment="Left" Margin="296.81,7,0,6" Background="AliceBlue" BorderThickness="2" Click="buttonSaveColumnLayout_Click" Name="buttonSaveColumnLayout" Width="125.743">Save column layout</Button> 
        </Grid> 
 
        <StackPanel Margin="0,58,149,0" Name="stackPanel1" Width="32" Height="32" HorizontalAlignment="Right" VerticalAlignment="Top"
            <Button Name="Button_ReloadData" Click="Button_ReloadData_Click" Background="AliceBlue" > 
                <Image Source="/XSoftArt.WPFengine;component/Images/reload32.png"></Image> 
            </Button> 
        </StackPanel> 
         
        <telerik:GridViewDataControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="dataGridView1" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Margin="1.425,134,0,0" /> 
         
    </Grid> 
</UserControl> 
 
My tabControl, of which content is this user control:
<telerik:RadTabControl Margin="0,91,0,-2.896" x:Name="tabControlR" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> 
Method, which fills tabItem content:
            RadTabItem tabItem = new RadTabItem(); 
            ListTemplate lst = new ListTemplate(); 
            
            lst.tabWindow = tabItem
            tabItem.Content = lst
            tabItem.Header = "Paieskos langas II"
            tabItem.Name = "tabPaieskosTestas"
            tabControlR.Items.Add(tabItem); 
How to make the grid to get scrollbars automatically in all dimensions, depending on the data and tab item measurements..? 
Kalin Milanov
Telerik team
 answered on 04 Jan 2010
1 answer
67 views
Hello,
I facing a issue with telerik Rad gridview version '2009.3.1103.35'.
After typing in cell of the gridview am pressing the tab key which will points to next cell but the
data is not getting visible in the first cell.
But if we type the data into a cell and click outside of the gridview, at that time it shows the data
correctly.
Could anyone help me in solving the tab key press problem.

Regards
Anju
Nedyalko Nikolov
Telerik team
 answered on 04 Jan 2010
1 answer
271 views
Hi,

I am in need of a custom aggregate function which is required to sum certain values based on some conditions. Can anyone give sample code for writing the custom aggregate function in WPF RadGrid?
Vlad
Telerik team
 answered on 04 Jan 2010
2 answers
150 views
Hi,

How can i achieve functionality of changing row background color acording to even/odd value of row number. In other words: I would like to have all even-number rows in color A and all odd-number rows in color B, starting from first row in group.

Regards,
MC.
Maciej Czerwiakowski
Top achievements
Rank 1
 answered on 04 Jan 2010
6 answers
159 views
We have installed Q2003 SP1, but we are now getting StackOverflow Exception in WindowsBase.dll each time with click a RadComboBox.

All are defined as below:

        <telerik:RadComboBox x:Name="InsurancePositionComboBox" IsEnabled="{Binding DataContext.IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" 
                           Grid.Row="4" Grid.Column="6" 
                           ItemsSource="{Binding DataContext.InsurancePositionItems,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" 
                           DisplayMemberPath="Name" 
                           SelectedValuePath="StakeholderId" 
                           SelectedValue="{Binding InsurancePositionId}" 
                           IsSynchronizedWithCurrentItem="True" Margin="10,0,0,0" Height="25" Width="170"
        </telerik:RadComboBox> 

Any idea ?
4ward s.r.l.
Top achievements
Rank 1
 answered on 03 Jan 2010
2 answers
137 views
In MS ListView I did like this to set color/brush on a row with sertial "Category" value.

 <Window.Resources> 
        <Style x:Key="ItemContStyle" TargetType="{x:Type ListViewItem}">  
            <Style.Resources> 
                <LinearGradientBrush x:Key="Brush1" StartPoint="0.5,0" EndPoint="0.5,1">  
                    <GradientStop Offset="0.1" Color="#AA00CC00" /> 
                    <GradientStop Offset="0.8" Color="#55008800" /> 
                </LinearGradientBrush> 
                  
        <LinearGradientBrush x:Key="Brush2" StartPoint="0.5,0" EndPoint="0.5,1">  
                    <GradientStop Offset="0.1" Color="Orange" /> 
                    <GradientStop Offset="0.8" Color="OrangeRed" /> 
                </LinearGradientBrush> 
 
            </Style.Resources> 
 
 
            <Style.Triggers> 
                  
                <DataTrigger Binding="{Binding Path=Category}" Value="1">  
                    <Setter Property="Background" Value="{StaticResource Brush1}" /> 
                    <Setter Property="Height" Value="25"/>  
                </DataTrigger> 
                  
                <DataTrigger Binding="{Binding Path=Category}" Value="2">  
                    <Setter Property="Background" Value="{StaticResource Brush2}" /> 
                    <Setter Property="Height" Value="30"/>  
                </DataTrigger> 
                  
                 
            </Style.Triggers> 
        </Style> 
 
    </Window.Resources> 

In Listview
 <ListView x:Name="listView1" ItemContainerStyle="{StaticResource ItemContStyle}">  
<ListView.View> 
<GridView> 
 <GridViewColumn Header="Artist" DisplayMemberBinding="{Binding Path=Artist}" Width="310" /> 
<GridViewColumn Header="Title" DisplayMemberBinding="{Binding Path=Title}" Width="310" /> 
</GridView> 
</ListView.View> 
 </ListView> 

How can I applay the same method on RadGridView?
Tsvyatko
Telerik team
 answered on 30 Dec 2009
1 answer
81 views
Two Questions

1 how can i Control over the Place of the splitter ?

2 i want to change the header line background color to white ?
Rossen Hristov
Telerik team
 answered on 30 Dec 2009
1 answer
162 views
can't find in the latest documentation how to bind datatable to the radgridview. .itemssource works , table gets rows added , call .rebind , grid scrolls but rows are added with no values (or at least not displayed) , also how do I get scroll bars...

is this release of ddls botched? or is it me?
Rossen Hristov
Telerik team
 answered on 30 Dec 2009
3 answers
102 views

selected_id = (

string)((DataRow)((DataRecord)this.radGridView_A1.SelectedRecord).Data)[0];

DataRecord is gone, any sugguestions, Also, don't understrand why telerik posts examples (as of 3 months ago ) of apis that will be obscolete, wtf?


 

Rossen Hristov
Telerik team
 answered on 30 Dec 2009
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?