or
mainGrid.CurrentCellInfo = new GridViewCellInfo(myObj, mainGrid.Columns["Description"]);I can verify that CurrentCellInfo has been properly set, however CurrentCell is always null. I'm trying to edit it programatically afterwards with:
mainGrid.Focus();
mainGrid.CurrentCell.BeginEdit();What could be wrong here?
<Button FontSize="12" Content="," />, however whenever I go over a font size of 12 the comma completely disappears. If someone has an alternative method of enlarging the comma display, would be very appreciative.
My xml code is below:Name is CountryList.xml<?xml version="1.0" encoding="utf-8" ?><Country><CountryName Name="Ashmore and Cartier Islands"/><CountryName Name="Australia"/><CountryName Name="Austria"/><CountryName Name="Bahamas"/><CountryName Name="Bahrain"/><CountryName Name="Bangladesh"/><CountryName Name="Barbados"/><CountryName Name="Bassas da India"/><CountryName Name="Belarus"/><CountryName Name="Belgium"/></Country>This is my Wpf XAML Code:<Window x:Class="WpfApplication8.MainWindow" Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Window.Resources> <XmlDataProvider x:Key="XmlData1" Source="DAL\CountryList.xml" XPath="Country"/> </Window.Resources> <Grid> <telerik:RadComboBox ItemsSource="{Binding Source={StaticResource XmlData1}, XPath=./CountryName}" DisplayMemberPath="@Name" IsEditable="True" IsFilteringEnabled="True" TextSearchMode="StartsWith" StaysOpenOnEdit="True" HorizontalAlignment="Left" Margin="164,100,0,0" Name="radComboBox2" VerticalAlignment="Top" Width="174"> </telerik:RadComboBox> </Grid></Window>="{StaticResource ico16}" in the code below:<telerik:RadGridView Grid.Column="1" Grid.Row="1" AutoGenerateColumns="False" DataContext="{Binding Grid}" ItemsSource="{Binding XPath=/Collection}" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" GridLinesVisibility="Horizontal" telerik:StyleManager.Theme="Windows7"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Width="*"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" > <Image Source="{Binding XPath=@Icon}" ToolTip="{Binding XPath=@Tooltip}" Style="{StaticResource ico16}" /> <TextBlock Text="{Binding XPath=@Key}" Foreground="Black" /> </StackPanel> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView><UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/MyAssemblyNameHere;component/Resources/MyResourceDictionary.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources><ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="ico16" TargetType="Image"> <Setter Property="Margin" Value="0 0 5 0" /> <Setter Property="Width" Value="16"/> <Setter Property="Height" Value="16"/> <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/> <Setter Property="Stretch" Value="UniformToFill"/> <Setter Property="VerticalAlignment" Value="Top"/> <Setter Property="HorizontalAlignment" Value="Left"/> </Style> </ResourceDictionary> <UserControl.Resources> <Path x:Key="horizontalPath" Stretch="None" Opacity="1" Data="M0,0 C0,0 0,800 0,800" Stroke="#FFB4B4B4" StrokeThickness="4"> </Path> <DataTemplate DataType="{x:Type local:Message}"> <telerik:CarouselScrollViewer CanContentScroll="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"><!-- putting in a header here stops the child panel from rendering correctly --> <telerik:RadCarouselPanel Loaded="RadCarouselPanel_Loaded" CanVerticallyScroll="False" TopContainerChanged="RadCarouselPanel_TopContainerChanged_1"> <Button Content="menu1"/> <Button Content="menu2"/> <Button Content="menu3"/> <Button Content="menu4"/> <Button Content="menu5"/> <Button Content="menu6"/> </telerik:RadCarouselPanel> </telerik:CarouselScrollViewer> </DataTemplate> <Style TargetType="{x:Type telerik:CarouselItem}"> <Setter Property="MaxHeight" Value="1000"/> <Setter Property="MaxWidth" Value="1000"/> <Setter Property="Height" Value="200"/> <Setter Property="Width" Value="400"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="telerik:CarouselItem"> <Border x:Name="mainBorder"> <Border Opacity="1" BorderBrush="#3F000000" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" Margin="10,10,10,10" x:Name="CarouselItemInnerBorder" SnapsToDevicePixels="True"> <Border.Background> <LinearGradientBrush EndPoint="101,462" StartPoint="101,13" MappingMode="Absolute"> <GradientStop Color="#FF2C3A68" Offset="0"/> <GradientStop Color="#FF000000" Offset="1"/> <GradientStop Color="#FF0F224C" Offset="0.045"/> <GradientStop Color="#FF000000" Offset="0.0451"/> </LinearGradientBrush> </Border.Background> <ContentPresenter IsHitTestVisible="True" /> </Border> </Border> <ControlTemplate.Triggers><!-- IsSelected does not appear to fire --> <Trigger Property="IsSelected" Value="True" > <Setter TargetName="CarouselItemInnerBorder" Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="108,472" StartPoint="108,23" MappingMode="Absolute"> <GradientStop Color="#FF344B97" Offset="0"/> <GradientStop Color="#FF000000" Offset="1"/> <GradientStop Color="#FF233F7E" Offset="0.045"/> <GradientStop Color="#FF000000" Offset="0.0451"/> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </UserControl.Resources> <Grid> <telerik:RadCarousel x:Name="radCarousel" AutoGenerateDataPresenters="False" Loaded="radCarousel_Loaded" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> <telerik:RadCarousel.ItemsPanel> <ItemsPanelTemplate> <telerik:RadCarouselPanel x:Name="radCarouselPanel" IsScalingEnabled="True" IsOpacityEnabled="False" CanHorizontallyScroll="False" TopContainerChanged="RadCarouselPanel_TopContainerChanged" > </telerik:RadCarouselPanel> </ItemsPanelTemplate> </telerik:RadCarousel.ItemsPanel> </telerik:RadCarousel> </Grid></UserControl>