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
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.
Nedyalko Nikolov
the Telerik team
Best regards
kristján
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.
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,
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.
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>