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

Can cells in a column skip Tab

5 Answers 258 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kristjan Einarsson
Top achievements
Rank 1
Kristjan Einarsson asked on 09 Mar 2012, 11:48 AM
Hi,
I have a grid witch has frozen readonly columns, can I make them unselectable or not to accept tab, enter & mouseclick ?

Best regards
Kristján

5 Answers, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 12 Mar 2012, 08:51 AM
Hi,

With one of our internal builds we introduced a new property of GridViewColumn named TabStopMode which will be very helpful in scenarios like yours. This property is a flag enumeration with 4 possible values - Skip, StopInViewMode, StopInEditMode and Stop (default which combines the other two stop options). TabStopMode will become official with the upcoming service pack (in a couple of weeks).
You can handle mouse left button down event and focus another cell accordingly (depending on its frozen state). Since that Enter key navigates down or upwards there is no way to configure some custom behavior via GridViewColumn. I could suggest you to take a look at this blog post which shows how you can change the default keyboard command behavior.

I'm attaching a sample application that demonstrates TabStopMode and mouse left button click handler approaches.
Let me know if you need any further assistance.

All the best,
Nedyalko Nikolov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Kristjan Einarsson
Top achievements
Rank 1
answered on 12 Mar 2012, 10:22 AM
Thank you, this was what I was looking for :)

Best regards
kristján
0
Alan
Top achievements
Rank 2
answered on 26 Apr 2012, 05:37 PM
I am also needing this functionally, so I have installed the Hot Fix assemblies WPF_2012_1_0424_DEV_Hotfix.

You might get your Q/A team to test with the following XAML (or similar GridViewDataColumn.FooterCellStyle subsection ASAP

<telerik:GridViewDataColumn ....

                <telerik:GridViewDataColumn.FooterCellStyle>
                        <Style TargetType="telerik:GridViewFooterCell">
                            <Setter Property="ContentTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <TextBlock  Text="{Binding DataContext.Footer, StringFormat='{}{0:C}', RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}"
                                                    TextAlignment="Right"
                                                    Width="100" />
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </telerik:GridViewDataColumn.FooterCellStyle>
</GridViewDataColumn>

This is throwing an unhandled XamlParseException error at runtime.
0
Alan
Top achievements
Rank 2
answered on 15 May 2012, 04:52 PM
I am using what I believe is the most current release (7 May 2012 release date) RadControls_for_WPF_2012_1_0507.40
which invokes the following XAML:

        <telerik:RadGridView    x:Name="xRadGridView"
                                             ItemsSource="{Binding Source, Mode=TwoWay}"
                                             IsSynchronizedWithCurrentItem="True">

            <telerik:RadGridView.Columns>

                   <telerik:GridViewDataColumn Name="SourceColumnData"
                                                                 TabStopMode="StopInEditMode">
                    <telerik:GridViewColumn.CellEditTemplate>
                        <DataTemplate>
                            <TextBox   Text="{Binding SourceData, Mode=TwoWay}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

                <telerik:GridViewDataColumn TabStopMode="Skip"
                                                              DataMemberBinding="{Binding CalculatedData}" />

                <telerik:GridViewDataColumn DataMemberBinding="{Binding CalculatedData}" />

            </telerik:RadGridView.Columns>

The calculated data is begin performed in the ViewModel and is returned to the View as expected.

The cell with the TabStopMode of Skip is not displaying calculated data but the cell with with
OUT the TabStopMode property is displaying calculated data.

Any idea on how to display data in a cell while using that uses the tabstopmode property?

Thank you,
0
Nedyalko Nikolov
Telerik team
answered on 16 May 2012, 07:22 AM
Hello,

I've tried to simulate the issue unfortunately to no avail. I'm attaching my test application could you please let me know how to reproduce the issue with it (or send me a sample project which I can debug on my side)?
Thank you in advance.

Greetings,
Nedyalko Nikolov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Kristjan Einarsson
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Kristjan Einarsson
Top achievements
Rank 1
Alan
Top achievements
Rank 2
Share this question
or