Telerik Forums
UI for WPF Forum
4 answers
367 views
Hi Telerik Team,

I have a sheet and should print it directly in default printer. I'm using RadSpreadsheet, but does is not working.  I follow the documentation shown: http://www.telerik.com/help/wpf/radspreadsheet-overview.html. Basicly, I do:

RadSpreadsheet radSpreadSheet = new RadSpreadsheet();
radSpreadSheet.Workbook = myWorkbook;
radSpreadSheet.ActiveSheet = myWorkbook.Worksheets[0];
PrintWhatSettings printWhatSettings = new PrintWhatSettings(ExportWhat.ActiveSheet, false);
radSpreadSheet.Print(printWhatSettings);

The above code doesn't prints the file.

What I'm doing wrong?

PS: I'm evaluating the components for a new project (The trial version).

Thanks.
Tanya
Telerik team
 answered on 21 May 2015
4 answers
303 views

verson: 2014.3.1021.40

xaml:

<telerik:RadPropertyGrid x:Name="grdTestProperty"
                          Item="{Binding TestProperty, Mode=OneWay}" SearchBoxVisibility="Collapsed" SearchInNestedProperties="False"
                          FieldIndicatorVisibility="Visible"
                          AutoGeneratePropertyDefinitions="True"
                          NestedPropertiesVisibility="Visible"
                          LabelColumnWidth="110" RenderMode="Flat"
                          AutoGeneratingPropertyDefinition="grdTestProperty_AutoGeneratingPropertyDefinition" />

 

Code Behind:

private void grdTestProperty_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e)
        {
            // Encounter this warning when set IsExpanded = true:
            e.PropertyDefinition.IsExpanded = true;
        }

 

Nested Property:

[DataMember()]
[Browsable(true)]
[Display(Order = 5, GroupName = "PropGroup_Electrical", Name = "PropName_ElecItem", Description = "PropDesc_ElecItem", ResourceType = typeof(UIStringTable))]
public ElectricalTestItem ElecItem
{
    get { return m_ElecItem; }
    private set
    {
        m_ElecItem = value;
        NotifyOfPropertyChange(() => ElecItem);
    }
}

 

Warning:

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadPropertyGrid', AncestorLevel='1''. BindingExpression:Path=FieldIndicatorVisibility; DataItem=null; target element is 'Grid' (Name='FieldIndicator'); target property is 'Visibility' (type 'Visibility')

Stefan
Telerik team
 answered on 21 May 2015
4 answers
181 views

Hallo,

 is there some easy way to add click event or double click event on group of shapes?

 

thank you

best regards 

Jakub

Jakub
Top achievements
Rank 1
 answered on 21 May 2015
5 answers
417 views
Hello,

I have a trouble Saving a resource dictionary which uses Telerik.Windows.Controls assembly. Telerik.Windows.Controls.

The exception thrown:

An unhandled exception of type 'System.NotSupportedException' occurred in System.dll

Additional information: 'Office2013ResourceKeyTypeConverter' is unable to convert 'Telerik.Windows.Controls.Office2013ResourceKey' to 'System.Windows.Markup.MarkupExtension'.

Part of xaml that's causing the problem:

<Grid>
                <Path
                    Stretch="Fill"
                    Fill="{telerik1:Office2013Resource ResourceKey=ValidationBrush}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="True"/>
                <Border Background="{telerik1:Office2013Resource ResourceKey=ValidationBrush}" Margin="5 0 0 0" Padding="1">
                    <ContentPresenter
                        Content="{Binding Error}"
                        TextBlock.Foreground="{telerik1:Office2013Resource ResourceKey=MainBrush}"
                        Margin="4 2"
                        TextBlock.FontSize="15"
                         />
                </Border>
            </Grid>
            <ContentControl/>
        </Grid>

and namespace mapping:

xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"

I load this resource dictionary with

var myDict = Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;

and then try to save it with:

System.Windows.Markup.XamlWriter.Save(myDict);

And that's when the exception is thrown.

Compiler tooltip: "Local property 'ResourceKey' can only be applied to types that are derived from ThemeResourceExtension`1"

I've checked it, and Office2013ResourceExtension derives from ThemeResourceExtension`1.

What might be the problem here?
Evgenia
Telerik team
 answered on 21 May 2015
1 answer
222 views
i want to use a radAutocompletebox in my application. the ItemSource is dynamically from my database. i have a code like this: var list = extrainfo.database.UserPrivateInfoes;
foreach (var item in list)
{
obs.Add( new RadAutoCompleteBoxItem{Content= item.UName} );
}
TX_Receiver.ItemsSource = obs;which the obs is observablecollection .the problem is when the items are shown in dropdown i have an item with TWO CROSS BUTTON for remove. actually it is not nice enough!! but when i add a list of String to ItemSource the problem is resolved. i need to have an item not just with a string for its name, i need more info (like UID) for every item. is there any solution??
Nasko
Telerik team
 answered on 21 May 2015
1 answer
132 views

Hi!

I Have a GridView loaded with 2000 records, grouped by one column and paginated using the RadDataPager.

To make the grouping and pagination work, i needed to use a PagingBeforeGroupingQueryableCollectionView. With a standard Collection the paging was not working correctly as it counts the groups per page and not total items per page:

public class PagingBeforeGroupingQueryableCollectionView : QueryableCollectionView
{
    public PagingBeforeGroupingQueryableCollectionView(IEnumerable source)
        : base(source)
    {
    }
 
    protected override IQueryable CreateView()
    {
        if (this.TotalItemCount == 0)
        {
            return this.ApplySelectDescriptors(this.QueryableSourceCollection);
        }
        else
        {
            var queryable = this.QueryableSourceCollection;
            queryable = queryable.Where(this.FilterDescriptors);
            queryable = this.Sort(queryable);
            queryable = this.ApplySelectDescriptors(queryable);
            queryable = queryable.Page(this.PageIndex, this.PageSize);
            queryable = queryable.GroupBy(this.GroupDescriptors);
 
            return queryable;
        }
    }
 
    protected override int GetPagingDeterminativeItemCount()
    {
        return this.QueryableSourceCollection.Where(this.FilterDescriptors).Count();
    }
}

Now, i need to add Hierarchical data, so i defined a ChildTableDefinitions. In the DataLoading event of GridView it detects correctly the parentrows and allows me to define the columns for the child gridview, even in the row loaded event i can check what rows have childs to show the expandable buttons on them. All this works pretty well but when i expand one row with childs, the child gridview is showed without data. If i remove the grouping column and the child data is in the same page as the parent row, i can see the child rows. If the child rows are in another page, i can't see them. If i remove both grouping and paging, all works perfectly, showing the child data for every parent row. But as soon as i group the data again, even without pagination, the child gridview don't show any data.

Is there a way we can have Grouping, paging and child data working in the same GridView, independently of the page of the data?

 Kind regards,

Dimitrina
Telerik team
 answered on 21 May 2015
1 answer
110 views

Hi,

I'm trying to fit a TreeView into a Combobox. There are already many threads which all refer to this blog post:

http://blogs.telerik.com/xamlteam/posts/10-05-12/treeview-in-combobox-with-radcontrols-for-silverlight-or-wpf-final-take.aspx

Unfortunately, the example is not working (anymore?) in WPF.

There seems to be a problem with the converter. In Silverlight, everything works fine, in WPF however, the converter is called, even when you open the DropDown (which does not happen in Silverlight). In this converter call, the "return false" condition is triggered and so the popup never opens. 

Can you provide a new sample on how to fit a TreeView into a ComboBox (or DropDownButton)?

Best regards 

 

Kalin
Telerik team
 answered on 21 May 2015
3 answers
653 views

The docs for some rad controls have a nice page listing the default shortcut keys supported by a given control.  For instance, the RadRichTextBox control has this page:

http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/features-keyboard-support.html

However, I can't seem to find a similar page for RadGridView.  So, two questions:

  1. What standard shortcuts are supported "out-of-the-box" by RadGridView?
  2. Is there a page similar to the above-mentioned RadRichTextBox page that documents these keys?

Thanks.​

Dimitrina
Telerik team
 answered on 21 May 2015
2 answers
87 views

Hello Everbody, 

I have the following question.

I have this Windows Form Application in C#.

What it does is you input a string in a textBox then you click on a button and it performs some edits on the string you have entered and it outputs it to another textbox. Till here everything is fine but I would like to have a listBox where I can have a rule like extract first name and it will parse the string look for the first name based on some internal rules and extract it then it will output only the first name, because only that rule was selected from the listBox and no other output. If I select first name rule from the listbox and also select last name rule from the list box it will execute both rules on the inputted text and output it in the output textbox.What can you suggest I can do for it?Any help will be appreciated.

Regards,

Ilia

Ilia
Top achievements
Rank 1
 answered on 20 May 2015
1 answer
154 views
I have multiple RadComboBox Inside a
RadGridView. When I open the application, the data is loaded into all
the ComboBox. However, when I get out of the view, the first
ComboBox's itemselected is set to null by itself. If I go back to that
view again, I see the first ComboBox with Null. If I exit again out
of the view, the second ComboBox's itemselected is set to
null. I put an event handler for selectionindexchanged, and it
shows that when I exit the view, selectionindexchanged is triggered and at
the end one of the value that is pulled from a datasource is set to
null. I need to stop the ComboBox from changing the value to null by
itself.  

Nasko
Telerik team
 answered on 20 May 2015
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?