Telerik Forums
UI for WPF Forum
1 answer
76 views

Hi,

I have a gridview contains 2+ Millions rows and around 5 columns, I want to export the gridview as Excel or PDF document. When call export, I get rowIndex out of bound exception.

Here is the way I used to export as Excel

exportGridView.ExportToXlsx(stream, new GridViewDocumentExportOptions
                                                                                             {
                                                                                                 AutoFitColumnsWidth = true,
                                                                                                 ExportDefaultStyles = true,
                                                                                             });

 

=============================

and this is the way I export as PDF

exportGridView.ExportToPdf(stream, new GridViewPdfExportOptions
                                                                                            {
                                                                                                AutoFitColumnsWidth = true,
                                                                                                ExportDefaultStyles = true,
                                                                                            });

 

Best regards,

Ahmed

Stefan Nenchev
Telerik team
 answered on 10 May 2016
5 answers
244 views

Hello,

 

I'm using a ChartCrosshairBehavior in my RadCartesianChart.

Currently, for the CrossHair Control, the target axis is a left-axis (by default). => picture "one"

 

I want to know if is it possible to target the right axis, and if yes, how can i do this ? (picture "two")

 

This my code :

01.<telerik:ChartCrosshairBehavior x:Name="chartCross" PositionChanged="chartCross_PositionChanged"                                         HorizontalLineLabelVisibility="Hidden"                                                                   HorizontalLineVisibility="Hidden"                                                                        VerticalLineLabelVisibility="Hidden"                                                                     VerticalLineVisibility="Hidden">                                            <telerik:ChartCrosshairBehavior.HorizontalLineLabelDefinition>                                                <telerik:ChartAnnotationLabelDefinition Format="{}{0:N1}" Location="Left" />                                      </telerik:ChartCrosshairBehavior.HorizontalLineLabelDefinition>                            </telerik:ChartCrosshairBehavior>

 

 

Thank you !

 

Valentin.

 

 

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 10 May 2016
1 answer
716 views

I have added the ImageEditor UI control in My XMAL window and got below error in runtime. i dont have any clue on this issue. i added all libraries based on sample program ; but its not working

OS : Windows 10

IDE: Viusal studio 2015 

Added Reference below Lib: Telerik.Windows.Controls version (2016.1.217.40)

Telerik.Windows.Controls.ImageEditor(2016.1.217.40)

Telerik.Windows.Controls.Navigation

 

Details Error Message:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor" xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"

 

//My XAML code 

<UserControl x:Class="Aagnaa_ImageEditor.ImageProcessngView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Aagnaa_ImageEditor"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:converters="clr-namespace:Aagnaa_ImageEditor.Converters"
            xmlns:views="clr-namespace:Aagnaa_ImageEditor.Views"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="1300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!--<views:CropedImageView Grid.Column="0" x:Name="croppedFinalView"></views:CropedImageView>-->
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="300"></RowDefinition>
            </Grid.RowDefinitions>
            <!--image Editor for Post processing-->
            <telerik:RadImageEditorUI  Margin="8"/>

            <!--Processing Controls-->

        </Grid>
    </Grid>
</UserControl>


             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Aagnaa_ImageEditor"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:converters="clr-namespace:Aagnaa_ImageEditor.Converters"
            xmlns:views="clr-namespace:Aagnaa_ImageEditor.Views"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="1300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!--<views:CropedImageView Grid.Column="0" x:Name="croppedFinalView"></views:CropedImageView>-->
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="300"></RowDefinition>
            </Grid.RowDefinitions>
            <!--image Editor for Post processing-->
            <telerik:RadImageEditorUI  Margin="8"/>

            <!--Processing Controls-->

        </Grid>
    </Grid>
</UserControl>

 

 

Let me know if its common issue?

 

Regards

Hema

Masha
Telerik team
 answered on 10 May 2016
1 answer
92 views

i am using RadGridView to display data. in the UI design, I also apply AggregateFunctions for some columns (see below). But when I drag one column for grouping, the Aggregate result also show in the grid which looked not good. Any way to prevent when I manually drag columns for grouping?

 <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction ResultFormatString="{}{0:N4}"/>
                    </telerik:GridViewDataColumn.AggregateFunctions>

Yoan
Telerik team
 answered on 10 May 2016
2 answers
140 views

I'm having this weird issue with the RadChartView when I try to use label rotation to try to improve label legibility, but it seems like a lot of space is being wasted. I'm only adding the following code:

axisX.LabelTemplate = (DataTemplate)Resources["tinyTemplate"];
// The following lines are commented to achieve the noRotation.png image
axisX.LabelRotationAngle = -45;
axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;


<DataTemplate x:Key="tinyTemplate">
   <TextBlock FontSize="7pt"  Text="{Binding}" />
</DataTemplate>


axisX.LabelTemplate = (DataTemplate)Resources["tinyTemplate"];
axisX.LabelRotationAngle = -45;
axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;
Fabrice
Top achievements
Rank 1
 answered on 09 May 2016
1 answer
159 views

Hello,

I want to have a custom contextmenu per cell, I implemented this succesfully with the example given in this thread.

Now I want to add the functionality that the contextmenu will be displayed based on the row where the cursor is and the contextmenu is called, in another thread they point me to the RadContextMenu example of the Telerik Demos. 

So I created a custom class which inherits from the RadContextMenu and attach an implementation for the open event:

protected void GridViewContextMenu_Opened(object sender, RoutedEventArgs e)
{
    RadContextMenu menu = (RadContextMenu)sender;
    GridViewRow row = menu.GetClickedElement<GridViewRow>();
 
    if (row != null)
    {
        row.IsSelected = row.IsCurrent = true;
        GridViewCell cell = menu.GetClickedElement<GridViewCell>();
        if (cell != null)
        {
            cell.IsCurrent = true;
        }
    }
    else
    {
        menu.IsOpen = false;
    }
}

 

created 4 different contextmenus, 1 default and 3 other that depend on the cell where the user calls the contextmenu.

When I try setting this custom contextmenu in XAML as default for my GridView and as contextmenu for some cells using styles. I receive an InvalidOperationException stating that the given contextmenu is not a valid value for the ContextMenu property?

It worked with the regular ContextMenu, but when I change my custom ContextMenu to inherit from this class I cant call the function GetClickedElement<GridViewCell>()?

 

How can I solve this, I dont exactly understand why I get this exception with RadContextMenu and not with a regular ContextMenu.

Any help would be appreciated.

Regards,

 

Marcel

 

Stefan
Telerik team
 answered on 09 May 2016
5 answers
1.3K+ views

I'm trying to iterate through my RadGridView rows, but when I have more than 20 or 30 items, the loop doesn't get all rows.
For example: using this code in a radgridview with 5 items, I can get all of them and do whatever I want, but when my grid has more than 20 items, it gets only 10 rows. Is this a bug or something like that? How can I solve it?
Here's my code:

 

01.private List<object> ReturnListFounds(string text)
02.        {
03.            List<object> a = new List<object>();
04.            foreach (var item in myGrid.Items)
05.            {
06.                if (item == null)
07.                    continue;
08.                GridViewRow row = myGrid.ItemContainerGenerator.ContainerFromItem(item) as GridViewRow;
09. 
10.                if (row == null)
11.                    continue;
12. 
13.                foreach (GridViewCell cell in row.Cells)
14.                {
15.                    if (cell != null && cell.Value != null)
16.                    {
17.                        string str = cell.Value.ToString();
18. 
19.                        if (str.Equals(text, StringComparison.InvariantCultureIgnoreCase) || str.ToLower().Contains(text.ToLower()))
20.                        {
21.                            a.Add(row.Item);
22.                            break;
23.                        }
24.                    }
25.                }
26.            }
27. 
28.            return a;
29.        }

Dilyan Traykov
Telerik team
 answered on 09 May 2016
1 answer
240 views

Hello,
I am using RadCartesianChart with multiple series. I am using ScatterLineSeries. 

My requirement is, I want to click on ScatterLineSeries and show a Popup window with details related to that series.

Is it possible with RadCartesianChart and scatter lines series ? If so, how ? If not, what is the other way to do this ?

Petar Marchev
Telerik team
 answered on 09 May 2016
16 answers
547 views
I know you can double click the ScheduleView and show the add/edit appointment dialog, is it possible to show it using code behind (C#)?
Kalin
Telerik team
 answered on 09 May 2016
1 answer
142 views

I have a listbox which the user can drag from and drop on a scheduleview.. however I've restricted the user so that they can't drop back onto the listbox and therefore they also can't re-order the listbox.

To get this working was simple enough - however I had a bit of difficulty getting rid of the DropVisual that happens when you hover on the listbox with an item you are dragging.  (The visual I am talking about is the bar that appears above/below each listboxitem to indicate where it is going to drop - I want to get rid of this because the user can't drop here - I'm surprised its not supressed when AllowDrop is set to False).

I tried setting the DropVisualProvider to null on the Listbox itself - this in turn caused loads of silent NullReferenceExceptions and caused flickering when holding an item over the ListBox.  I then set the DropVisualProvider to a class which inherited from LinearDropVisualProvider and overrode the CreateDropVisual method to just return a blank StackPanel - this works flawlessly, but is there an easier/less hacky way of achieving this?

Masha
Telerik team
 answered on 09 May 2016
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?