Telerik Forums
UI for WPF Forum
2 answers
160 views
Suppose I have a the following class

public class DataRow
{
    public int X { get; set; }
    public int Y { get; set; }
 
    public bool Exclude;
}

I want to plot this on a RadChart using a seriesmapping, which I do like this.

ObservableCollection<DataRow> SeriesSource = new ObservableCollection<DataRow>();
SeriesMapping series = new SeriesMapping();
series.ItemsSource = source;
series.ItemMappings.Add(new ItemMapping("X", DataPointMember.XValue));
series.ItemMappings.Add(new ItemMapping("Y", DataPointMember.YValue));

Is there any way that I can include/exclude data points being plotted based on the value of 'Exclude'? I wish to be able to include/exclude certain points from the plotted line.

The only other solution I can think of is to scan through the collection and create a second collection just containing members which aren't excluded. This doesn't seem very efficient though.
Petar Marchev
Telerik team
 answered on 22 Nov 2013
4 answers
222 views
Hi,

I populated a treeview control dynamically with child nodes. In Win 7 this treeview has arrow marks for expand and collapse. I want to change it to traditional + and - symbols since our users are more comfortable with that. I have tried different themes but it didn't change this behavior.Please help.
Petar Mladenov
Telerik team
 answered on 22 Nov 2013
6 answers
739 views
I was working with the previous version of this control but for some reason it would not render some of our pdf files.  I upgraded to the latest version but now I am running into a new issue.  I can't seem to clear the document from the viewer.  I have attached some sample code that will reproduce the NullReferenceException errors I am getting.

WPF Code:
<Window x:Class="TelerikPDFViewerTest.MainWindow"
        Title="MainWindow" Height="550" Width="525">
    <Window.CommandBindings>
        <CommandBinding Command="Open" CanExecute="Open_CanExecute" Executed="Open_Executed" />
        <CommandBinding Command="Close" CanExecute="Close_CanExecute" Executed="Close_Executed" />
    </Window.CommandBindings>
    <Grid>
 
        <telerik:RadPdfViewer Name="pdfViewer" Margin="3,30,3,3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
        <telerik:RadButton Name="btnOpen" Content="Open" Margin="3,3,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="72" Command="Open" />
        <telerik:RadButton Name="btnClose" Content="Close" Margin="0,3,0,3" VerticalAlignment="Top" HorizontalAlignment="Right" Width="72" Command="Close" />
    </Grid>
</Window>

C# Code:
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;
 
namespace TelerikPDFViewerTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private System.IO.FileStream fs = null;
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void Open_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute =(System.IO.File.Exists("benchbook.pdf"));
            e.Handled = true;
        }
 
        private void Open_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            fs = new System.IO.FileStream("benchbook.pdf", System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Delete);
            pdfViewer.DocumentSource = new Telerik.Windows.Documents.Fixed.PdfDocumentSource(fs);
        }
 
        private void Close_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = (this.pdfViewer.Document != null);
            e.Handled = true;
        }
 
        private void Close_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            this.fs.Close();
            //Get NullReferenceException in both cases
            //First try to set document source = null
            this.pdfViewer.DocumentSource = null;
             
            //Or try just releasing the document
            //this.pdfViewer.Document = null;
        }
    }
}

I could not attach the pdf I was using but any pdf will reproduce the problem.  Please let me know if there is some workaround for this.

Ideally it would be great if the PdfViewer had a Clear() function that would release all resources referenced and displayed.

Thanks,
Lee Keel
Stephen
Top achievements
Rank 1
Iron
 answered on 21 Nov 2013
5 answers
117 views
Hi, 

Is it possible to transform the RadGridView by 90degrees so that the column headers are displayed down the side? I have a lot of headers but not much data so it makes sense to flip the orientation.

Thanks for your help!
Dimitrina
Telerik team
 answered on 21 Nov 2013
7 answers
301 views
I'm working on a new WPF application, and am making extensive use of the RadMaskedNumericInput control. I've defined a couple of validation classes based upon the ValidationRule class. I'm using this in every instance where I use a RadMaskedNumericInput control. I want it such that if the RadMaskedNumericInput control shows up and the user does nothing with it, then the lowest value is saved back to the database. This isn't happening. What's happening is a null is being saved to the database. Now, I know that I could define a default value in the table definition, and perhaps that's what I'll have to do, but I'd like to know if there's a way to make the RadMaskedNumericInput control automatically save the lowest value (in all my cases that happens to be a 0, but it could technically be any numeric value) to the backend database. You see, it's weird because the RadMaskedNumericInput control is showing a 0 in it, when it comes up, but I've found that in testing if I do nothing with that control, or just tab to it and then past it, a null is what's saved to the database. That's counterintuitive.
Rod
Top achievements
Rank 1
 answered on 21 Nov 2013
3 answers
811 views
i'm using RadGridView in my application, for displaying all users registered in my app, also i can edit them. When i started editing and wanted to move to another screen i need to "close" or "end" editing mode programmatically(on my ViewModel). Help me how to handle this.
Dimitrina
Telerik team
 answered on 21 Nov 2013
2 answers
181 views
Hi

The dataform works well when AutoGenerateFields is true, but once i turn it off and supply it with 3 different DataTemplates it throws the Exception "Parameter count mismatch", the Object implements  IDataErrorInfo, IEditableObject and the problem seems to be the
IDataErrorInfo, any ideas
thanks

   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at Telerik.Windows.Data.ItemPropertyInfoExtensions.GetValue(ItemPropertyInfo itemProperty, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\ItemProperties\ItemPropertyInfoExtensions.cs:line 105




Ramon
Top achievements
Rank 1
 answered on 21 Nov 2013
0 answers
60 views
Hi folks.

I have a treelist control on my page where I load the items dynamicaly. At each section I'd like to have aggregated sums at the bottom. I thing I have all set correctly regarding online demos but the result footer are all empty.

I use this code:

     <telerik:RadTreeList ID="rtlData" AllowLoadOnDemand="true" runat="server" AutoGenerateColumns="false"
         OnChildItemsDataBind="RadTreeList_ChildItemsDataBind" OnNeedDataSource="RadTreeList_NeedDataSource"
          DataKeyNames="CssClass,ParentId" ParentDataKeyNames="CssClass,ParentId" OnItemCreated="RadTreeList_ItemCreated"
         OnItemDataBound="RadTreeList_ItemDataBound" ShowFooter="true">
          <Columns>
               <telerik:TreeListBoundColumn DataField="ProductCatL3" UniqueName="ProductCatL3" HeaderText="Produkt L3">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ProductCatL2" UniqueName="ProductCatL2" HeaderText="Produkt L2">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ProductCatL1" UniqueName="ProductCatL1" HeaderText="Produkt L1">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="State" UniqueName="State" HeaderText="Stav" DataType="System.Decimal" DataFormatString="{0:C2}" Aggregate="Sum">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="Avg1Month" UniqueName="Avg1Month" HeaderText="PrůmÄ›r 1 mÄ›síc" DataFormatString="{0:C2}" Aggregate="Avg">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="Avg3Months" UniqueName="Avg3Months" HeaderText="PrůmÄ›r 3 mÄ›síce" DataFormatString="{0:C2}" Aggregate="Avg">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ApprovedLimit" UniqueName="ApprovedLimit" HeaderText="Schválený limit" DataFormatString="{0:C2}" Aggregate="Sum">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="CssClass" UniqueName="Css" HeaderText="CSS" Visible="false">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ParentId" UniqueName="ParentId" HeaderText="ParentId" Visible="false">
               </telerik:TreeListBoundColumn>
          </Columns>
     </telerik:RadTreeList>

What am I doing wrong that no footer are calculated and it only shows empty fields?

Sincerely
Scarlaxx
Jiri
Top achievements
Rank 1
 asked on 21 Nov 2013
5 answers
536 views
Hello!

I need real-time update. 
When I updated properties, everything was ok, but there were problems with sorting, filtering and grouping. 
According to your demo, I start to replace whole object. 
Everything works fine, but scroll's behaviour becomes very strange.

There is example: Sample

1. If you scroll grid for a while, you will see scroll "jumps" sometimes.. Here it is small jump, but in my app it is more noticeable.

2. If there are enough columns for horizontal scroll, it will also jump from right side, and it would be very difficult to use last column.

What should I do?

Thanks. 
Vanya Pavlova
Telerik team
 answered on 20 Nov 2013
9 answers
371 views
Hi ,
I am using RadRichtextBox for print of RadGridView Data.Print is working but All the column in RadGridView  is not cmming.Its get cuts from end.
 My reqirement is when there is more column then those column should appear automatically in the next page consecutively or next document.

Please find my attached document also.And please help me it is very urgent ..

Thanks in advanced...
Regards
Rahman
Petya
Telerik team
 answered on 20 Nov 2013
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?