Telerik Forums
UI for WPF Forum
6 answers
602 views
Following an example at http://www.telerik.com/help/wpf/gridview-how-to-set-current-cell.html, I set the current cell in my grid with the following:
mainGrid.CurrentCellInfo = new GridViewCellInfo(myObj, mainGrid.Columns["Description"]);
mainGrid.Focus();
I can verify that CurrentCellInfo has been properly set, however CurrentCell is always null.  I'm trying to edit it programatically afterwards with:
mainGrid.CurrentCell.BeginEdit();
What could be wrong here?
Maya
Telerik team
 answered on 28 Jan 2011
1 answer
116 views
Hi folks,

Yesterday I've faced with NullReferanceException of GridViewVirtualizingPanel.
 
Steps to reproduce:

Fast update of ItemsSource of data grid from small amount of data to the big ammount of data.

P.S. In my case it was a custom filter of the column that has been activated by checking/unchecking checkbox near the data grid.

How can I sand you the StackTrace of this issue ???

Best regards,
Julian Ustiyanovych
Yordanka
Telerik team
 answered on 28 Jan 2011
1 answer
122 views
I am writing a virtual keyboard for an alternative keyboard, and trying to make it look nice.

Commas and periods are fairly small, and I would like to make them bigger (without making the buttons they are displayed in bigger). My best shot was trying <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.
Tina Stancheva
Telerik team
 answered on 28 Jan 2011
1 answer
109 views
Attached to this thread you'll find a screenshot which demonstartes the problem: We habe for example 20 RadPanes on a RadPaneGroup and the RadPaneGroup's width is to small to display them all in one horizontal layer. We like display that many RadPanes which fit in the RadPaneGroup (depending on it's width), let's say 5 will fit in with theier orgin with. The other 15 which do not fit in should be displayed in the ContextMenu with the possibility to be selected. Any Idea how to achive that? BTW: We already tried the OverflowMode property, but this seems not to work.
Boyan
Telerik team
 answered on 28 Jan 2011
1 answer
105 views
Hello Telerik Team,
                              I have some problems using Radcombo box in our latest project.In my latest WPF project we are using telerik rad controls.
Here i have one combo box for adding country list.

In my project I am creating one folder name DAL.Inside DAL i am creating xml file(Named as CountryList.xml).
I am populating data from xml is completed.But editable,filtering everything was not working.

Mainly the selected item not display on combo box when iseditable=True;Pls give me correct solution for us.

i have attaced sample code here.
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>
Pls suggest me as soon as possible.
Konstantina
Telerik team
 answered on 28 Jan 2011
1 answer
155 views
Hi,

How can we capture the click event on the column header of the RadGrid in wpf while performing a multiple column sorting through C# ?
Shinu
Top achievements
Rank 2
 answered on 28 Jan 2011
1 answer
89 views
Hi

I want to know, How can capture the Event and the ColumnHeader Name while clicking on ColumnHeader.  I am trying to achieving multicolumn sorting through programming in which server interaction also their.
Shinu
Top achievements
Rank 2
 answered on 28 Jan 2011
1 answer
464 views
I'm trying to apply a style to an image inside a DataTemplate, but it doesn't seem to work. It works fine if the style is applied to an image outside the RadGridView.

Here's the xaml for the RadGridView, and I'm refering to Style="{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>

On the same VIEW where the code above resides, there's a link to a resource dictionary where the style is defined:

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/MyAssemblyNameHere;component/Resources/MyResourceDictionary.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>

The style is defined on a ResourceDictionary as follows:

                    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>

Any help is greatly appreciated.
YYZRichard
Top achievements
Rank 2
 answered on 28 Jan 2011
4 answers
356 views
I have two columns in my grid that are calculated using other columns.  Because I need the totals for my database update, I decided to do the calculations in my view model and set the property as changed when these values are updated.  This works perfectly in edit mode.  If I modify my price, the new value gets updated and displays in the grid correctly.  However, I am getting different results for a new record.  If I leave the value column as read only, the display never gets updated even though the value field in my view model is correctly updated.  If I take off the read only setting on the value column, the display does update but only if I give that column focus.  I don't have to do this in Edit mode so I am not sure how to fix this for insert mode.

thanks!
Koren
Top achievements
Rank 1
 answered on 27 Jan 2011
3 answers
203 views
Hi,
I am using the carousel control to implement a media center like menu for my application. The main menu items should scroll vertically with the current item in the centre and the sub items should then appear below it and be chooseable. The priority is on easy keyboard navigation.

The problems I am facing are:

1) Styling the carousel seems to be incredibly difficult. Just having the main menu item description with a list of sub items is even difficult to do. Adding additional elements to the data template seems to stop the sub items from rendering.

2) Keyboard navigation does not work correctly. I'd like the main menu to scroll on Up / Down and the sub menu to scroll on Left / Right. Unfortunately, only the currently focused carousel panel will scroll and it then scrolls on all arrow key presses.

The control seems to have such a steep learning curve that I'm tempted to ditch it and write my own custom control - albeit without some of the nice scrolling effects that your control brings.

I've attached my attempt below, it is based on a sample I saw on this site. Any help would be appreciated.

    <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>
Milan
Telerik team
 answered on 27 Jan 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?