tab and enter in RowDetailsTemplate

6 posts, 0 answers
  1. Francois Lorrain
    Francois Lorrain avatar
    7 posts
    Member since:
    Apr 2010

    Posted 10 Jun 2010 Link to this post

    1 - When I edit controls into RowDetailsTemplate, I cannot go to next control using TAB. The focus go to the next Cell.
    2 - When I hit enter in Textbox with acceptsenter="true", the focus go to the next column.
    3 - Is it possible to have a cell multiline edit?

    Thanks for you answer.
    Francois Lorrain.
  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 15 Jun 2010 Link to this post

    Hello Francois Lorrain,

    Straight onto your questions:

    1 & 2. Indeed RadGridView handles TAB key and by default sets focus to the next cell. So the only option is to override TAB key behavior, unfortunately I cannot give you a workaround with the current version of RadGridView.
    I'm attaching a sample application that demonstrates how to take control over TAB key (CustomKeyboardProvider class). This feature is in our TODO list ("Tab navigation inside RowDetails"), but I cannot commit with any specific date or release when it will be ready.

    3. You can use GridViewDataColumn.EditorStyle property in order to achieve this. Take a look at the attached application (Name column -> Enter into edit mode -> Enter -> adds another row, Ctrl + Enter -> commits).

    All the best,
    Nedyalko Nikolov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Ronald
    Ronald avatar
    3 posts
    Member since:
    Jan 2010

    Posted 07 Jul 2010 Link to this post

    I used the attached sample project to get multiline editing in silverlight 3.
    However after upgrading to silverlight 4 and the telerik 2010.1.603.1040, this sample isn't working any more. I get the following error:

    Value cannot be null.Parameter name: defaultStyleKey

    at Telerik.Windows.Controls.Theme.GetResourceValue(Type defaultStyleKey, Theme theme, Theme controlTheme) in c:\Builds\WPF_Scrum\Release_SL_2010_Q1_SP2\Sources\Development\Core\Controls\Common\Theme.cs:line 246 at Telerik.Windows.Controls.Theme.GetThemeStyle(Theme oldTheme, Type defaultStyleKey) in c:\Builds\WPF_Scrum\Release_SL_2010_Q1_SP2\Sources\Development\Core\Controls\Common\Theme.cs:line 223 at Telerik.Windows.Controls.StyleManager.OnBasedOnChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_SL_2010_Q1_SP2\Sources\Development\Core\Controls\Common\StyleManager.cs:line 147 at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_SL_2010_Q1_SP2\Sources\Development\Core\Controls\Common\System.Windows\PropertyMetadata.cs:line 200 at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue) at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation) at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet) at Microsoft.Expression.Platform.Silverlight.SilverlightDependencyPropertyImplementation.SetValue(Object target, Object valueToSet) at Microsoft.Expression.DesignModel.Metadata.DependencyPropertyReferenceStep.SetValue(Object target, Object valueToSet) at Microsoft.Expression.DesignModel.Core.InstanceBuilderOperations.SetValue(Object target, IProperty propertyKey, Object value) at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.ModifyValue(IInstanceBuilderContext context, ViewNode target, IProperty propertyKey, Object value, PropertyModification modification) at Microsoft.Expression.DesignModel.InstanceBuilders.DependencyObjectInstanceBuilderBase`1.ModifyValue(IInstanceBuilderContext context, ViewNode target, IProperty propertyKey, Object value, PropertyModification modification) at Microsoft.Expression.Platform.Silverlight.InstanceBuilders.DependencyObjectInstanceBuilder.ModifyValue(IInstanceBuilderContext context, ViewNode target, IProperty propertyKey, Object value, PropertyModification modification) at Microsoft.Expression.Platform.Silverlight.InstanceBuilders.StyleInstanceBuilder.ModifyValue(IInstanceBuilderContext context, ViewNode target, IProperty propertyKey, Object value, PropertyModification modification) at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.UpdateProperty(IInstanceBuilderContext context, ViewNode viewNode, IProperty propertyKey, DocumentNode valueNode)

    It seems this code is causing this error:

     

    <

     

     

    Style x:Key="customTextBoxStyle" telerikControls:StyleManager.BasedOn="TextBox" TargetType="TextBox">  

     

     

     

        <Setter Property="AcceptsReturn" Value="True" />  

     

    </Style

     

     

    Can you give me a hint how to fix this.

    Thanks,
    Ronald

     

  5. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 08 Jul 2010 Link to this post

    Hi Ronald Auwens,

    I've managed to reproduce the issue. You have two options how to fix it:

    1. You can delete "telerikControls:StyleManager.BasedOn="TextBox"" and you will get text box that accepts return as an editor for GridViewCell. Unfortunately this text box will not be styled according to grid's theme.

    2. You can use CellEditTemplate feature of GridViewDataColumn.

    I'm attaching a modified version of the previous example that demonstrates both approaches.

    Best wishes,
    Nedyalko Nikolov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. leblanc
    leblanc avatar
    56 posts
    Member since:
    Aug 2010

    Posted 13 Oct 2010 Link to this post

    I'm using a TextBox in RowDetailsTemplate.
    How to make this TextBox multiline?
    When I click Enter it goes to next row.

    <DataTemplate x:Key="RowDetailsTemplate">
        <telerikNavigation:RadTabControl>
            <telerikNavigation:RadTabItem>
                <telerikNavigation:RadTabItem.Header>
                    <StackPanel Orientation="Horizontal" IsHitTestVisible="False">
                        <TextBlock Text="Test"/>
                    </StackPanel>
                </telerikNavigation:RadTabItem.Header>
                <telerikNavigation:RadTabItem.Content>
                    <Grid HorizontalAlignment="Left" Width="600" Height="300">
                        <TextBox Text="{Binding Name, Mode=TwoWay}" AcceptsReturn="True" />
                    </Grid>
                </telerikNavigation:RadTabItem.Content>
            </telerikNavigation:RadTabItem>
        </telerikNavigation:RadTabControl>
    </DataTemplate>
  7. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 18 Oct 2010 Link to this post

    Hi leblanc,

    Can you try our Q2 2010 SP2 binaries (version .0924) ? We tested your scenario and everything works as expected on our end.

    Sincerely yours,
    Yordanka
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner