Telerik Forums
UI for WPF Forum
5 answers
349 views

Hi,

I'm uploading simple PDF scans to SQL Server and then rendering later them from a memory stream using the RadPDFViewer, but it's been a little inconsistent.  Most of the files display properly, but every so often the PDFViewer does not display the file at all and the control is just a white blank.  Would the orientation (portrait vs landscape) of the scanned PDF file have any affect on this?

 

Also, I am not able to locate the PDFViewerNavigation control in my Toolbox, is this control included with the Telerik UI for WPF?

 

Thanks,

Don

rcmp-grc
Top achievements
Rank 1
 answered on 10 Jan 2017
1 answer
259 views

Is it possible to display text values in the cells or does it have to be numerical only? I don't need any totals or aggregates. I have managed to get the control to display my rows and columns correctly, but I'm not sure how to get it to display the values I need since they are text values.

I want to use this control because I don't know how many columns I will need and its much simpler to matrix my data and let the control figure it out. I could achieve the same results with a GridView, manually adding columns and using a converter to find the correct values, but it would be MUCH simpler to use a PivotGrid.

I have attached an image of what I'm trying to display. My class and data are below.

public class SettingCompareMatrix : IComparable<SettingCompareMatrix>
{
    public int SettingGroupIndex { get; set; }
    public string SettingGroup { get; set; }
    public int SettingIndex { get; set; }
    public string SettingName { get; set; }
    public string Name { get; set; }
    public string Value { get; set; }

    //For sorting the rows, instead of by alphebetical order. Another issue to figure out!
    public int CompareTo(SettingCompareMatrix other)
    {
        if (this.SettingGroupIndex > other.SettingGroupIndex)
            return 1;
        else if (this.SettingGroupIndex < other.SettingGroupIndex)
            return -1;
        else
        {
            if (this.SettingIndex > other.SettingIndex)
                return 1;
            else if (this.SettingIndex < other.SettingIndex)
                return -1;
            else
                return 0;
        }
           
    }
}

private List<SettingCompareMatrix> GeneratePivotData()
{
    return new List<SettingCompareMatrix>()
    {
        new SettingCompareMatrix() { SettingGroupIndex = 0, SettingGroup="Store", SettingIndex=0, SettingName="Create Store", Name="Store 1", Value="True" },
        new SettingCompareMatrix() { SettingGroupIndex = 0, SettingGroup="Store", SettingIndex=0, SettingName="Create Store", Name="Store 2", Value="False" },
        new SettingCompareMatrix() { SettingGroupIndex = 0, SettingGroup="Store", SettingIndex=1, SettingName="Information", Name="Store 1", Value="Modify" },
        new SettingCompareMatrix() { SettingGroupIndex = 0, SettingGroup="Store", SettingIndex=1, SettingName="Information", Name="Store 2", Value="Display" },
        new SettingCompareMatrix() { SettingGroupIndex = 1, SettingGroup="Categories", SettingIndex=0, SettingName="Category", Name="Store 1", Value="Add" },
        new SettingCompareMatrix() { SettingGroupIndex = 1, SettingGroup="Categories", SettingIndex=0, SettingName="Category", Name="Store 2", Value="Display" },
        new SettingCompareMatrix() { SettingGroupIndex = 2, SettingGroup="Supplier", SettingIndex=0, SettingName="Information", Name="Store 1", Value="Display" },
        new SettingCompareMatrix() { SettingGroupIndex = 2, SettingGroup="Supplier", SettingIndex=0, SettingName="Information", Name="Store 2", Value="Add" },
        new SettingCompareMatrix() { SettingGroupIndex = 2, SettingGroup="Supplier", SettingIndex=1, SettingName="Settings Price Matrix", Name="Store 1", Value="Add" },
        new SettingCompareMatrix() { SettingGroupIndex = 2, SettingGroup="Supplier", SettingIndex=1, SettingName="Settings Price Matrix", Name="Store 2", Value="Display" },
    };
}

<pivot:LocalDataSourceProvider x:Key="LocalDataProvider" AggregatesPosition="Rows" >
    <pivot:LocalDataSourceProvider.RowGroupDescriptions>
        <pivot:PropertyGroupDescription PropertyName="SettingGroup" />
        <pivot:PropertyGroupDescription PropertyName="SettingName" />
    </pivot:LocalDataSourceProvider.RowGroupDescriptions>
    <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
        <pivot:PropertyGroupDescription PropertyName="Name" />
    </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
    <pivot:LocalDataSourceProvider.AggregateDescriptions>
        <pivot:PropertyAggregateDescription PropertyName="Value"/>
    </pivot:LocalDataSourceProvider.AggregateDescriptions>
</pivot:LocalDataSourceProvider>

<pivot:RadPivotGrid Grid.Row="1" DataProvider="{StaticResource LocalDataProvider}"
                    ColumnGrandTotalsPosition="None" ColumnSubTotalsPosition="None"
                    RowGrandTotalsPosition="None"  RowSubTotalsPosition="None" />

Polya
Telerik team
 answered on 10 Jan 2017
4 answers
419 views

This is my first attempt with this grid. One of my columns contains datetime values. Because I want the button for the editor to always be visible, I created a CellTemplate as I saw mentioned in the forum. This works fine. However, once I'm in the editor, nothing will close or hide the editor, even if I click on another cell or control or hit Escape.

<telerik:GridViewDataColumn DataMemberBinding="{Binding Timestamp}" Width="200">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <telerik:RadDatePicker SelectedDate="{Binding Timestamp}" IsTooltipEnabled="False"/>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
Stefan Nenchev
Telerik team
 answered on 10 Jan 2017
1 answer
281 views

Hi 

I want to know if it is possible to activate a function who insert a floating text block inside my document like Word ?

If it doesn't, does you plan development of this function in the future ?

Martin Ivanov
Telerik team
 answered on 10 Jan 2017
3 answers
116 views

With version 2016 Q3 SP1 a RadTreeViewItem's Header is being emptied when I initiate editig with radTreeView.SelectedContainer.BeginEdit(). According to other posts in this forum this seems to be a previously known and corrected issue. Obviously it is back again.

Is there anything I can do to work around this issue?

Thanks

Michael

Petar Mladenov
Telerik team
 answered on 10 Jan 2017
1 answer
111 views
09-January-2017 a new version of Dev Craft Complete for WPFwas come (the information message was). But when tryed to load and install it the error message had place. Please tell me - why?
Peshito
Telerik team
 answered on 10 Jan 2017
10 answers
504 views
Hi, when entering the view, I would like the user to be instantly able to type away at the autocompletebox upon view loaded. I tried Autocompletebox.Focus event but that doesn't quite focus. May I ask how abouts do I focus Autocompletebox?
Nasko
Telerik team
 answered on 10 Jan 2017
0 answers
130 views

 Hi,

I have two RadSplitContainers that are DockedLeft and a DocumentHost which internally contains another RadSplitContainer in my window.

I'm trying the set the default widths of the two RadSplitContainers to occupy 20% and 30% of the MainWindow width and the rest 50% to be occupied by the DocumentHost.

To achieve this the two RadSplitContainers Widths and binded to the parent window width and using a converter the widths are split.

Problem: The converter is not invoked for these two docked RadSplitContainers that are outside the DocumentHost.

However, the converter is invoked for the RadSplitContainer in DocumentHost.

Attaching the screenshot. The docked RadSplitContainers have default widths, ideally they should occupy 20% and 30% of the window and they should maintain the same when the window is restored or resized.

Version used: 2014.3.1117.45

Below is the code sample:

xaml:

<Window x:Class="DockingWPF.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"
        xmlns:dockingWpf="clr-namespace:DockingWPF"
        Title="MainWindow" WindowState="Maximized" >
    <Window.Resources>
        <dockingWpf:WidthRatioConverter x:Key="WidthRatioConverter"/>
    </Window.Resources>
    
    
    <Grid>
            <telerik:RadDocking>
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane Header="Canvas" CanFloat="False"  CanUserPin="False">
                            <Grid Background="Aqua">
                            </Grid>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>

            <telerik:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=ActualWidth, Converter={StaticResource WidthRatioConverter}, ConverterParameter=TempBrowser, Mode=OneWay}">
                <telerik:RadPaneGroup x:Name="ApplicationPanesGroup" >
                        <telerik:RadPane Header="TemplateBrowser" CanFloat="False" CanDockInDocumentHost="False" IsPinned="True" CanUserClose="False" ScrollViewer.HorizontalScrollBarVisibility="Auto" />
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>

            <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft" Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=ActualWidth, Converter={StaticResource WidthRatioConverter}, ConverterParameter=AppBrowser, Mode=OneWay}">
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="ApplicationTree" IsPinned="True" CanUserClose="False"/>
                    </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>
</Window>

Converter:

public class WidthRatioConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var param = parameter as string;
            if (!string.IsNullOrEmpty(param))
            {
                switch (param)
                {
                    case "TempBrowser":
                        return ((double) value/5);

                    case "AppBrowser":
                        return ((double) value/3);
                }
            }

            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return null;
        }
    }

Raghavendar
Top achievements
Rank 1
 asked on 10 Jan 2017
2 answers
113 views

Hi,

Need some help please

How can I bind a  RadPivotGrid dynamically from codebehind?

The select query can change depending on a dropdownlist I have on the page so the field names will also change.

Example of select :

Select CompanyName, EmployeeId, FirstName,LastName, Salary from Table1

Example of Grid

CompanyName  Number of employees  Total Salary

Company1              23                                  345,676

 

newp
Top achievements
Rank 1
 answered on 09 Jan 2017
5 answers
534 views
I have an application that has a RadRibbonWindow form, with a grid and then a RadRibbonView.

<telerik:RadRibbonWindow>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition/>
</Grid.RowDefinitions> <telerik:RadRibbonView>
    </telerik:RadRibbonView>
  </Grid>
</telerik:RadRibbonWindow>

This is then styled, using the Windows 8 style.

All is working as you'd expect. My issue is with the min/max/close icons on the form. They look too block and thick, particularly when maximized. The restore icon in especially blob like. Is there a way to change the styling of these buttons to use finer lines, or an outline similar to the office style?

Cheers
Evgenia
Telerik team
 answered on 09 Jan 2017
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?