Telerik Forums
UI for WPF Forum
1 answer
191 views
Hello,

How can I load the data asynchronously using an XMLDataProvider. Following is the code I tried. I have set IsAsynchronous to true. But financialInfoProvider.Data is returning Nothing in the below code snippet.
Dim financialInfoProvider As New XmlDataProvider()
Dim finacialInfoXMLPath As String = String.Empty
finacialInfoXMLPath = BuildFinancialInfoXML()
financialInfoProvider.IsAsynchronous = True
financialInfoProvider.Source = New Uri(finacialInfoXMLPath, UriKind.RelativeOrAbsolute)
financialInfoProvider.XPath = "/RemainingFinancialInfo/Property"
m_GridDataSource = New ObservableCollection(Of XmlNode)(DirectCast(financialInfoProvider.Data, IEnumerable(Of XmlNode)))

Thanks and Regards,
Norbert John
Vlad
Telerik team
 answered on 30 Aug 2010
0 answers
169 views
Developers,

Does anyone know if there is a ValidationSummary control similiar to Silverlight for WPF?

I have done alot of work with RIA and Silverlight, and am now on a WPF project.  Trying to get my arms around Validation.

Anyone have any good articles on a solid approach to Validation?

Bryan
Bryan
Top achievements
Rank 1
 asked on 27 Aug 2010
3 answers
138 views
How do you hide Region, City and Neighbord in the zool level control declaratively using xaml.  If not, how do you do it programmatically in c#? 

Thanks

Chris R.
Andrey
Telerik team
 answered on 27 Aug 2010
1 answer
95 views
We are experiencing crashes with logarithmic scale on chart with negative values.  Is this issue addressed in upcoming release?
Giuseppe
Telerik team
 answered on 27 Aug 2010
4 answers
193 views

In the RadPanelBar, I added a user control that has a few text boxes. When I select the RadPanelBarItem, I’m unable to get the focus on the first textbox in the user control.  I have the  FocusManger.FocusedElement bound to the first text box in the user control.  How can I get the focus to the first textbox in the user control? Please advise.

Thanks
RJ

RJ
Top achievements
Rank 1
 answered on 27 Aug 2010
1 answer
138 views
Hello I am a designer and use the Expression Blend 4. I have a problem with the customization of the Dock Pane. The panels in the original state have the custom features, but if they are floating or washed and put back in DockPane lose the custom features. What should I do? Help me please, Adriana
Konstantina
Telerik team
 answered on 27 Aug 2010
3 answers
290 views
I'm using the RadCalendar in Month selection mode (DateSelectionMode="Month"). I want the control to default to the current month and for this month to be visibly selected by default as well.

When I default the SelectedDate and/or DisplayDate properties to the current date the current month is still not visibly selected.

The only way I can get this to work is via a hack like:
Loaded += (s, e) =>
{
  var today = DateTime.Today;
  calendar.SelectedDate = new DateTime(today.Year, today.Month, 2);
  calendar.SelectedDate = new DateTime(today.Year, today.Month, 1);
};

Is this a bug? Is there a better way to default to the current month?

Kaloyan
Telerik team
 answered on 27 Aug 2010
3 answers
349 views
Hi everyone, I'm newbie when it comes to WPF so i have some - maybe too basic question, but still. 
I have a question on how to populate specific columns in radgrid view with columns in List that i got from my orm model.

For example - this is my code behind to set datacontext of a grid view P.S. I would like to put that into resources:
public partial class MyClass : Page
    {
        public List<MyTable> myList { get; set; }
  
        public Drzava()
        {
            using (MyModel dbContext = new MyModel())
            {
                myList = dbContext.MyTable.ToList();
  
            }
            InitializeComponent();
              
            myGridView.DataContext = myList;
        }
    }

if I set ItemsSource="{Binding ElementName=myPage,Path=myList}" , i get populated all the columns, but i only want specific ones...so i tried somethink like that:
<telerik:RadGridView Name="myGridView" Margin="12,65,12,12" ItemsSource="{Binding ElementName=myPage,Path=myList}" AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn DataContext="{Binding Path=Id}"></telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
But I cannot get it to work...
Thank you in advance for the reply and help.
Yavor Georgiev
Telerik team
 answered on 27 Aug 2010
3 answers
160 views
Hi!

I've to create a tree that represent Files and Folder.

my actual structure is:

Folder object has
-->SubFolder ObservableCollection
-->File List (observablecollection too)

I need to have in the same tree files and folder.

I've no problem creating a treee browsing Folders:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.Resources>
        <HierarchicalDataTemplate x:Key="NodeTemplate" ItemsSource="{Binding SubFolders}">
            <TextBlock Text="{Binding Name}"/>
        </HierarchicalDataTemplate>
    </Grid.Resources>
    <telerik:RadTreeView Name="uxRadTreeView" ItemsSource="{Binding RootFolder.SubFolders}" ItemTemplate="{StaticResource NodeTemplate}" AllowDrop="False" IsDragDropEnabled="True" DragEnded="uxRadTreeView_DragEnded" />
</Grid>

But how can I get files with that too?

They both have a "Name" property


Hristo
Telerik team
 answered on 27 Aug 2010
1 answer
162 views

Hey there!

I get insert, delete and Edit to work

But when i insert one row, delete gets disabled and insert row aswell.

<Window x:Class="Administration.Window1"
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignWidth="833" SizeToContent="WidthAndHeight" d:DesignHeight="567">
 
 
    <Grid Height="528" Width="815">
             
        <Border telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True" Margin="0,81,-2,15" />
 
        <StackPanel Orientation="Horizontal" Margin="102,0,98,456" Height="22.301" VerticalAlignment="Bottom" HorizontalAlignment="Center">
            <telerik:RadButton Width="150" Content="Delete selected rows" Margin="0,0,5,0"
                               Command="telerikGrid:RadGridViewCommands.Delete" CommandTarget="{Binding ElementName=RadGridView1}" VerticalAlignment="Top" />
            <telerik:RadButton Width="150" Content="Add new row" Margin="0,0,5,0"
                               Command="telerikGrid:RadGridViewCommands.BeginInsert" CommandTarget="{Binding ElementName=RadGridView1}" VerticalAlignment="Top" />
            <telerik:RadButton Width="150" Content="Save insert/edit" Margin="0,0,5,0"
                               Command="telerikGrid:RadGridViewCommands.CommitEdit" CommandTarget="{Binding ElementName=RadGridView1}" Height="Auto" VerticalContentAlignment="Center" VerticalAlignment="Top" />
            <telerik:RadButton Width="150" Content="Cancel insert/edit"
                               Command="telerikGrid:RadGridViewCommands.CancelRowEdit" CommandTarget="{Binding ElementName=RadGridView1}" VerticalAlignment="Top" />
        </StackPanel>
 
 
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding}"
                             CanUserInsertRows="True"
                             CanUserDeleteRows="True"
                             ActionOnLostFocus="CommitEdit"
                             RowEditEnded="PricingGrid_RowEditEnded" Margin="0,81,0,0"  >
            <telerik:RadGridView.RowStyle>
                    <Style TargetType="telerik:GridViewRow">
                        <Setter Property="MinHeight" Value="40" />
                    </Style>
                </telerik:RadGridView.RowStyle>
                <telerik:RadGridView.Columns>
 
                <telerik:GridViewColumn>
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <telerik:RadButton Content="Delete" Command="telerikGrid:RadGridViewCommands.Delete" CommandParameter="{Binding}" />
                            </DataTemplate>
                        </telerik:GridViewColumn.CellTemplate>
                    </telerik:GridViewColumn>
                     
                     
                     
                    <telerik:GridViewToggleRowDetailsColumn />
                     
              </telerik:RadGridView.Columns>
                <telerik:RadGridView.RowDetailsTemplate>
                    <DataTemplate>
                        <telerik:RadTabControl BackgroundVisibility="Collapsed" x:Name="RadTabControl1" Margin="10" VerticalAlignment="Center" Background="Transparent">
                            <telerik:RadTabItem Header="Description" DataContext="{Binding}" Margin="10,0,0,0" Height="24" Foreground="Black">
                                <Grid Width="Auto" HorizontalAlignment="Stretch">
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition Height="15" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    
                                    <TextBlock Text="Description: " Margin="5,10,0,0" FontWeight="Bold" Grid.Row="0" Grid.Column="1" />
                                    <TextBlock Text="{Binding strDescription}" Margin="5,10,0,0" Grid.Row="0" Grid.Column="2" />
                                    <!--<TextBlock Text="Country: " Margin="5,0,0,0" FontWeight="Bold" Grid.Row="1" Grid.Column="1" />
                                    <TextBlock Text="{Binding nCountry}" Margin="5,0,0,0" Grid.Row="1" Grid.Column="2" />-->
                                    
                                     
                                </Grid>
                            </telerik:RadTabItem>
                        </telerik:RadTabControl>
                    </DataTemplate>
                </telerik:RadGridView.RowDetailsTemplate>
            </telerik:RadGridView>
        
        <StackPanel Height="46.14" Margin="0" Name="stackPanel1" VerticalAlignment="Top" Orientation="Horizontal" HorizontalAlignment="Center">
            <telerik:RadButton  Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                 Artiklar
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                 
                Priser
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                 ETC
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                 ETC
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                 OSV
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                OSV
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                 Artiklar
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
               Priser
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" HorizontalAlignment="Center">
                OSV
            </telerik:RadButton>
            <telerik:RadButton Height="45.371" Width="61.52" ClickMode="Release" ClipToBounds="False" HorizontalAlignment="Center">
                 ETC
            </telerik:RadButton>
        </StackPanel>
    </Grid>
</Window>
 
using System;
using System.Collections.Generic;
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.Shapes;
using Telerik.Windows.Data;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Collections;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using System.Linq;
using System.Globalization;
using Telerik.Windows.Controls.Charting;
 
namespace Administration
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public CollectionViewSource Source { get; set; }
 
        public List<Categories> _EditedCategories;
 
        public Window1()
        {
            InitializeComponent();
            this.Source = new CollectionViewSource();
            _EditedCategories = new List<Categories>();
 
            BindData();
        }
 
        private void BindData()
        {
            var wcomPosDB = new WcomPosProductDataContext();
 
            //var getCats = (from u in wcomPosDB.tblCategories
            //               join c in wcomPosDB.tblCategoryDescriptions on u.nID equals c.nCategoryID
            //               select new { ID = u.nID, Description = u.strDescription, Country = c.nCountry }).ToList();
 
            var testCats = from u in wcomPosDB.tblCategories
                           select u;
 
            //select new { ID = u.nID, Description = u.strDescription }).ToList();
 
 
            var list = new ObservableCollection<Categories>();
 
            foreach (var cat in testCats)
            {
                list.Add(new Categories { nID = cat.nID, strDescription = cat.strDescription });
            }
 
            Source.Source = list;
 
            this.DataContext = Source.View;
 
        }
 
 
 
        private void PricingGrid_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
        {
            if (e.EditOperationType == Telerik.Windows.Controls.GridView.GridViewEditOperationType.Insert)
            {
                this.DataContext = Source.View.OfType<Categories>().OrderBy(c => c.nID);
 
                Source.Source = this.DataContext;
 
                RadGridView1.SelectedItem = e.NewData;
                RadGridView1.ScrollIntoView(e.NewData);
 
            }
 
 
            //add edited item to new list, then use this list to update the database..
            if (e.NewData != null)
            {
                _EditedCategories.Add((Categories)e.NewData);
            }
 
             
        }
 
        public class FuncValueConverter : IValueConverter
        {
            private readonly Func<object, object, object> convertFunc;
 
            public FuncValueConverter(Func<object, object, object> convertFunc)
            {
                this.convertFunc = convertFunc;
            }
 
            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
            {
                return this.convertFunc(value, parameter);
            }
 
            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            {
                throw new NotImplementedException();
            }
        }
 
 
 
        public class Categories
        {
            public long nID { get; set; }
            public string strDescription { get; set; }
        }
       
    }
}
 
 
Im new to Telerik, and this been bugging me for a while now.
 
Hope someone out there can help me.
 
Regards Joachim.
Nedyalko Nikolov
Telerik team
 answered on 27 Aug 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?