Telerik Forums
UI for WPF Forum
1 answer
162 views
Hi

Is it possible to enable cell selection for the RadPivotGrid so that you are able to select a block of cells and then copy and paste these to Excel ?

Regards
Ryan
Kalin
Telerik team
 answered on 19 Aug 2014
11 answers
433 views
Hello,

I am using the RadRichTextBox in a custom reporting solution in my application.  I have a situation where the user has entered comments in rtf format in our application and I need to show these in a report.  However, the comments may exceed the space on one page, so I need to detect the portion of the document that is visible within the bounds of the control and then split the document up over two or more pages, each with its own RadRichTextBox control.

When I check the CaretPosition at the end of the document the Y value on the Location property is less than the height of my control, but the text exceeds the bounds of the control when viewed.

Here is the code I am using:

DocumentPosition caretPos = null;
DocumentPosition endOfDocument = null;
 
var rtfText = myRtfText;
if (rtfText != null)
{
    var provider = new RtfFormatProvider();
    var radDocument = provider.Import(rtfText);
    radDocument.SectionDefaultPageSize = new Size(maximumSize.Width, maximumSize.Height);
    var radRichTextBox = new RadRichTextBox{Document = radDocument};
 
    DocumentPosition tempPos = radRichTextBox.Document.CaretPosition;
    tempPos.MoveToLastPositionInDocument();
    endOfDocument = new DocumentPosition(tempPos);
 
    caretPos = radRichTextBox.Document.CaretPosition;
    caretPos.MoveToFirstPositionInDocument();
 
    if(caretPos != endOfDocument)
    {
        var start = new DocumentPosition(radRichTextBox.Document.CaretPosition);
        while (caretPos.Location.Y - start.Location.Y < maximumSize.Height)
        {
            if (!radRichTextBox.Document.CaretPosition.MoveToCurrentLineEnd())
                break;
            if (!radRichTextBox.Document.CaretPosition.MoveNext())
                break;
        }
        if (caretPos.Location.Y - start.Location.Y > maximumSize.Height)
        {
            // Back up so the content fits within the range
            radRichTextBox.Document.CaretPosition.MoveToLastPositionInPreviousParagraph();
        }
 
        var docSelection = new DocumentSelection(radRichTextBox.Document);
        docSelection.SetSelectionStart(start);
        docSelection.AddSelectionEnd(caretPos);
 
        var docFragment = new DocumentFragment(docSelection);
        var newDoc = new RadDocument();
        var editor = new RadDocumentEditor(newDoc);
        editor.InsertFragment(docFragment);
        var rtfSegment = provider.Export(newDoc);
     }
  }

Also, attached is an image of the report with the control on it, clearly showing that there is text beyond the bottom of the control.

Any insight you could offer would be appreciated.

Thanks,

Peter
Kammen
Telerik team
 answered on 19 Aug 2014
3 answers
258 views
I have an AggregateDescriptions like this

<DataProviders:LocalDataSourceProvider.AggregateDescriptions>
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Count" AggregateFunction="Count" />
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Sum" AggregateFunction="Sum" />
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Max" AggregateFunction="Max" />
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Min" AggregateFunction="Min" />
</DataProviders:LocalDataSourceProvider.AggregateDescriptions>

When using them in the RadPivotFieldList in the 'Value' -cell, they all show up as "Prize".
Is it possible to set a DisplayName or something like that?

And what about formatting money? Is it possible to set the decimals?


Kalin
Telerik team
 answered on 19 Aug 2014
12 answers
147 views
How do I set the Zoom Range of a PolylineData that it being used on the VisualizationLayer?

Andrew
Andrey
Telerik team
 answered on 19 Aug 2014
6 answers
735 views
Hello,

I need to remove GridView's header row border partially to display only right and bottom sides(Grid.png). I've tried to style HeaderRow and HeaderCell but it does not help so the whole border is seen.  Any idea how can I achieve that?  Here is my styles

<Style x:Key="gridheaderstyle"  TargetType="telerik:GridViewHeaderRow">
        <Setter Property="BorderBrush"      Value="Transparent" />
        <Setter Property="BorderThickness"  Value="0 0 0 0" />
        <Setter Property="Background"       Value="Transparent" />
</Style>
 
<Style x:Key="gridheadercellstyle"  TargetType="telerik:GridViewHeaderCell">
        <Setter Property="Background"       Value="Transparent" />
        <Setter Property="BorderBrush"      Value="Black" />
        <Setter Property="BorderThickness"  Value="0 0 1 1" />
</Style>
Tigran
Top achievements
Rank 1
 answered on 19 Aug 2014
5 answers
173 views
How  can I add an custom annotation in the Header and footer ? Is there a way to do it ?

Document.CaretPosition doesnt get the Header position. I dont find any move functions to move in to the Header as well ?.

I added custom annotation on the document as below :

Document.InsertCustomAnnotationRange(position, position, new RangeStart(id),  new RangeEnd());

Didn't find any functions to add custom annotations in the Header or move in to the Header  ? Could you help me in this please ?

Thanks
Anand

Anand
Top achievements
Rank 1
 answered on 19 Aug 2014
1 answer
258 views
Hi,

We are considering whether to buy the WPF Telerik controls. However we have some difficulties to customize the data filter operators for DataFilter control.
For example, if i would like to only display IsEqualTo or NotEqualTo as operator selection only, what should i do? 

Also, we have custom data type that might need to use a custom filter operator list. Can we pass in our own set of operator to the control? For example, some property like OperatorSource = {Binding OperatorList}?

Hope to hear from you soon.

Thank you.
Dimitrina
Telerik team
 answered on 19 Aug 2014
3 answers
111 views

We are using a RadDataFilter to let the user create simple filter expressions. How can we modify the Members shown in the combobbox PART_SimpleFilterMemberComboBox?

Assume we filter on a list of employees where the employee class has three properties ID, Name and Age and we only want Name and Age to appear in the
PART_SimpleFilterMemberComboBox?
Dimitrina
Telerik team
 answered on 19 Aug 2014
5 answers
328 views
I got following error while running a coded ui automation against WPF windows application with Telerik control.

Test method XXXX threw exception: System.ArgumentException: The following is not a valid technology name: Telerik.UIA. To search for a control, you must specify a valid technology name.Parameter name: TechnologyName

The code generated by coded UI is like following...

        #region Properties
        public UITestControl UI_caseIdTextBoxEdit
        {
            get
            {
                if ((this.mUI_caseIdTextBoxEdit == null))
                {
                    this.mUI_caseIdTextBoxEdit = new UITestControl(this);
                    #region Search Criteria
                    this.mUI_caseIdTextBoxEdit.TechnologyName = "Telerik.UIA";
                    this.mUI_caseIdTextBoxEdit.SearchProperties[UITestControl.PropertyNames.ControlType] = "Edit";
                    this.mUI_caseIdTextBoxEdit.SearchProperties["AutomationId"] = "_caseIdTextBox";
                    this.mUI_caseIdTextBoxEdit.SearchProperties["HelpText"] = null;
                    this.mUI_caseIdTextBoxEdit.WindowTitles.Add("Glidewell Office");
                    #endregion
                }
                return this.mUI_caseIdTextBoxEdit;
            }
        }

The automation can run on my dev machine but failed to run on test machine without VS.

I copied the Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore.dll together with my automation binaries. Also I installed Telerik UI for WPF and Testing Framework on the test machine. But I still got the same error.






Paul
Top achievements
Rank 1
 answered on 18 Aug 2014
4 answers
300 views

Hi all,

I think i'm missing something obvious...

I want to have some friendly names on my mail merge fields. (namely spaces in the field names)
So i have a class for instance


Public Class someclass
{
<DisplayName("This is the complex description of the field")>
Public property thisfieldnamehasacomplexdescription as string
  
Public property anothercomplexfield as string
  
}


This is the only way i know to get "Friendly" names in the dropdown that is the mail merge.
So the two fields turn up okay as :
"This is the complex description of the field" 
"anothercomplexfield"

but only 
anothercomplexfield  actually populates with data when you do the merge.

Am i going to have to template the raddropdownbutton that holds the mail merge fields?
Is there an example of this somewhere?


Also a sub question. How do i add a scroll bar??

Petya
Telerik team
 answered on 18 Aug 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
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
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?