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

tab and enter in RowDetailsTemplate

5 Answers 348 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Francois Lorrain
Top achievements
Rank 1
Francois Lorrain asked on 10 Jun 2010, 06:31 PM
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.

5 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 15 Jun 2010, 03:26 PM
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.
0
Ronald
Top achievements
Rank 1
answered on 07 Jul 2010, 01:14 PM

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

 

0
Nedyalko Nikolov
Telerik team
answered on 08 Jul 2010, 12:58 PM
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
0
leblanc
Top achievements
Rank 1
answered on 14 Oct 2010, 03:12 AM
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>
0
Yordanka
Telerik team
answered on 18 Oct 2010, 01:42 PM
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
Tags
GridView
Asked by
Francois Lorrain
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Ronald
Top achievements
Rank 1
leblanc
Top achievements
Rank 1
Yordanka
Telerik team
Share this question
or