
I have following column amongst other columns:
...
<grid:GridViewDataColumn IsReadOnly="False" IsSortable="False" Header="Comment"
DataMemberBinding="{Binding Comment}" MaxWidth="250" IsResizable="False" >
<grid:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding Comment}" MaxLength="50" />
</DataTemplate>
</grid:GridViewDataColumn.CellEditTemplate>
</grid:GridViewDataColumn>
...
Issue:
When there is more than one row in the grid, editing of this cell can be ended in whatever way (by focusing on some other field, pressing enter... etc.) and the grid will retain the value entered. Such value will also be updated into the database by:
private
void radGridView1_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{...}
However, when there is only one row in the grid, pressing enter to end the cell edit works for retaining the value just entered for the cell but not triggering "CellEditEnded". Therefore, the value entered is not being put into the database...
Is there anyway someone help me with this?
Thanks for your time in advance,
K
| <Window x:Class="Telerik1.Window1" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
| xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
| Title="Window1" Height="600" Width="800" Loaded="ExampleControl_Loaded" Unloaded="ExampleControl_Unloaded"> |
| <Window.Resources> |
| <Style TargetType="{x:Type telerik:RadChart}"> |
| <Setter Property="telerik:Theming.Theme"> |
| <Setter.Value> |
| <telerik:VistaTheme/> |
| </Setter.Value> |
| </Setter> |
| </Style> |
| </Window.Resources> |
| <Grid> |
| <telerik:RadChart x:Name="RadChart1" /> |
| </Grid> |
| </Window> |
for (int i = 0; i < 1000; i++){ radTreeView.ScrollViewer.LineDown();}Hi,
I have the following combobox that I am trying to use essentially as an edit field and the dropdown list as a collection of predefined values that the user can select.
The problem is that the 'Clear' button in the dropdown list (that shows up due to the 'ClearSelectionButtonVisibility' property) does not always clear the text. It works fine if I select an item from the dropdown list before the clear, but if I type in text that does not match any of the items then it does nothing.
Best regards,
Pete
<telerik:RadRibbonComboBox
CanAutocompleteSelectItems="True"
CanKeyboardNavigationSelectItems="True"
ClearSelectionButtonVisibility="Visible"
EmptyText="Enter text"
FilteringMode="Contains"
IsEditable="True"
IsFilteringEnabled="True"
IsReadOnly="False"
ItemsSource="{Binding Source={x:Static local:Core.App}, Path=SummaryTextForAllGames, Mode=OneWay}"
MinWidth="250"
OpenDropDownOnFocus="True"
StaysOpenOnEdit="True"
Text="{Binding Path=Value, Mode=TwoWay}"
TextSearchMode="Contains"
VerticalAlignment="Center"
/>
<Window x:Class="TreeViewComparison.Window1" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" Title="Window1" Height="305" Width="627"> <Window.Resources> <HierarchicalDataTemplate x:Key="ItemTemplate" ItemsSource="{Binding SubItems}"> <TextBlock Text="{Binding Header}"/> </HierarchicalDataTemplate> <Style TargetType="telerik:RadTreeViewItem"> <Setter Property="IsExpanded" Value="True"/> </Style> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <telerik:RadTreeView x:Name="radTreeView" Grid.Row="0" IsVirtualizing="True" ItemTemplate="{StaticResource ItemTemplate}" /> <Button x:Name="buttonBreakpoint" Grid.Row="1" Margin="8" Content="Breakpoint" Click="buttonBreakpoint_Click" /> </Grid></Window>using System;using System.Collections.ObjectModel;using System.Windows;namespace TreeViewComparison{ /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); this.radTreeView.ItemsSource = GenerateItems(); } private ObservableCollection<DataItem> GenerateItems() { ObservableCollection<DataItem> result = new ObservableCollection<DataItem>(); for (int i = 0; i < 10; i++) { DataItem item = new DataItem(String.Format("Item {0}", i)); for (int j = 0; j < 100; j++) { item.SubItems.Add(new DataItem(String.Format("Item {0}.{1}", i,j))); } result.Add(item); } return result; } class DataItem { public DataItem(string header) { this.SubItems = new ObservableCollection<DataItem>(); this.Header = header; } public string Header { get; set; } public ObservableCollection<DataItem> SubItems { get; set; } } private void buttonBreakpoint_Click(object sender, RoutedEventArgs e) { } }}