Telerik Forums
UI for WPF Forum
1 answer
174 views

Hi,

I am trying to have a single chart with a Stacked 100 Bar series with a Line Series over it, however the line series doesn't want to show.

 

Example code:

<telerik:RadCartesianChart.Series>
                    <telerik:BarSeries x:Name="barSeries1" CategoryBinding="MyDateTime"
                                   ValueBinding="RedValue"
  ItemsSource="{Binding MyDataSource}"
  CombineMode="Stack100">
                        <telerik:BarSeries.PointTemplate>
                            <DataTemplate>
                                <Rectangle Fill="Red"/>
                            </DataTemplate>
                        </telerik:BarSeries.PointTemplate>
                    </telerik:BarSeries>
                        <telerik:BarSeries x:Name="barSeries2" CategoryBinding="MyDateTime"
                                   ValueBinding="GreenValue"
  ItemsSource="{Binding MyDataSource}"
                                           CombineMode="Stack100"
  >
                        <telerik:BarSeries.PointTemplate>
                            <DataTemplate>
                                <Rectangle Fill="Green"/>
                            </DataTemplate>
                        </telerik:BarSeries.PointTemplate>
                    </telerik:BarSeries> 
                    <telerik:LineSeries x:Name="lineSeries1" CategoryBinding="MyDateTime" ValueBinding="MyValue" Stroke="Black" 
  ItemsSource="{Binding MyDataSource}"
   />
</telerik:RadCartesianChart.Series>

 Any assistance would be greatly appreciated.

Anna
Telerik team
 answered on 25 May 2015
0 answers
248 views

Hi team,

I am using RadPrompt with DialogParameters. I've defined a custom content style for my RadPrompt. However when i run it with RadWindow.Prompt, it shows with a title bar which doesn't suit my design at all. I want to remove that title bar etc. I know i need to set the property WindowStyle of DialogParameter. But i don't know how to do that. Could anyone give me an example?

 

Thanks,

Jingfei

Jackey
Top achievements
Rank 1
 asked on 22 May 2015
1 answer
96 views

 Hello,

I have an issue with reading PDF files. If I change BuildAction property via VisualStudio from none to resource it works but if I keep none it doesn't work. The PDF files are dynamically added to the folder by the user. Is there a way to solve this problem, I mean a way to read the PDF files without changing the BuildAction property  ?

 

Thanks in advance.

<telerik:RadPdfViewer Grid.Row="1" x:Name="pdfViewer" DataContext="{Binding ElementName=pdfViewer, Path=CommandDescriptors}">

this.pdfViewer.DocumentSource = new PdfDocumentSource(new Uri("MyProject;component/Contenu/PDF/Facture.pdf", UriKind.Relative));

Tanya
Telerik team
 answered on 22 May 2015
1 answer
1.3K+ views

Hi Team

1)Is possible to add column dynamically when i click in add button in mvvm pattern.

2)Is possible to get all the row values of single column based on the column name provided.

3)Is Possible to binding column with different collection(Ex. column1 is filled NameRegister, column2 to is bind with some telephone collection.

Thanks

Sankar A

 

Stefan
Telerik team
 answered on 22 May 2015
3 answers
224 views

Hello,

 I am having a performance problem with the combobox column of the RadGridView control. When bound to small data, the combobox works great, but when the data is large (18000+ items), the combobox seems very slow, frozes for 2 seconds when i enter edit mode, don't change the item and leave the edit mode, and frozes for 5 seconds when i change the selected item and leave the edit mode. I cannot accept this user experience. Is there a way to improve this performance?

 I made a sample to show you the problem:

P.S.: I have to generate the columns in the code behind, because they are dynamic.

XAML:

<Window x:Class="TelerikWpfApp1.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
        <Grid>
            <telerik:RadGridView Name="gridView" Grid.Row="0" ColumnWidth="*" AutoGenerateColumns="False"
                                 SelectionMode="Extended" ScrollMode="Deferred" GroupRenderMode="Flat"/>
        </Grid>
</Window>

 

Code Behind (C#):

using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using Telerik.Windows.Controls;

namespace TelerikWpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            InitializeGrid();
        }

        private void InitializeGrid()
        {
            this.gridView.BeginInit();
            this.gridView.Columns.Add(new GridViewSelectColumn());
            this.gridView.Columns.Add(new GridViewDataColumn()
            {
                Header = "Order Id",
                DataMemberBinding = new Binding("Id")
            });

            var comboColumn = new GridViewComboBoxColumn();
            comboColumn.Header = "Client";
            comboColumn.IsComboBoxEditable = true;
            comboColumn.SelectedValueMemberPath = "Id";
            comboColumn.DisplayMemberPath = "Name";
            comboColumn.ItemsSource = getClients();
            comboColumn.DataMemberBinding = new Binding("ClientId")
            {
                Mode = BindingMode.TwoWay
            };

            var style = new Style(typeof(RadComboBox));
            style.Setters.Add(new Setter(RadComboBox.TextSearchModeProperty,
                                                     TextSearchMode.Contains));
            comboColumn.EditorStyle = style;

            this.gridView.Columns.Add(comboColumn);

            comboColumn = new GridViewComboBoxColumn();
            comboColumn.Header = "Product";
            comboColumn.IsComboBoxEditable = true;
            comboColumn.SelectedValueMemberPath = "Id";
            comboColumn.DisplayMemberPath = "Name";
            comboColumn.ItemsSource = getProducts();
            comboColumn.DataMemberBinding = new Binding("ProductId")
            {
                Mode = BindingMode.TwoWay
            };

            style = new Style(typeof(RadComboBox));
            style.Setters.Add(new Setter(RadComboBox.TextSearchModeProperty,
                                                     TextSearchMode.Contains));
            comboColumn.EditorStyle = style;

            this.gridView.Columns.Add(comboColumn);

            this.gridView.ItemsSource = getOrders();
            this.gridView.EndInit();
        }

        private DataView getOrders()
        {
            var dt = new DataTable();

            dt.Columns.Add(new DataColumn()
            {
                ColumnName = "Id",
                DataType = typeof(string),
                MaxLength = 10
            });

            dt.Columns.Add(new DataColumn()
            {
                ColumnName = "ClientId",
                DataType = typeof(string),
                MaxLength = 10
            });

            dt.Columns.Add(new DataColumn()
            {
                ColumnName = "ProductId",
                DataType = typeof(string),
                MaxLength = 10
            });

            dt.Rows.Add(1, 1, 17000);
            dt.Rows.Add(2, 2, 1892);

            return dt.DefaultView;
        }

        private DataView getClients()
        {
            var dt = new Model();

            dt.Rows.Add(1, "Walmart");
            dt.Rows.Add(2, "Coca-Cola Company");

            return dt.DefaultView;
        }

        private DataView getProducts()
        {
            var dt = new Model();

            for (int i = 0; i < 18000; i++)
                dt.Rows.Add(i, "Name " + i);

            return dt.DefaultView;
        }
    }
}

 

Model Class:

using System;
using System.Data;

namespace TelerikWpfApp1
{
    public class Model : DataTable
    {
        public Model() : base()
        {
            this.Columns.Add(new DataColumn()
            {
                ColumnName = "Id",
                DataType = typeof(string),
                MaxLength = 10
            });

            this.Columns.Add(new DataColumn()
            {
                ColumnName = "Name",
                DataType = typeof(string),
                MaxLength = 100
            });
        }
    }
}

Dimitrina
Telerik team
 answered on 22 May 2015
1 answer
103 views

Hello experts,

I have one requirement in grid view where, I wanted to show parents as selected whose child is selected. For e.g. I have one hierarchical structure where

Parent 1 has one child and this child has one more child (Grandchild) likewise....

Now when I select Grandchild or child, its respective parents should also get selected/highlighted.  

 So, I have following questions-

1) Is there any property/method available which I can use it in Xaml to achieve this?

2) If not, then what will be the recommended approach to do this (sample example, with code will be appreciated)?

 

Thanks in Advance,

Vinayak

Dimitrina
Telerik team
 answered on 22 May 2015
1 answer
88 views

I am using Interaction trigger on RowEditEnded. If the user enter invalid value, I want to remove that row from the Grid. How can I do this ?

ItemsSource="{Binding ItemSource,Mode=TwoWay }"

 <i:Interaction.Triggers>
                    <i:EventTrigger EventName="RowEditEnded">
                        <cmd:EventToCommand Command="{Binding EditingCommand}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>

 

 if (this.ItemSource.Count > 0)
            {
                var newItem = this.ItemSource.FirstOrDefault(d => d.ItemOrder == null);

                if (newItem != null)
                {
                    if (newItem.Id > 0)
                    {
                       newItem .ItemOrder = this.ItemSource.Count;
                    }
                    else
                    {
                        this.ItemSource.Remove(newItem );
                    }   
                }
            }

Maya
Telerik team
 answered on 22 May 2015
1 answer
100 views

Hello,

why does SelectionChanging Event in the GridView only get fired, if i click on a row, but not when switching between rows with the arrow keys. The selection mode is SelectionMode.Multiple.

 

Thank you!

Stefan
Telerik team
 answered on 22 May 2015
1 answer
231 views

I'm importing an excel spreadsheet into RadSpreadsheet, and everything is working great except for one thing.

Certain labels on my spreadsheet use subscript and superscript and the formatting is not showing up properly in RadSpreadsheet. The text just shows up as regular text.  Here's the code I'm using to import the spreadsheet:

WorkbookFormatProvidersManager.RegisterFormatProvider(new XlsxFormatProvider());
FileStream input = new FileStream("Default.xlsx", FileMode.Open);
workbook = WorkbookFormatProvidersManager.Import("xlsx", input);
rssCalibration.Workbook = workbook;

 

 Is there something else I need to be doing to get the subscript and superscript to display properly?

 

 

Anna
Telerik team
 answered on 22 May 2015
1 answer
277 views

I'm trying to implement Excel-like behavior on an editable RadGridView. I need to be able to use the arrow up and down keys to move up and down the rows, staying in the same field/textbox.

 I've looked all over the internet and forums to see how to do this and I can't find any good information on it. I tried setting up the CustomKeyboardCommandProvider class but that didn't work. It appears that by default the Tab and Enter keys have commands attached to them but not the arrow keys.

 Can someone point me in the right direction?

Dimitrina
Telerik team
 answered on 22 May 2015
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?