Telerik Forums
UI for WPF Forum
2 answers
126 views
Hi,

I can not understand what is logical difference between Properties ItemsSource and SeriesMappings on a RadChart control.

I understand what ItemsSource is made for, but do not understand what SeriesMappings is made for?

Please help me to resolve this issue.

Regards
Sirum
Sirum
Top achievements
Rank 1
 answered on 22 Dec 2011
1 answer
88 views
I'm would like to use the Data Filter in unbound mode in my mvvm app. User uses the DataFilter to build the criteria, then clicks a button to perform the search. Cancel and clear buttons will also be provided to cancel a search in progress and to clear the datafilter of all filter descriptors.

Can I build my ItemPropertyDefinitions in the viewmodel and bind this collection to the control on the view? If so, what is the proper collection/property I need to use to get this to work.

Also how do I get the collection of filter descriptors back to the viewmodel so that it can create a query. I'm guessing my view needs some code behind to make this work properly.
Rossen Hristov
Telerik team
 answered on 22 Dec 2011
1 answer
159 views
Hi,

I have an issue regarding the display of items if ItemsPerPage is set to 2 and the carousel ItemSource have 2 items only. Yes it displayed the 2 items properly, however when I try to click the 2nd item, the first item is moved to the background (i.e. not displayed). And  when I tried to click again the 2nd item, my expected behavior is that the 1st item would show up but it doesn't.

Note: Vertical and Horizontal scroll bars are set to hidden because we don't want to use those.
Maya
Telerik team
 answered on 22 Dec 2011
1 answer
133 views
hello,

i do binding to tileview Position. in system loading i set positions to the objects and i want the items will be shown order by those positions.
if i'm using with itemsSource, it works fine.
but if i'm using with prism region, the items do not shown as well and some items hidden under other items.

is there any solution to this?
Tina Stancheva
Telerik team
 answered on 22 Dec 2011
1 answer
197 views
I have an application that has to run on multiple languages. The user can change the language on the fly at runtime. I really need a way to update the text in the group by header without reloading the entire gridview.

I have successfully set LocalizationManager.Manager to a new custom manager as below. The downside is that I have to reconstruct the gridview in code.


LocalizationManager.Manager = new TelerikGridViewCustomLocalizationManager();
 
...
 
class TelerikGridViewCustomLocalizationManager : LocalizationManager
    {
        public override string GetStringOverride(string key)
        {
            return MyLocalization.GetResource(key);
        }
    }


Is there any way to call an update or refresh on the gridview instead of creating a new one in code?

Thank you for the help.

Scott
Maya
Telerik team
 answered on 22 Dec 2011
1 answer
187 views
Hi
Please help me How to display date of telerik RadDatePicker date in the format : 'MM-dd-yy' (instead of the default format) inside a data bound column in ItemsControl.

Thanks
Kripa
Konstantina
Telerik team
 answered on 22 Dec 2011
2 answers
63 views
The same behavior we can see when we expand Rad Menu.

May be you also have solution for this problem.

Please, help us with this problem.

Licensing
Top achievements
Rank 1
 answered on 22 Dec 2011
3 answers
114 views
Hi, I'm dealing with a format issue in a CountFunction. Basically, we want to display the count of the rows as a result of a grouping. I do this in the Grouping and Grouped event as shown below:

private void gridView_Grouping(object sender, GridViewGroupingEventArgs e)
       {
                   var descriptor = e.GroupDescriptor as ColumnGroupDescriptor;
                   if (descriptor != null)
                   {                       
                                     
                  
                       var functions = descriptor.Column.AggregateFunctions;
                       if (functions.Count == 0)
                       {
                           functions.Add(new CountFunction());
                       }                 
                   }           
       }      
 
       private void gridView_Grouped(object sender, GridViewGroupedEventArgs e)
       {
           if (e.Action == GroupingEventAction.Remove)
           {
               ((ColumnGroupDescriptor)(e.GroupDescriptor)).Column.AggregateFunctions.Clear();
           }
       }


I'm sorry if the format is somewhat whacked. The result of the code is something like this, (in the group header)

Column A  5   5   5
       Column B  2   2   2
             Column C  3   3   3
     
When the desired format should be

Column A  5
     Column B  2
           Column C 3

What exactly is my code doing wrong? Is this by design?


Thanks,
Gio

Twistur
Top achievements
Rank 1
 answered on 21 Dec 2011
1 answer
81 views
I have a RadMap that has items added to an information layer. Sometimes these items overlap or they are in the exact same position making it impossible to click the item underneath. Is there support for finding all the items underneath a mouse click?
Andrey
Telerik team
 answered on 21 Dec 2011
6 answers
255 views
Hello,

I tried to use Savelayout/loadlayout to keep docking's layout, when in my wpf application i change "environment".
In my application I have different xaml page with each one contains a docking. And i load one or another with command in a ribbon.
Well, when an "environment" is unloaded, i'd like to keep the layout in order to redisplay it in the next control loading.

One of my environment is structured like this :
<UserControl x:Class="SphinxV6.Data.MC_Table"
    xmlns:win="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
    xmlns:v6="clr-namespace:SphinxV6" xmlns:v6Table="clr-namespace:SphinxV6.Data.Table"
    xmlns:v6Properties="clr-namespace:SphinxV6.Properties"
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
             xmlns:v6Ribbon="clr-namespace:SphinxV6.Ribbon" xmlns:toolselements="clr-namespace:SphinxV6.ToolsElements" xmlns:tabletoolselements="clr-namespace:SphinxV6.Data.Table.ToolsElements" Unloaded="UserControl_Unloaded"
             DataContextChanged="UserControl_DataContextChanged" Loaded="UserControl_Loaded">
 
    <Grid x:Name="root" DataContext="{Binding}" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
 
          <telerik:RadDocking x:Name="xDocking" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HasDocumentHost="true" Unloaded="RadDocking_Unloaded"
                            v6:RadDockingExtensions.SaveFloatingPane="True"
                            telerik:RadDocking.SerializationTag="xDocking" >
            <telerik:RadDocking.CompassStyle>
                <Style TargetType="{x:Type telerik:Compass}">
                    <Setter Property="IsCenterIndicatorVisible" Value="True"/>
                </Style>
            </telerik:RadDocking.CompassStyle>
 
            <telerik:RadDocking.DocumentHost>
                <win:WindowsFormsHost Name="windowsFormsHost1" />
            </telerik:RadDocking.DocumentHost>
 
            <telerik:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical" Width="250" telerik:RadDocking.SerializationTag="DockedLeft">
 
                <telerik:RadPaneGroup  telerik:RadDocking.SerializationTag="gVars">
                    <telerik:RadPane DataContext="{Binding DataContext.TE_Variables, ElementName=root}" Header="{Binding Title}" CanDockInDocumentHost="False" CanUserClose="False" ContextMenuTemplate="{x:Null}"
                                     telerik:RadDocking.SerializationTag="pVars">
                        <tabletoolselements:TE_VariablesControl />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
 
                <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="200,35" telerik:RadDocking.SerializationTag="gSample">
                    <telerik:RadPane DataContext="{Binding DataContext.TE_Samples, ElementName=root}" Header="{Binding Title}" IsHidden="{Binding DataContext.IsDockSampleVisible, ElementName=root, Mode=TwoWay, Converter={StaticResource convInverseBoolean}}" CanDockInDocumentHost="False" ContextMenuTemplate="{x:Null}"
                                     telerik:RadDocking.SerializationTag="pSample">
                        <toolselements:TE_SamplesControl />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="200,15" telerik:RadDocking.SerializationTag="gLang">
                    <telerik:RadPane DataContext="{Binding DataContext, ElementName=root}" Header="{x:Static v6Properties:Resources.languages}" CanDockInDocumentHost="False" CanUserClose="True" IsHidden="{Binding IsDockLangVisible, Mode=TwoWay, Converter={StaticResource convInverseBoolean}}" ContextMenuTemplate="{x:Null}"
                                     telerik:RadDocking.SerializationTag="pLang">
                        <StackPanel Margin="3" Orientation="Horizontal">
                            <v6:Ctrl_LangSelector ></v6:Ctrl_LangSelector>
                        </StackPanel>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>
</UserControl>

I make "pSample" pane floattable, and change environment, here's the layout saving (which seems to be ok, as far as i understand what saving should make):
<?xml version="1.0" encoding="utf-8"?><RadDocking SerializationTag="xDocking"><SplitContainers><RadSplitContainer SerializationTag="DockedLeft" Dock="DockedLeft" Width="250" Orientation="Vertical"><Items><RadPaneGroup SerializationTag="gVars" SelectedIndex="0"><Items><RadPane SerializationTag="pVars" IsDockable="True" Title="Variables" Header="Variables" CanUserClose="False" CanDockInDocumentHost="False" /></Items></RadPaneGroup><RadPaneGroup SerializationTag="gSample" RelativeWidth="200" RelativeHeight="35" SelectedIndex="-1"><Items /></RadPaneGroup><RadPaneGroup SerializationTag="gLang" RelativeWidth="200" RelativeHeight="15" SelectedIndex="-1"><Items><RadPane SerializationTag="pLang" IsHidden="True" IsDockable="True" Title="Langues" Header="Langues" CanUserClose="True" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer><RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="628" FloatingY="555" IsInOpenWindow="True" RelativeWidth="200" RelativeHeight="35" IsAutoGenerated="True"><Items><RadPaneGroup RelativeWidth="200" RelativeHeight="35" IsAutoGenerated="True" SelectedIndex="0"><Items><RadPane SerializationTag="pSample" IsHidden="False" IsDockable="True" Title="Strates" Header="Strates" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer></SplitContainers></RadDocking>

Now, I reload my environment, the layout is well reload (my psample still flotting at the right place).
I close the pSample pane (the binding boolean is well modified).
the saved layout seems not good, "psample" appears twice ! :
<?xml version="1.0" encoding="utf-8"?><RadDocking SerializationTag="xDocking"><SplitContainers><RadSplitContainer SerializationTag="DockedLeft" Dock="DockedLeft" Width="250" Orientation="Vertical"><Items><RadPaneGroup SerializationTag="gVars" SelectedIndex="0"><Items><RadPane SerializationTag="pVars" IsDockable="True" Title="Variables" Header="Variables" CanUserClose="False" CanDockInDocumentHost="False" /></Items></RadPaneGroup><RadPaneGroup SerializationTag="gSample" RelativeWidth="200" RelativeHeight="35" SelectedIndex="-1"><Items /></RadPaneGroup><RadPaneGroup SerializationTag="gLang" RelativeWidth="200" RelativeHeight="15" SelectedIndex="-1"><Items><RadPane SerializationTag="pLang" IsHidden="True" IsDockable="True" Title="Langues" Header="Langues" CanUserClose="True" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer>
<RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="649" FloatingY="514" IsInOpenWindow="False" RelativeWidth="200" RelativeHeight="35" IsAutoGenerated="True"><Items><RadPaneGroup RelativeWidth="200" RelativeHeight="35" IsAutoGenerated="True" SelectedIndex="-1"><Items><RadPane SerializationTag="pSample" IsHidden="True" IsDockable="True" Title="Strates" Header="Strates" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer>
<RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="649" FloatingY="514" IsInOpenWindow="False" RelativeWidth="200" RelativeHeight="35" IsAutoGenerated="True"><Items><RadPaneGroup RelativeWidth="200" RelativeHeight="35" IsAutoGenerated="True" SelectedIndex="-1"><Items><RadPane SerializationTag="pSample" IsHidden="True" IsDockable="True" Title="Strates" Header="Strates" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer></SplitContainers></RadDocking>

What's wrong ? And an other problem, is that  hidden floatting panes  appear on the next environment...
The workaround (you've preconise on other forum) is to use "removefromparent" function, but,
1. when i use the tip on "close pane event", then the next saving layout xml doesn't contain the "pSample" pane. (and i loose it last position)
or 2. if i remove after saving layout, i have further problem to re-display the pane (i should click several time on my check box) I obtain the following error :
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsDockSampleVisible; DataItem='TableEnvironment' (HashCode=18777961); target element is 'CheckBox' (Name='cbSamples'); target property is 'IsChecked' (type 'Nullable`1') TargetInvocationException:'System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.InvalidOperationException: L'élément possède déjà un parent logique. Il doit être détaché de l'ancien parent avant d'être attaché au nouveau.
   Ã  MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
   Ã  MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
   Ã  System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
   Ã  Telerik.Windows.Controls.RadPaneGroup.ShowSinglePane(RadPane pane)
   Ã  Telerik.Windows.Controls.RadPaneGroup.ShowPane(RadPane pane)
   Ã  Telerik.Windows.Controls.RadDocking.OnPaneShow(RadPane pane)
   Ã  Telerik.Windows.Controls.RadDocking.OnRadPaneShow(Object sender, StateChangeCommandEventArgs args)
   --- Fin de la trace de la pile d'exception interne ---
   Ã  System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   Ã  System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   Ã  System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   Ã  System.Delegate.DynamicInvokeImpl(Object[] args)
   Ã  System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   Ã  System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   Ã  System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   Ã  System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   Ã  System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   Ã  System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   Ã  Telerik.Windows.Controls.RadPane.OnShow(StateChangeCommandEventArgs args)
   Ã  Telerik.Windows.Controls.RadPane.Show()
   Ã  Telerik.Windows.Controls.RadPane.OnIsHiddenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   Ã  System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   Ã  System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   Ã  System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   Ã  System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   Ã  System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   Ã  System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
   Ã  System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   Ã  System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
   Ã  MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
   Ã  MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   Ã  MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
   Ã  MS.Internal.Data.PropertyPathWorker.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   Ã  System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   Ã  System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
   Ã  SphinxV6.EnvironmentBase.RaisePropertyChangedEvent(String sPropertyName) dans C:\dvlp\Project\WPF4\SphinxV6\_Common\Bases\EnvironmentBase.cs:ligne 1830
   Ã  SphinxV6.EnvironmentBase.set_IsDockSampleVisible(Boolean value) dans C:\dvlp\Project\WPF4\SphinxV6\_Common\Bases\EnvironmentBase.cs:ligne 73
   --- Fin de la trace de la pile d'exception interne ---
   Ã  System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   Ã  System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   Ã  System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   Ã  System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   Ã  System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   Ã  System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   Ã  MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   Ã  MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   Ã  System.Windows.Data.BindingExpression.UpdateSource(Object value)'

Well, all seems to behave as expected until i hide panes.
(in another control, i hide a pane which is in a radgroup (non flotting), but in the saved xml, the ishidden attribute stays at "false"., then when i reload the control, the pane is shown.)

Thanks for your future explanation.

Aurore

i use wpf, 2011.3.1116.35 version of telerik dll




Konstantina
Telerik team
 answered on 21 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?