Can cells in a column skip Tab

6 posts, 1 answers
  1. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 09 Mar 2012 Link to this post

    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
  2. Answer
    Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 12 Mar 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 12 Mar 2012 Link to this post

    Thank you, this was what I was looking for :)

    Best regards
    kristján
  5. Alan
    Alan avatar
    32 posts
    Member since:
    Jan 2011

    Posted 26 Apr 2012 Link to this post

    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.
  6. Alan
    Alan avatar
    32 posts
    Member since:
    Jan 2011

    Posted 15 May 2012 Link to this post

    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,
  7. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 16 May 2012 Link to this post

    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 >>

Back to Top
UI for WPF is Visual Studio 2017 Ready