Telerik Forums
UI for WPF Forum
3 answers
228 views
Hi.
I'd like to know is there any way to change two labels in pivotGrid (actually i found site with resource names and changed that to polish, but some of them are still in english version):

http://puu.sh/5sKXm.png
I need to change Grand Total and I need to change month names (from eng to pl) when user filter data using DateTime.

Thanks in advance!

@EDIT
One more question ;) Is there any way to save user settings and restore them whenever user open window with pivotgrid? I'd like to save somewhere Filter, row, column labels, so it will be everything from there : http://puu.sh/5sL2H.png
Don't need help for @EDIT - found that: http://www.telerik.com/community/forums/wpf/pivotgrid/saving-the-radpivotgrid-localdatasourceprovider.aspx and works great ;)
Polya
Telerik team
 answered on 01 Dec 2014
2 answers
282 views
1- What I have:
I applied same example in here http://www.telerik.com/help/wpf/raddiagram-extensions-toolbox.html
But, the content of myShape is an image (I dnt have a geometry) when I drop it into RadDiagram it generates new instance of one of my custom classes in deserialization. I'm doing that by serializing the Header which is the hint key for me in deserializtion for generating the right custom class for the dropped shape.
my Events:
void diagram_ShapeSerialized(object sender, SerializationEventArgs<IDiagramItem> e)
        {
            var shape = e.Entity as RadDiagramShape;
            if (shape != null)
            {
                var myShape = shape.DataContext as GalleryItem;                                              
                if (myShape != null)
                {
                        e.SerializationInfo["DataContent"] = myShape.Header;
                }
             }
}

        private void RadDiagram_ShapeDeserialized(object sender, ShapeSerializationRoutedEventArgs e)
        {
            var shape = e.Shape as RadDiagramShape;
            if (shape != null)
            {
                shape.Content = e.SerializationInfo["DataContent"].ToString();
                switch (shape.Content.ToString())
                {
                    //Charts
                    case "TimeChart":
                      shape.Content = new MyTimeChart(); break;

                    case "ValueChart":
                      shape.Content = new MyTimeValue(); break;
                   //...etc
                }
               }
             }

2- What I need:
When I save the Diagram by owner.fileManager.SaveToFile(); 
I can't find inside the xml file the Content property or any SerializationInfo that's mean nothing could be serialized! I added this line 
e.SerializationInfo["Content"] = myShape.Header;

in Serialization Event and still the same

I need to retrieve the same Design the user will make!

In Debug mode, Saving  doesn't hit the Serialization Event >>> that's mean it depends on the first serialization!
While it hits DeSerialization Event when I'm dropping the shape and when I'm loading the xml
And in Loading file time It always breaks inside DeSerialization Event at 
                shape.Content = e.SerializationInfo["DataContent"].ToString();<br>                shape.Content = e.SerializationInfo["Content"].ToString();

and says "Object reference not set to an instance of an object"!

I need help! I thought a loooot of solutions but I nothings worked! Reply me please ASAP!
Thank you.
Alaa
Top achievements
Rank 1
 answered on 01 Dec 2014
1 answer
133 views
We are launching Insert Symbol Dialog from RadRichTextBox in WPF.

I want to set default Font as "Verdana" and Disable Font DropDown in InsertSymbol Dialog.
Tanya
Telerik team
 answered on 01 Dec 2014
6 answers
129 views
I am using Telerik Ui for wpf in which I am using Telerik RadDiagram.I am trying to create many shapes on the WPF and export that to the image. I am able to export that to the image. If on the WPF application, my one of the shapes is selected and I click on save, I get that text box as selected even in the image. The image shown in abcde.png is getting exported but I want the image to be like abcdef.png even if the user has the focus on the node before doing a click on save.

I noticed that if i do a left-click on the screen of WPF where there are no diagrams, the selected element is no more selected and exporttoimage function gets me the correct image. But when I programatically generated a left mouse click on screen and then called ExportToImage function, this doesnt get me the correct image. Is there any way in which I am can enable ExportToImage function to do this??



Pavel R. Pavlov
Telerik team
 answered on 01 Dec 2014
2 answers
230 views
Hello !
is it possible to automatic close a menu of a minimized outlookbar after selecting an item in a MVVM Szenario ?
s. attached picture



Thilo
Top achievements
Rank 1
Iron
 answered on 28 Nov 2014
6 answers
367 views
Hello,

when i select a row on gridside the ganttarea is scrolling to the related ganttbar (startdate).
Is there a possibility to deactivate this behavior?

Greetings,
Richard

Kalin
Telerik team
 answered on 28 Nov 2014
3 answers
647 views
I have a project where I have to read a delimited file and show the data in the grid.  The user can edit the data and press the save button which will take the data table and write it out to a delimited file.  I cannot use a business object as the format of the input file is always different.  I am able to parse my input file and build dynamically the grid columns and populate it with data.  The issue that I have not been able to resolve is when the user edits a cell in the grid and presses enter, I see the new data in the CellEditEnd event, but do not see the data in the RowEditEnded.  Also the grid never updates the screen with the new change, it is just showing the original data and the data table is also not being updated with the new value.  I wrote this small Helloworld application to demonstrate the issue and what I am trying to do.  Any help will be greatly appreciated.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Data;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;

namespace WpfPOC2
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
LoadRowTable();
}
private void LoadRowTable()
{
DataTable dt = new DataTable();
RowDataGrid.KeyboardCommandProvider = new CustomKeyboardCommandProvider(RowDataGrid);
RowDataGrid.CanUserDeleteRows = false;
RowDataGrid.CanUserInsertRows = false;
RowDataGrid.CanUserReorderColumns = false;
RowDataGrid.SelectionMode = SelectionMode.Multiple;
GridViewSelectColumn selectBox = new GridViewSelectColumn() { UniqueName = "SelectBox", Header = "Select" };
RowDataGrid.Columns.Add(selectBox);

GridViewDataColumn colElement = new GridViewDataColumn() { DataMemberBinding = new Binding("Col1"), Header = "Col1", UniqueName = "Col1" };
RowDataGrid.Columns.Add(colElement);
DataColumn[] dc = new DataColumn[1];
dc[0] = new DataColumn();
dc[0].ColumnName = "Col1";
dt.Columns.Add(dc[0]);
dt.PrimaryKey = dc;

colElement = new GridViewDataColumn() { DataMemberBinding = new Binding("Col2"), Header = "Col2", UniqueName = "Col2" };
RowDataGrid.Columns.Add(colElement);
dt.Columns.Add("Col2", typeof(string));

colElement = new GridViewDataColumn() { DataMemberBinding = new Binding("Col3"), Header = "Col3", UniqueName = "Col3" };
RowDataGrid.Columns.Add(colElement);
dt.Columns.Add("Col3", typeof(string));

for (int i = 0; i < 20; i++)
{
object[] rowArray = new object[3];
DataRow row = dt.NewRow();
rowArray[0] = "ColA-" + i.ToString();
rowArray[1] = "ColB-" + i.ToString();
rowArray[2] = "ColC-" + i.ToString();
row.ItemArray = rowArray;
dt.Rows.Add(row);
}
RowDataGrid.ItemsSource = dt;
}

private void RowDataGrid_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
Console.Write(e);
}

private void RowDataGrid_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
{
if (e.EditOperationType == GridViewEditOperationType.Edit)
{
RowDataGrid.CommitEdit();
//Update the entry in the data base based on your logic.
}
}
}

class CustomKeyboardCommandProvider : DefaultKeyboardCommandProvider
{
private GridViewDataControl parentGrid;
private DefaultKeyboardCommandProvider defaultKeyboardProvider;
private CustomKeyboardCommandProvider customKeyboardProvider;
public CustomKeyboardCommandProvider(GridViewDataControl grid)
: base(grid)
{
this.parentGrid = grid;
}
public override IEnumerable<ICommand> ProvideCommandsForKey(Key key)
{
List<ICommand> commandsToExecute = base.ProvideCommandsForKey(key).ToList();

if (key == Key.Enter)
{
commandsToExecute.Clear();
commandsToExecute.Remove(RadGridViewCommands.MoveDown);
commandsToExecute.Add(RadGridViewCommands.CommitEdit);
}
return commandsToExecute;
}
}
}
​
Dimitrina
Telerik team
 answered on 28 Nov 2014
1 answer
393 views
I would remove the RadGridView scrollbars, I will use the RadDataPager to display only the amount of items that fit on the screen. But is not working. Any idea how to proceed? Sorry for my bad English.

My Code:

<Grid>
 
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition x:Name="rGridView"
                       Height="*" />
    </Grid.RowDefinitions>
 
    <telerik:RadDataPager PageSize="{Binding LinhasGridView, ElementName= ucCadastroCidade}"
                          Grid.Row="0"
                          Source="{Binding Items, ElementName=dtCidade}"
                          IsTotalItemCountFixed="True"
                          DisplayMode="FirstLastPreviousNextNumeric, Text" />
 
    <telerik:RadGridView x:Name="dtCidade"
                         Grid.Row="1"
                         AutoGenerateColumns="False"
                         ItemsSource="{Binding ListaCidade, ElementName= ucCadastroCidade}">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn Width="*"
                                        Header="Cidade"
                                        DataMemberBinding="{Binding nm_Cidade}" />
            <telerik:GridViewDataColumn Width="*"
                                        Header="Estado"
                                        DataMemberBinding="{Binding UF.nm_Uf}" />
        </telerik:RadGridView.Columns>
    </telerik:RadGridView >
 
</Grid>


Here I do the calculation:

LinhasGridView = (double)(rGridView.ActualHeight / dtCidade.RowHeight);

Thank you!

Boris
Telerik team
 answered on 28 Nov 2014
1 answer
285 views
I would like to add a image in Raddocument  behind table. 
How can I do this?

Tanya
Telerik team
 answered on 27 Nov 2014
3 answers
143 views
I'm programmatically generating LegendItems for a RadLegend object, but the labels for the legend all seem to be partially transparent or grayed out or something. I can't find any properties to change this, and it doesn't seem like default behavior since the documentation doesn't show anything like this.

XAML:
<UserControl x:Class="Construct.UX.Views.Visualizations.DataLegend"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerik:RadLegend x:Name="Legend" />
    </Grid>
</UserControl>


Item generation code:
// ...
 
LegendItem newLegendItem = new LegendItem();
newLegendItem.MarkerFill = new SolidColorBrush(newEntry.Color);
newLegendItem.Title = newEntry.Name;
 
// ...
 
Legend.Items.Add(newLegendItem);
 
// ...
Sia
Telerik team
 answered on 27 Nov 2014
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?