Telerik Forums
UI for WPF Forum
3 answers
122 views
Hi!

I have a case where setting the IsHidden property to "false" expands the hidden pane, but does not draw the content.
When I then toggle the IsHidden property to true and fals again, the content is displayed correctly!

What can be the cause of this?

Regards,
Lennart
Konstantina
Telerik team
 answered on 06 Feb 2014
12 answers
915 views
I've seen a few examples -    most Silverlight  :-(     - where you bind the RadRichTextBox to an "item"-object or data from a DataBase.
But how could this be done to a RadRichTextBox.Document.
Say I get a datarow from a table and I want to create a new document with content/text from this datarow.

Missing User
 answered on 06 Feb 2014
4 answers
141 views
I am unable to get touch scrolling to work properly on my grid view.  When I scroll using the mouse everything works perfectly, but if I use a finger the scroll always jumps to either the first or last record in the list. 

Ideas/Suggestions?

D
David
Top achievements
Rank 1
 answered on 06 Feb 2014
5 answers
174 views

Hi, we're experiencing what looks like a bug in the RadDatePicker control.

I've set the culture in the App.xaml.cs file, and the DatePicker correctly displays the dates as intended:

/// <summary>
    /// The main application class.
    /// </summary>
    public partial class App
    {
        #region Constructor
        /// <summary>
        /// Initializes a new instance of <see cref="App" />.
        /// </summary>
        public App()
        {
            StyleManager.ApplicationTheme = new Windows8Theme();
            InitializeComponent();
 
            Windows8Palette.Palette.AccentColor = (Color)Resources["AccentColor"];
 
            ConfigureCulture();
        }
        #endregion
 
        #region Private Methods
        /// <summary>
        /// Configures the culture for the application.
        /// </summary>
        private static void ConfigureCulture()
        {
            // set the default culture to English (AU)
            // ReSharper disable UseObjectOrCollectionInitializer
            var culture = new CultureInfo("en-AU");
 
            // ReSharper restore UseObjectOrCollectionInitializer
            // long date format is used on date controls ("D")
            culture.DateTimeFormat.LongDatePattern = "ddd d-MMM-yyyy";
 
            // short date format is used in grids ("d")
            culture.DateTimeFormat.ShortDatePattern = "dd-MMM-yy";
 
            Thread.CurrentThread.CurrentCulture = culture;
            Thread.CurrentThread.CurrentUICulture = culture;
        }
        #endregion
    }

However when a user types in '25-9-13', as soon as they type the '9', the date is shown as  'Mon 1-9-2025' in the tooltip, ie, it suddenly flips the format to yy-mm-dd.

Note that this is not a problem in the corresponding Silverlight control - typing '25-9' correctly shows 'Wed 25-Sep-2013' in the tooltip.

Is this a bug, or something that we can resolve somehow?

Thanks

Sam
Konstantina
Telerik team
 answered on 06 Feb 2014
1 answer
110 views
Hi,
I have been working on a project with TreelistView and DragDropManager.
I have a treelistview and i want to drag and drop the items in it.
For example, my treelistview items are like that.

Main_1
- Sub 1_1
- Sub 1_2
Main_2
- Sub 2_1
- Sub 2_2
- Sub 2_3

and i want to drag (Sub 2_2) from (Main_2) to (Main_1). But i can't find the drop position of dragging item, and how can i use this drop position to find the item which dragging item is dropped on.

One more question:
var item = (args.OriginalSource as FrameworkElement).ParentOfType<???????>() -->> What is the correct type for treelistview.

a basic example could help me.
with kind regards








Nick
Telerik team
 answered on 06 Feb 2014
1 answer
159 views
Hi,

I'm having trouble with the IsHidden binding of my RadPanes. If I have 2 or more RadPanes within a RadPaneGroup and have their IsHidden properties bound to a static class boolean property, only 1 of the multiple panes within the RadPane group hides when I toggle the property from false to true.

All IsHidden bindings are working, there appears to be a bug when toggling the binding on more than one RadPane within a RadPaneGroup. 

I'm using library 2013.1.220.40.


XAML Example:
<telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
       <telerikDocking:RadPaneGroup>
 
           <!-- Modification Pane -->
            <TAS2DockingPanes:ModificationsPane x:Name="radPaneModifications" CanUserClose="False" CanDockInDocumentHost="False" IsHidden="{Binding Source={x:Static TAS2DockingPanes:VisibilitySettings.Instance}, Path=CanViewModificationsPane, Converter={StaticResource boolToReverseConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
 
            <!-- Pricing Pane -->
             <TAS2DockingPanes:ExtrasPricingPane x:Name="radPanePricingExtras" CanUserClose="False" CanDockInDocumentHost="False" IsHidden="{Binding Source={x:Static TAS2DockingPanes:VisibilitySettings.Instance}, Path=CanViewExtrasPricingPane, Converter={StaticResource boolToReverseConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
 
         </telerikDocking:RadPaneGroup>
</telerikDocking:RadSplitContainer>


Static Class
public class VisibilitySettings : INotifyPropertyChanged
{
    private static readonly VisibilitySettings instance = new VisibilitySettings();
    private VisibilitySettings() { }
 
 
    public static VisibilitySettings Instance
    {
        get
        {
            return instance;
        }
    }
 
 
    private static bool m_canViewExtrasPricingPane;
    private static bool m_canViewModificationsPane;
 
 
 
    public static void SetVisibilitySettings(bool canViewExtrasPricingPane, bool canViewModificationsPane)
    {
        Instance.CanViewExtrasPricingPane = canViewExtrasPricingPane;
        Instance.CanViewModificationsPane = canViewModificationsPane;
    }
 
    public bool CanViewExtrasPricingPane
    {
        get
        {
            return m_canViewExtrasPricingPane;
        }
        set
        {
            m_canViewExtrasPricingPane = value;
            OnPropertyChanged(new PropertyChangedEventArgs("CanViewExtrasPricingPane"));
        }
    }
 
 
    public bool CanViewModificationsPane
    {
        get
        {
            return m_canViewModificationsPane;
        }
        set
        {
            m_canViewModificationsPane = value;
            OnPropertyChanged(new PropertyChangedEventArgs("CanViewModificationsPane"));
        }
    }
 
 
    //INotifyPropertyChanged Event
    public event PropertyChangedEventHandler PropertyChanged;
    public void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
 
}


Has anyone else noticed such behaviour?


Many thanks,

Rob
George
Telerik team
 answered on 06 Feb 2014
1 answer
112 views
Hi,
I've a tree of files managed with a RadTreeView and I need to select a RadTreeViewItem and display its content on a RadDiagram with a drag and drop operation (in style of Visual studio)
How can I do this? I've already followed several tutorial on this web site without success.

Thanks
C
Tina Stancheva
Telerik team
 answered on 06 Feb 2014
2 answers
658 views
A picture is worth a thousand words, so I attach you my need.

Obvioulsy such image belong to the classical GridView incorporated by defaul on VS Studio 2012 stuff.

That's the XAML code for that:

<DataGridTemplateColumn Header="Actual" Width="80" Visibility="Visible">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <ProgressBar Value="{Binding Path=Stock_Actual, Mode=OneWay}" Minimum="0" Maximum="{Binding Stock_max}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
Thanks in advance for your help,
Enric
Top achievements
Rank 1
 answered on 06 Feb 2014
9 answers
267 views

Hi



I am creating AggregateFunctions code-behind (see example code below).  The CountFunction works but when I include a SumFunction the program crashes with the following error:



No generic method 'Sum' on type

'System.Linq.Enumerable' is compatible with the supplied type arguments. No type argiuments should be provided if the method is non-generic.   



I can only see two possible explanations:

1. I am not setting the AggregateFunction properties correctly.

2. Setting Grid.ItemsSource to ObservableCollection<dynamic>

This collections data is correct since is working correctly when not using AggregateFunctions.

Is a dynamically created class a problem?  The actual class properties are not dynamic but the actual system data types.



I am also using Grouping and it also works correctly.  To make sure that grouping was not the problem I eliminated the grouping but the program still crashes.


---- The following is being looped ----

GridViewDataColumn dataCol = new GridViewDataColumn();

dataCol.DataMemberBinding = new Binding(column.ColumnName);

dataCol.Header = column.ColumnName;

dataCol.UniqueName = column.ColumnName;

dataCol.DataType = Type.GetType(column.SystemDataType);

dataCol.FilterMemberType = Type.GetType(column.SystemDataType);

--- Hard coded to test AggregateFunctions

if (dataCol.UniqueName == "Uid")

{

 SumFunction sumFunction = new SumFunction();

 sumFunction.SourceField = "Uid";

        sumFunction.ResultFormatString = "Tot Uid: {0}";

        sumFunction.SourceFieldType = Type.GetType(column.SystemDataType);     // System.Int32

        dataCol.AggregateFunctions.Add(sumFunction);


}

--- End hard coding ---

grid.Columns.Add(dataCol);

---- End of Loop ----


grid.ShowColumnFooters = true;

grid.ShowGroupFooters = true;

grid.ItemsSource = new QueryableCollectionView(clientData.Result);

Crashed at this point setting the ItemsSource.

Before putting in the SumFunction code everything was working correctly!

clientData.Result is ObservableCollection<dynamic>



====================================

If you don't have the answer could you provide the code-behind to create AggregrateFunctions.  The following xaml snippet is from the WPF example Aggregates which is under the Grouping and Aggregates category.  In looking at numerous past posts of this problem I think it would be most helpful to many developers to take the aggregate example and define the grid properties in code-behind.  I would like to see a AggregateFunctions example that works using code-behind.



Thanks

Rich





<telerik:GridViewDataColumn Header="Freight"

           DataMemberBinding="{Binding Freight, StringFormat=c}">

                    <telerik:GridViewDataColumn.AggregateFunctions>

                        <telerik:SumFunction SourceField="Freight" ResultFormatString="Total: {0:c}" />

                    </telerik:GridViewDataColumn.AggregateFunctions>

 </telerik:GridViewDataColumn>






Richard Harrigan
Top achievements
Rank 1
 answered on 06 Feb 2014
3 answers
63 views
Hi Team,



I have a telerik pivot grid control with three levels to be diplayed in the pivot and the total of the items in one column,But am facing the issue here, where it displays the total correctly when it is expanded but when the pivot grid is collapsed it is showing another value as shown in the attachment..'

As shown in the image total is displaying correctly when expanded but when collapsed it is displaying double of total .Please help me out of this issue

Thanks,
Ruth
Rosen Vladimirov
Telerik team
 answered on 05 Feb 2014
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?