Telerik Forums
UI for WPF Forum
1 answer
129 views
Hi

Let's say I have a bar-chart with two bar series. An AxisX (Product categories) and Cost and Sales (on the same AxisY).
On ItemClick event I'd like to determine which bar the user clicks. Cost or Sales?
I can find X and Y values from event args but I cannot determine if it is the Cost-bar or Sales-bar.

How can I do this?
Evgenia
Telerik team
 answered on 30 Sep 2010
2 answers
102 views
Hi,

I have some functionality that sets up the grouping in a grid with some code. I create a GroupDescriptor and add it to the grid's GroupDescriptors. However, when I group this way, rather than by dragging a header into the group panel, the aggregate functions defined in my GridViewDataColumns are not applied. 

I'm guessing that I have to manually add all these aggregate functions to my group descriptor. However, I wanted to check if there is an easier way.

Thanks!
Geoff Smith
Top achievements
Rank 1
 answered on 30 Sep 2010
2 answers
137 views

I would need to use activeX control to open swf files inside application. It works without problems when doesn´t use RadDocking. But when I use RadDocking, activeX control won´t display.

I tried to use another ActiveX cntrols and it doesn´t work always when using RadDocking. Does anybody know please how to solve it?

My sample code:

MainWindow.xaml

<Window xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
        xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"       
        x:Class="TelerikDocking.MainWindow"
         
        Title="MainWindow" Height="350" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <telerikDocking:RadDocking Grid.Column="1"
                                   VerticalAlignment="Stretch"
                                   HorizontalAlignment="Stretch"
                                   telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True">
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadDocumentPane Header="Preview" x:Name="pane_preview_"  Title="Preview">
                        <Border x:Name="telerik_border"
                                BorderBrush="Black"
                                Background="Transparent"
                                ClipToBounds="True"
                                BorderThickness="1.5" />
                    </telerikDocking:RadDocumentPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadDocking.DocumentHost>
            </telerikDocking:RadDocking>
         
            <Border x:Name="border" Grid.Column="0" />
    </Grid>
</Window>

MainWindow.xaml.cs

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.Windows.Forms.Integration;
using System.IO;
 
namespace TelerikDocking
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            WindowsFormsHost host = new WindowsFormsHost();
            FlashPlayer player = new FlashPlayer();
            player.LoadMovie(Directory.GetCurrentDirectory() + "\\00.swf");
            host.Child = player;
            border.Child = host;
 
            WindowsFormsHost host2 = new WindowsFormsHost();
            FlashPlayer player2 = new FlashPlayer();
            player.LoadMovie(Directory.GetCurrentDirectory() + "\\00.swf");
            host.Child = player2;
            telerik_border.Child = host2; 
        }
    }
}

FlashPlayer.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace TelerikDocking
{
    public partial class FlashPlayer : UserControl
    {
        public FlashPlayer()
        {
            InitializeComponent();
            axShockwaveFlash1.Dock = DockStyle.Fill;
            axShockwaveFlash1.IsAccessible = false;
            axShockwaveFlash1.EmbedMovie = false;
            axShockwaveFlash1.Playing = false;
        }
 
        public void LoadMovie(string strPath)
        {
            axShockwaveFlash1.LoadMovie(0, strPath);           
        }  
    }
}

Miroslav Nedyalkov
Telerik team
 answered on 30 Sep 2010
4 answers
201 views
Hello,

I am looking for the following functionality
I have two treeviews which are bound to two different collections. I want that when I drag the item from one treeview to another it (the item) should move to the other treeview in the hierarchy level I drop it to, with the drag effect .
Can this be achieved ?
Any code sample will be helpful.


Ryan Black
Top achievements
Rank 1
 answered on 29 Sep 2010
6 answers
375 views
How can I get the values of the row selected in the child grid of a hierachical grid.

My hierarchical GridView is bound to the results of an OData service:
ApprovalRequests
..Approvals

In a button click event I want to access the selected values.
Milan
Telerik team
 answered on 29 Sep 2010
1 answer
88 views
I have a RadtreeView that is already populated and a RadgridView on the same window. I want to drag a node from the tree to a particular (row/column) cell in the RadGridView. I have a few qiestions:

1 ----> Is this possible? (as I have not done this before)
2 ----> Should I be setting the whole grid to accept drops or just the cells individually?
3 ----> How do write the binding in the xaml if I am going to drop a treenode into the cell ?
4 ----> What are the major event handlers that I should be concerned with no both the tree side (while dragging the node) and the RadGrid side (while dropping the node) ?

Eagerly awaiting your reply. Thanks.
Tsvyatko
Telerik team
 answered on 29 Sep 2010
3 answers
68 views
Hi!

For a project I've to have a list where we can insert new element but never delete/edit previous elements.

Have you an idea about how to do this with the RadGridView?

Thank you :)
Nikolai Hellwig
Top achievements
Rank 1
 answered on 29 Sep 2010
2 answers
166 views
Hello,

I am new at telerik-controls and trying to show some grid entrys with details (master-entry-shema).
My project includes an ObservableCollection. The items of the ObservableCollection are shown in the GridView. The ObservableCollection includes another ObservableCollection that should be shown in the HierarchyChildTemplate. But that don't works.

XAML:
<Window x:Class="Grobplanung.Window1"
    xmlns:telctrl="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:telnav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikData="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"
    Title="Window1" Height="768" Width="1024" Loaded="Window_Loaded">
 
    <DockPanel LastChildFill="False">
        <telnav:RadToolBar Height="30" Name="radToolBar1"
                           DockPanel.Dock="Top"/>
        <telnav:RadMenu Name="radMenu1"
                        DockPanel.Dock="Top">
            <telerik:RadMenuItem Name="mnuDatei" Header="Datei">
                <telerik:RadMenuItem Name="mnuBeenden" Header="Beenden">
                </telerik:RadMenuItem>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Name="mnuBearbeiten" Header="Bearbeiten"/>
            <telerik:RadMenuItem Name="mnuExtras" Header="Extras"/>
            <telerik:RadMenuItem Name="mnuHilfe" Header="Hilfe"/>
        </telnav:RadMenu>
 
 
        <telerik:RadGridView Name="mainGV"
                             DockPanel.Dock="Top"
                             AutoGenerateColumns="False">
 
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition>
 
                </telerik:GridViewTableDefinition>
            </telerik:RadGridView.ChildTableDefinitions>
 
 
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding VorgangsNr}"
                                            Header="Auftrags-Nr." />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding KundenNr}"
                                            Header="Kunden-Nr." />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Kundenname}"
                                            Header="Kundenname" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ArtikelNr}"
                                            Header="Artikel-Nr."/>
            </telerik:RadGridView.Columns>
 
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView ItemsSource="{Binding Details}" Name="childGrid" ShowGroupPanel="False">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Artikelbezeichnung}" Header="Artikelbezeichnung"/>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Auftragsart}" Header="Auftragsart"/>
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
             
        </telerik:RadGridView>
    </DockPanel>
</Window>


class Auftragsdaten

class Auftragsdaten : INotifyPropertyChanged
 
{
    public Auftragsdaten()
    {
        Details = new ObservableCollection<Details>();
    }
 
    public ObservableCollection<Details> Details;
    public void AddDetails(string pArtikelbezeichnung, string pAuftragsart)
    {
        Details.Add(new Details() { Artikelbezeichnung = pArtikelbezeichnung, Auftragsart = pAuftragsart });
    }
...............


class Details

class Details
{
    public string Artikelbezeichnung;
    public string Auftragsart;
}


code behind the window

public partial class Window1 : Window
{
    private ObservableCollection<Auftragsdaten> _colDaten;
 
    public Window1()
    {
        InitializeComponent();
    }
 
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        _colDaten = new ObservableCollection<Auftragsdaten>();
 
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 1, ArtikelNr = "47110", KundenNr = "1000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 2, ArtikelNr = "47110", KundenNr = "1000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 3, ArtikelNr = "47113", KundenNr = "2000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 4, ArtikelNr = "47114", KundenNr = "2000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 5, ArtikelNr = "47115", KundenNr = "3000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 7, ArtikelNr = "47115", KundenNr = "3000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 8, ArtikelNr = "47115", KundenNr = "3000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 9, ArtikelNr = "47115", KundenNr = "4000", Kundenname = "Test" });
        _colDaten.Add(new Auftragsdaten() { VorgangsNr = 10, ArtikelNr = "47115", KundenNr = "4000", Kundenname = "Test" });
 
        _colDaten[0].AddDetails("Staubsauger 3744", "Barverkauf");
        _colDaten[0].AddDetails("Mixer 2231", "Barverkauf");
        _colDaten[0].AddDetails("Toaster 112", "Barverkauf");
 
        _colDaten[1].AddDetails("Staubsauger 3744", "Barverkauf");
        _colDaten[1].AddDetails("Mixer 2231", "Barverkauf");
        _colDaten[1].AddDetails("Toaster 112", "Barverkauf");
 
        this.mainGV.ItemsSource = _colDaten;
    }
}


Can you please help me?
Markus
Top achievements
Rank 1
 answered on 29 Sep 2010
1 answer
138 views
Using the latest WPF build, I am now having a problem in the designer:

System.IO.FileLoadException

Could not load file or assembly 'Telerik.Windows.Controls, Version=2010.2.917.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata) at Microsoft.Windows.Design.Metadata.AttributeTableContainer.<MergeAttributesIterator>d__c.MoveNext() at Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper) at MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType) at MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings() at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly) at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source) at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption() at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context) at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem() at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem() at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState() at MS.Internal.Host.PersistenceSubsystem.Load() at MS.Internal.Host.Designer.Load() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView()

---------------
It appears that VS is trying to load some dependent assembly from the web?
Milan
Telerik team
 answered on 29 Sep 2010
1 answer
69 views
Hi,

I'm using MVVM auto binding to create a Bar Chart

in my xaml,

 

<telerikChart:RadChart Width="200" Height="200" ItemsSource="{Binding DisplayedCapacitySeries}" Padding="3">
.... 
 <telerik:SeriesMapping.ItemMappings>  
    <telerik:ItemMapping DataPointMember="YValue" FieldName="Capacity_TB"/>   
     <telerik:ItemMapping DataPointMember="XCategory" FieldName="CapacityName" />   
 </telerik:SeriesMapping.ItemMappings>


The chart was created at the first loading. However, the Chart is not refreshed when Caparity_TB is changed although INotifyPropertyChanged is implemented in the ViewModel class. 

Also I want to show the legend with the CapacityName. I'm using LegendDisplayMode="DataPointLabel". However, the legend shows as "item 0 .. item 1" instead of the CapacityName on the XCategory.

Also how can I hide the legend header?
 

 


Thanks,
Ves
Telerik team
 answered on 29 Sep 2010
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?