Telerik Forums
UI for WPF Forum
4 answers
84 views
Hi,
the docking control has a big gap between the container and content.. is there a way to remove the gap? or is this an aware bugs?
thanks
ronald
Top achievements
Rank 1
 answered on 17 Jan 2011
4 answers
122 views
When I open an PrintPreviewDialog all works well, but...

...when I change the column-order by dragging a column to an other place, opening of the Printpreview gives an:
System.ArgumentOutOfRangeException: GridViewDataControl_ColumnDisplayIndexOutOfRange.

The same happens in your "RadControls for WPF-Demo":  GridView/WPF/Printing:
Change the column-order and click "printpreview".
Paul
Top achievements
Rank 1
 answered on 17 Jan 2011
1 answer
141 views
Good evening,
I am implementing a drag and drop between two grids, which works fine and drags and drops great.
however, when I do the first drag and drop I get this error:
System.NullReferenceException occurred
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls
  StackTrace:
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.StartDragging() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 1083
  InnerException: 

The error occurs once and when I continue running the code the next drag and drops works great.
I am doing the drag and drops from a dialog window invoked from within the software.
I am using Q2 SP1 release.
Please help,
Eylon


Tsvyatko
Telerik team
 answered on 17 Jan 2011
2 answers
106 views
I have a [Add] button, clicking of which will call gridview.BeginInsert();
But with many pages, user has to go to the last page to enter  data for the new row to be inserted.

How can I do it from code-behind?

Thanks
gureumi
Top achievements
Rank 1
 answered on 17 Jan 2011
2 answers
83 views
Hi, I am trying to write a behavior for a radcarousel panel such that when the top most item gets a MouseEnter event a state is activated.  However, the TopContainer property always comes up as null.  Is this because the TopContainer property is not set at this point?  Below is the line of code I am running.

this.AssociatedObject.TopContainer.MouseEnter += new MouseEventHandler(TopContainer_MouseEnter);

Thanks,
Adam Burdette
Adam
Top achievements
Rank 1
 answered on 17 Jan 2011
11 answers
442 views
ok, my app have some usercontrols that contains Radgrid, Radtreewiew, Radmenu and other Telerik controls.

How do I easy set Theme for all controls, by code (so I can alow the user to chenge) or by XAML ?
Waleed Seada
Top achievements
Rank 2
 answered on 17 Jan 2011
3 answers
556 views
I am porting an existing WPF application to MVVM pattern and I am using the RadTreeView.  I am dynamically populating the Items collection at runtime of the RadTreeViewItem depending on whether a user has selected a Category node or a Object node. 

In a MVVM pattern, I am unsure of how to do this while preserving the state of the Treeview (selected, what is expanded).   So what would I do in the ViewModel and View to have this work?  Would I have to create a class that would emulate the Items collection? How do I preserve the state?

So I might have something like this:

Divisions
   --- AFC West (Category)
   --- AFC South (Category)
   ------ Colts (Object)
   ----------QBs (Category)
   -------------Peyton Manning  (Object)
   -------------Curtis Painter (Object)

   
Tina Stancheva
Telerik team
 answered on 17 Jan 2011
1 answer
322 views
Is there a way to cancel the selection of a RadComboBox?  The combobox selected item is bound to several other controls.  I was able to change the selected value and then change it back, but that has some other undesired effects.  I want to cancel the select before the selected item of the combo changes.
Valeri Hristov
Telerik team
 answered on 17 Jan 2011
1 answer
286 views
Hello,

Currently we're using a ListCollectionView to filter the items in the carousel. After I refresh the ListCollectionView I call BringDataitemIntoView(NameOfMyView.CurrentItem) with the carousel. But it isn't bringing the first item in the collection into view. I was wondering if you had any ideas on what I'm doing wrong? Below is a simple example of what I'm hitting.

Also I noticed if we type in 10, 11, 12, 13, or 14 it doesn't scroll anything into view.

I'm using versions 2010.3.1110.35 and 2010.1.603.35 (in an already released product)


<Window
    x:Class="CarouselTest2.MainWindow"
    xmlns:local="clr-namespace:CarouselTest2"
    Title="MainWindow" Height="350" Width="525">
     
    <Window.Resources>
         
        <DataTemplate DataType="{x:Type local:Item}">
            <Border BorderBrush="Black" BorderThickness="2" CornerRadius="5">
                <Grid>
                    <Label Content="{Binding Path=Value}" />
                </Grid>
            </Border>
        </DataTemplate>
         
    </Window.Resources>
     
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>       
         
        <TextBox x:Name="txtBox" Grid.Row="0" TextChanged="TextBox_TextChanged" />
         
        <telerik:RadCarousel
            x:Name="Carousel"
            Grid.Row="1"
            Focusable="False"
            AutoGenerateDataPresenters="False"
            HorizontalScrollBarVisibility="Hidden"
            VerticalScrollBarVisibility="Visible">
            <telerik:RadCarousel.ItemsPanel>
                <ItemsPanelTemplate>
                    <telerik:RadCarouselPanel
                        ItemsPerPage="7"
                        IsOpacityEnabled="False"
                        PathPadding="0">
                        <!--<telerik:RadCarouselPanel.Path>
                            <Path Stretch="Fill">
                                <Path.Data>
                                    <LineGeometry StartPoint="0, 800" EndPoint="0, 10" />
                                </Path.Data>
                            </Path>
                        </telerik:RadCarouselPanel.Path>-->
                    </telerik:RadCarouselPanel>
                </ItemsPanelTemplate>
            </telerik:RadCarousel.ItemsPanel>
        </telerik:RadCarousel>
 
    </Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections;
 
namespace CarouselTest2
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        ListCollectionView view;
 
        public MainWindow()
        {
            InitializeComponent();
 
 
            List<Item> Items = new List<Item>();
            for (int i = 0; i < 150; i++)
            {
                Items.Add(new Item(i));
            }
 
            view = new ListCollectionView(Items.ToList());
            view.Filter = new Predicate<object>(FilterObject);
            this.Carousel.ItemsSource = view;
        }
 
        private bool FilterObject(object itemToFilter)
        {
            if (itemToFilter == null)
                return false;
 
            String filterText = this.txtBox.Text.ToUpper();
             
            if (filterText.Length == 0)
                return true;
             
            return ((itemToFilter as Item).Value.ToString().Contains(filterText));
 
        }
 
        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            this.view.Refresh();
            this.Carousel.BringDataItemIntoView(this.view.CurrentItem);
             
        }
    }
 
    public class Item
    {
        public Item(int i)
        {
            this.Value = i;
        }
 
        public int Value { get; set; }
    }
 
}

Thanks Much,
~Boots
Yordanka
Telerik team
 answered on 17 Jan 2011
1 answer
46 views
The following code works perfectly in version 1304 and previous builds

<telerik:GridViewDataColumn DataMemberBinding="{Binding Period}" Header="Period">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding PeriodFormatted}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                    <telerik:GridViewColumn.CellEditTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Path=PeriodFormatted, Mode=TwoWay}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

where in the viewmodel Period is a simple DateTime property and PeriodFormatted is a specially formatted string representation of the Period.

public string PeriodFormatted
       {
           get { return Period.PeriodToString(); }
           set
           {
               Period = value.StringToPeriod(ContractHeader.Date);
               SendPropertyChanged("PeriodFormatted");
           }
       }

Up to v.1304 when adding a new row, the value supplied by the GridView to the textbox in the cell edit template is a string value, but in v1314 the value supplied to the textbox is a DateTime value. When editing an existing row, the value supplied to the textbox is a string value.

I have had to revert to version 1304, since this new behaviour has completely broken my entire application!

You guys also made a change a few versions ago to the behaviour of the Enter key in the GridView. The form has a button set to IsDefault=true. Up until a few versions ago (I can't remember exactly which), pressing Enter in the GridView would commit the edit and pressing Enter again would be consumed by the button on the form. In the latest versions, pressing Enter in the GridView is no longer consumed by the grid, but by the form button.

So instead of comitting the line details with Enter, the form re-loads the original data! I have worked around this simply by removing the IsDefault=true from the form button, but it now needs the user to select the button with the mouse.

Is there any way to get back to the previous behaviour?

I think your products are marvellous and I use a number of your controls extensively throughout my projects. However, it is VERY frustrating when you break behaviour from previous builds - and the readme does not clearly state what has broken.

Regards
Jeremy
Nedyalko Nikolov
Telerik team
 answered on 17 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?