Telerik Forums
UI for WPF Forum
1 answer
72 views
Hello,
I have a problem with using ShowDialog method of RadWindow in WebBrowser. A new window appears, but ShowDialog should susspend by main application. I use Close callback to resolve this problem, but it's not a good solution for complicated application.
I really need to freeze code execution when modal dialog appears.
George
Telerik team
 answered on 25 Jun 2010
3 answers
295 views
Hi,

searching the internet I found following statement:

Q: Can I use Bing Maps (Virtual Earth) within a Windows Forms or WPF Desktop Application?

A: As far as Licensing, you’ll need to contact Microsoft. The “Microsoft Virtual Earth Platform API Terms of Use” doesn’t really cover this specific usage scenario.

Microsoft doesn’t have a Window Forms or WPF control that you can just drag onto a Window, but you could access the Web Service from your application or display the JavaScript Map Control within an embedded WebBrowser control.


(http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx)

Do I really have to contact Microsoft for using RadMap or do you already know which licensing-model is needed for commercial use of your control?

Best Regards
Steffen


Andrey
Telerik team
 answered on 25 Jun 2010
1 answer
91 views
Hi,
When data is loaded the first line of the GridView is selected by default,I want no selection and how to do that? 
thank you!
Milan
Telerik team
 answered on 25 Jun 2010
1 answer
431 views
Hi,

I saw a similar issue posted in the Silverlight forum. I am not able to use the solution presented there because I need to instantiate my view model with parameters from the view. I am trying to bind a Composite WPF DelegateCommand to a column cell template in my RadGridView.

When I run the application I get this error in the output window:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=LayoutRoot'. BindingExpression:Path=DataContext.StopCommand; DataItem=null; target element is 'Button' (Name='StopButton'); target property is 'Command' (type 'ICommand')

If I bind the command to a button outside the RadGridView it works as expected.

I have the following XAML:
<Window x:Class="MVVMCommand.MainWindow" 
        x:Name="LayoutRoot" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="MainWindow" Height="300" Width="300" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    <StackPanel> 
        <Button Content="This one works" 
                CommandParameter="42" 
                Command="{Binding ElementName=LayoutRoot, Path=DataContext.StopCommand}" /> 
            <telerik:RadGridView Name="radGridView1" ItemsSource="abcd"
            <telerik:RadGridView.Columns> 
                <telerik:GridViewColumn Header="Start"
                    <telerik:GridViewColumn.CellTemplate> 
                        <DataTemplate> 
                            <Button Content="This one does not"
                                    CommandParameter="42" 
                                    Command="{Binding ElementName=LayoutRoot, Path=DataContext.StopCommand}" /> 
                        </DataTemplate> 
                    </telerik:GridViewColumn.CellTemplate> 
                </telerik:GridViewColumn> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </StackPanel> 
</Window> 

The view model looks like this:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Microsoft.Practices.Composite.Presentation.Commands; 
 
namespace MVVMCommand 
    public class MVVMCommandViewModel 
    { 
        public DelegateCommand<object> StopCommand { getset; } 
 
        public MVVMCommandViewModel(string s
        { 
            StopCommand = new DelegateCommand<object>(StopCommand_Execute); 
        } 
 
        void StopCommand_Execute(object o) 
        { 
 
        } 
    } 

My code-behind:
    public partial class MainWindow : Window 
    { 
        MVVMCommandViewModel _viewModel; 
 
        public MainWindow() 
        { 
            InitializeComponent(); 
            _viewModel = new MVVMCommandViewModel("42"); 
            this.DataContext = _viewModel; 
        } 
    } 

Maya
Telerik team
 answered on 25 Jun 2010
1 answer
181 views
Hi ,

I am using Telerik WPF version : 2009.1.xxx.xx
WPF window screen i place the following line:
 <telerik:RadDatePicker x:Name="dtpDate"  SelectedDate="{Binding ReferredToDate, Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged }"  SelectionChanged="dtpDate_SelectionChanged"/>

When i input  digit Zero(0) in datetime picker and press tab i gett following error :

Year, Month, and Day parameters describe an un-representable DateTime.

BECAUSE OF THIS ERROR EVEN IT NOT FIRE THE PROPERTY CHANGED EVENT..

HOW TO HANDLE THIS ISSUE ?

Thanks in advance
Hiren
Kaloyan
Telerik team
 answered on 25 Jun 2010
2 answers
100 views
Hi,

I've been looking through the DataGrid documentation (the WPF Demos, looking at the code behind) and there is a CellTemplateSelector property used:

<telerik:GridViewDataColumn Header="UnitPrice" DataMemberBinding="{Binding UnitPrice}" 
                            CellTemplateSelector="{StaticResource selector}" DataFormatString="{}{0:c}" /> 
(Demo: Controls -> Data -> GridView -> DataTemplateSelectors -> Templating cells -> example.xaml)

Im using the RadControls for WPF Q1 2010 SP2, however this property does not appear, I can set the property CellTemplate property but not a CellTemplateSelector. Should this be possible?

<telerik:GridViewDataColumn UniqueName="direction"   
                            Header="Direction" DataMemberBinding="{Binding Path=eventDirection}"/> 

Thank you,
Toby
Top achievements
Rank 1
 answered on 25 Jun 2010
1 answer
72 views

Hi,

i have tried following thing for Stick chart. Following thing is worling fine now issue:

public partial class MainPage : UserControl  
    {  
        public MainPage()  
        {  
            InitializeComponent();  
 
            InitializeChart();  
        }  
 
        private void InitializeChart()  
        {  
            Telerik.Windows.Controls.Charting.StickSeriesDefinition cssd = new StickSeriesDefinition();  
            cssd.ShowItemToolTips = true;             
 
 
            telerikChart.DefaultSeriesDefinition = cssd;  
            telerikChart.ItemsSource = GetStocks();  
            SeriesMapping sm=new SeriesMapping();  
            sm.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XCategory));  
            sm.ItemMappings.Add(new ItemMapping("Open",DataPointMember.Open));  
            sm.ItemMappings.Add(new ItemMapping("Close", DataPointMember.Close));  
            sm.ItemMappings.Add(new ItemMapping("Low", DataPointMember.Low));  
            sm.ItemMappings.Add(new ItemMapping("High", DataPointMember.High));  
            sm.ItemMappings.Add(new ItemMapping("High", DataPointMember.Tooltip));  
              
 
            telerikChart.SeriesMappings.Add(sm);  
            telerikChart.DefaultSeriesDefinition.ShowItemLabels = true;  
        }  
 
        private List<Stock> GetStocks()  
        {  
            List<Stock> lstStock = new List<Stock>();  
 
            for (int i = 0; i < 1000; i=i+100)  
            {  
                Stock s = new Stock();  
                s.Name = "Stock" + i;  
                s.Open = i + 100;  
                s.Low = i;  
                Random r = new Random(i);  
                r.NextDouble();  
                s.Close = r.Next(100,150) + i;  
                s.High = s.Close + i;  
                lstStock.Add(s);  
            }  
 
            return lstStock;  
        }  
 
          
 
    }  
 
    public class Stock  
    {  
 
        public string Name { getset; }  
        public double Open { getset; }  
        public double Close { getset; }  
        public double High { getset; }  
        public double Low { getset; }  
 
    } 

Stick chart is also shown (Plz See attachment).

Issue:

I have set telerikChart.DefaultSeriesDefinition.ShowItemLabels = true;  
so that to see the Item Label, but stick chart is showing 0 as highlighted in the screenshot. Is there way to see open,Close,Low.high value of the stick as a item label?


Can you please provide me good sample for the same. also provide pointer to doc that explains the Stick chart.

Ves
Telerik team
 answered on 25 Jun 2010
1 answer
645 views
Hello,

Is it possible to prevent drag operation when an user is using a GridSplitter to resize column/row ?

For example :



        <telerik:RadTreeView IsDragDropEnabled="True" ItemTemplate="{StaticResource TreeItemTemplate}">  
            <telerik:RadTreeView.ItemContainerStyle> 
                <Style TargetType="{x:Type telerik:RadTreeViewItem}">  
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>  
                </Style> 
            </telerik:RadTreeView.ItemContainerStyle> 
            <telerik:RadTreeView.Items> 
                <Control Name="control1" Tag="Some text for control1" /> 
                <Control Name="control2" Tag="Some text for control2" /> 
            </telerik:RadTreeView.Items> 
        </telerik:RadTreeView> 
 
            <DataTemplate x:Key="TreeItemTemplate">  
                <Border BorderThickness="1" BorderBrush="LightGray" Margin="2" CornerRadius="5">  
                    <Grid> 
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="Auto"/>  
                            <ColumnDefinition Width="*"/>  
                        </Grid.ColumnDefinitions> 
                        <TextBlock Grid.Column="0" Text="{Binding Name}" Margin="3,0,10,0"/>  
                        <GridSplitter Grid.Column="0" Width="1" Background="LightGray" ResizeDirection="Columns"/>  
                        <TextBlock Grid.Column="1" Text="{Binding Tag}" Margin="3,0,0,0"/>  
                    </Grid> 
                </Border> 
            </DataTemplate> 
 

Is there any solution ? I tried t define  dragDrop:RadDragAndDropManager.AllowDrag="False" on GridSplitter but this doesn't work.

I have the same problem using RadDragDropManager in a templated list (Some draggable items contain Slider).

Thanks,
Guillaume.
GuillaumeR
Top achievements
Rank 1
 answered on 25 Jun 2010
3 answers
590 views
I've done some searching, but I didn't see this issue anywhere.  Please forgive me if I'm duplicating.  There are two issues but they appear related.

Issue #1

I have a RadOutlookBar that is bound to a list of items.  Each of the items contains a list which is bound to a grid.  The grid is in a template that defines the RadOutlookBar's content.  Everything binds fine, but when I select a different RadOutlookBarItem, the grid refreshes, and will throw an exception:

Invalid property or field - '[FieldName]' for type: Object  


In this case, it only happens for one field, and only if I specify the DataFormatString. 

DataFormatString="{}{0:dd/MM/yyyy}" 

As you can see, this field is DateTime type.  If I step through the exceptions, the field will load properly.

Issue #2

This issue is very similar to the above.  We have a RadTabControl that is bound to a list.  The list items also contain lists which are bound to a template that contains a grid.  In this case, the items are different types and so the grids themselves are defined in different DataTemplates targeting their specific DataTypes.  Initially, everything loads just fine, but when you select a different tab, an exception with the same message as issue #1 will be thrown for each column that was defined in the originally selected tab.  This time though, the type is the type of item listed in the newly selected tab's grid.

Invalid property or field - '[FieldName from previous]' for type: [Row data type for selected] 

Again, after stepping through the exceptions, the grid loads just fine.

One tip for reproducing the exceptions if they are not being caught (the code is just throwing exceptions away):
Go to Debug -> Exceptions.. 
Tick the "Thrown" checkbox next to "Common Language Runtime Exceptions".




Vlad
Telerik team
 answered on 25 Jun 2010
1 answer
123 views
Hi,

    When open too many tabs in the docking area, the tabs tend to be very small and hard to find, is there any method to create a button at coner and when clicked  it opens a drop down list of all opened tabs?
 

bingwei
Top achievements
Rank 1
 answered on 25 Jun 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
VirtualKeyboard
HighlightTextBlock
Security
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?