Telerik Forums
UI for WPF Forum
10 answers
201 views
Hi,

I am using the RadSpreadsheet to manipulate a workbook which I exported and stored in a database.

Once imported back from the database I allow the user to modify the workbook. I am detecting when the user makes a change to the content using the WorkbookContentChanged event. If a change is detected I enable my apps save button to allow the user to save the workbook back to the database.

My issue occurs when I try to do things such as rename a worksheet or freeze panes. The WorkbookContentChanged event is not fired and therefore the user will not be given the option by my app to save the workbook back to the database.

Is there another event I can hook up to or is this a bug with the WorkbookContentChanged not firing for some changes?

Thanks
Anthony
Nikolay Demirev
Telerik team
 answered on 05 Dec 2014
1 answer
266 views
When I select a single line(See screenshot 1) and convert into an annotation range using InsertFragment, it is getting inserted.  (See screenshot 2).

But, when I select multiple lines(See screenshot 3), InsertFragment is not working.

Code Sample:

            RadDocument associatedDocument = associatedRichTextBox.Document;
            DocumentSelection selection = associatedDocument.Selection;
            DocumentPosition documentPosition = associatedDocument.CaretPosition;

            string selectedText = GetSelectedText(associatedDocument);

            RadDocument tempDocument = new RadDocument();
            Section section = new Section();
            Paragraph paragraph = new Paragraph();

            try
            {
                //BookmarkRangeStart bookmarkRangeStart = new BookmarkRangeStart();
                //BookmarkRangeEnd bookmarkRangeEnd = new BookmarkRangeEnd();
                //bookmarkRangeEnd.PairWithStart(bookmarkRangeStart);

                //paragraph.Inlines.Add(bookmarkRangeStart);
                //paragraph.Inlines.Add(bookmarkRangeEnd);

                HeadingRangeStart headingRangeStart = new HeadingRangeStart();
                HeadingRangeEnd headingRangeEnd = new HeadingRangeEnd();
                headingRangeEnd.PairWithStart(headingRangeStart);

                Span spanSelectedText = new Span(selectedText.TrimEnd());
                spanSelectedText.FontWeight = FontWeights.Bold;
                spanSelectedText.ForeColor = Colors.Red;

                paragraph.Inlines.Add(headingRangeStart);
                paragraph.Inlines.Add(spanSelectedText);
                paragraph.Inlines.Add(headingRangeEnd);

                section.Blocks.Add(paragraph);
                tempDocument.Sections.Add(section);
                tempDocument.MeasureAndArrangeInDefaultSize();
                tempDocument.Selection.SelectAll();

                associatedRichTextBox.UpdateEditorLayout();
                associatedRichTextBox.InsertFragment(tempDocument.Selection.CopySelectedDocumentElements(true));
                associatedRichTextBox.Document.Selection.Clear();

                associatedRichTextBox.UpdateEditorLayout();
            }

Please suggest a solution.
Svetoslav
Telerik team
 answered on 05 Dec 2014
1 answer
86 views
Dear support,

in Excel the cell format "#.##0,00;-#.##0,00;;@" suppresses values equal zero i.e. no value is displayed in the cell.

This format-string does not work in your spread sheet. Is there another format string to achieve this.

Thanks in advance

Marcus

Tanya
Telerik team
 answered on 05 Dec 2014
1 answer
76 views
Hi ,

I was trying to import the data using RTFFormatProvider.import(string) method.
It is taking so much time to execute this.
The parameter which i was passing has more than 5Lakhs characters.
Do we have any alternative or something else to improve this performance.

Note:I am getting data from the above method but the only thing is taking so much time.

Could you pls throw your thoughts on this.
Todor
Telerik team
 answered on 05 Dec 2014
1 answer
130 views
Hi ,

I was trying to import the data using RTFFormatProvider.import(string) method.
It is taking so much time to execute this.
The parameter which i was passing has more than 5Lakhs characters.
Do we have any alternative or something else to improve this performance.

Note:I am getting data from the above method but the only thing is taking so much time.

Could you pls throw your thoughts on this.
Todor
Telerik team
 answered on 05 Dec 2014
1 answer
120 views
Hello Telerik

I would like to publish some source code examples in my Bog, among other things with Telerik-Controls. But of course I do not want to use the regular Telerik Dlls. Is there a link to download your demo dlls, which you also get when creating a test account.

Greetings Uwe
Dimitrina
Telerik team
 answered on 04 Dec 2014
1 answer
208 views
Hi,

I want to insert a row to a specific index which the user chooses, how can i do it? i see that adding a new row is or in the to or at the button not in the muddle of the grid, 

thanks,
Rachel.
Boris
Telerik team
 answered on 04 Dec 2014
3 answers
270 views
Hello, I want to reference the default template of the MilestoneContainer but I don't achieve this.
the goal is to use the default template and override when a dataTrigger is firing
I try to only define the data trigger
<Style BasedOn="{StaticResource ResourceKey={x:Type telerik:MilestoneContainer}}" TargetType="{x:Type telerik:MilestoneContainer}">

                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Converter={StaticResource ObjectAndTypeToVisibilityConverter}, ConverterParameter={x:Type vm:GanttTaskModelePlanningFamille}}" Value="True">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate>
                                        <Rectangle Width="3"
                                                   Height="24"
                                                   Fill="{TemplateBinding Background}" />
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
It's no working, trigger have no action
I try to reference the default template in my style definition (to force the trigger)
<Setter Property="Template" Value="{StaticResource MilestoneContainerTemplate}" />
But still not working, the resource is not know
I also try to do reference at resource using the telerik dll, but the import failed (build failed)
<ResourceDictionary Source="pack://application:,,,/Telerik.Windows.Controls.GanttView;component/Telerik.Windows.Controls.GanttView.xaml" /> 

Have you any idea how I can solve my problem ?

Thanks






Masha
Telerik team
 answered on 04 Dec 2014
3 answers
207 views
I came across a strange case when I was writing code for saving FilterDescriptors settings for RadDataFilter. The default value for string filter editor is OperatorValueFilterDescriptorBase.UnsetValue, the FilterDescriptor.Value is equal to OperatorValueFilterDescriptorBase.UnsetValue (FilterDescriptor .Value == OperatorValueFilterDescriptorBase.UnsetValue). When I save and read this value from isolated storage is not equal to OperatorValueFilterDescriptorBase.UnsetValue. See example bellow.

The following example is completely useless but it shows error.

MainWindow.xaml:
<Window x:Class="TestTelerikWpfApp.MainWindow"
        xmlns:local="clr-namespace:TestTelerikWpfApp"
        Title="MainWindow" Height="300">
    <Window.Resources>
    </Window.Resources>
    <StackPanel>
        <TextBox telerik:PersistenceManager.StorageId="textBox" />
        <StackPanel Orientation="Vertical">
            <telerik:RadButton Content="Save" Click="SaveButton_Click" />
            <telerik:RadButton Content="Read" Click="ReadButton_Click" />
        </StackPanel>
    </StackPanel>
</Window>

MainWindow.xaml.cs
namespace TestTelerikWpfApp
{
    using System.Windows;
    using System.Windows.Controls;
    using Telerik.Windows.Persistence.Services;
    using Telerik.Windows.Persistence.Storage;
 
    public partial class MainWindow : Window
    {
        private IsolatedStorageProvider isoProvider;
 
        public MainWindow()
        {
            InitializeComponent();
 
            ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(TextBox), new UnsetValuePropertyProvider());
 
            isoProvider = new IsolatedStorageProvider();
        }
 
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            isoProvider.SaveToStorage();
        }
 
        private void ReadButton_Click(object sender, RoutedEventArgs e)
        {
            isoProvider.LoadFromStorage();
        }
    }
}

For one TextBox I save or read data to isolated storage.

UnsetValuePropertyProvider.cs:
namespace TestTelerikWpfApp
{
    using Telerik.Windows.Data;
    using Telerik.Windows.Persistence.Services;
 
    class UnsetValuePropertyProvider : ICustomPropertyProvider
    {
        public CustomPropertyInfo[] GetCustomProperties()
        {
            return new CustomPropertyInfo[]
            {
                new CustomPropertyInfo("UnsetValue", typeof(UnsetValueProxy))
            };
        }
 
        public void InitializeObject(object context)
        {
        }
 
        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }
 
        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return new UnsetValueProxy() { Value = OperatorValueFilterDescriptorBase.UnsetValue };
        }
 
        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            var unsetValueProxy = value as UnsetValueProxy;
            var isUnsetValueSame = unsetValueProxy.Value == OperatorValueFilterDescriptorBase.UnsetValue; // isUnsetValueSame = false !!!
        }
    }
}

UnsetValueProxy.cs:
namespace TestTelerikWpfApp
{
    class UnsetValueProxy
    {
        public object Value { get; set; }
    }
}

In ProvideValue method I pass to proxy object OperatorValueFilterDescriptorBase.UnsetValue value and in RestoreValue unsetValueProxy.Value is not equal to OperatorValueFilterDescriptorBase.UnsetValue and it should be. See also locals tab in debug mode (example.png).
Pawel
Top achievements
Rank 1
 answered on 04 Dec 2014
4 answers
206 views
Hi,

What are the localization strings to datetimepicker - navigation popup controls (Close-button, Clock) ?

I'm using RadControls for WPF (WPF40_2011_2_0712)

Regards,
Auvo
Yana
Telerik team
 answered on 04 Dec 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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?