Telerik Forums
UI for WPF Forum
1 answer
108 views
Hi,

  I need to use the data virtualization in the gridview component. My source is a IQueryable and after enumerating i need sometimes to do another projection and create a dynamic property. My user case is the following:
 
There's 3 tables with the following relationships:
A---B---C---D
1---n----m---m

My query gets the following hierarchical object: 
A
   |
   ---B
        |
        C--D

My GUI has 3 GridView Components, with the following binding each:
Grid 1: {Binding A}
Grid 2: {Binding A/B}
Grid3: {Binding A/B/C.D} //Error

Grid 3 has an binding error because The Current B item has multiple C items and it cannot do a C.Select(s=>s.D) automatically.


How can i using data virtualization do this binding?



Thanks


        
Dimitrina
Telerik team
 answered on 06 Mar 2014
1 answer
254 views
I am using the rest of the AutoCompleteBox without issues. I do have one issue.  After a user is finished making a selection and comes back later to use the Box again, they click on the box, but the 'old' text is still there.  Is there a way to have AutoCompleteBox highlight all the text in the box when it gets the focus again?  Right now it just puts the cursor at the end of the line.

Thanks,

Russ
Kalin
Telerik team
 answered on 06 Mar 2014
3 answers
168 views
I know I can export a RadDiagram as image using the ExportToImage method, this works fine but allows to paste a static image (bmp, jpg...).
For my users it will be really useful to paste a set of shapes, in order to re-arrange them into PowerPoint (or change size, color...).

This feature should be one-way only: I don't need to support the case of a user pasting from Office to the RadDiagram... Is it possible?

Any idea?
Tina Stancheva
Telerik team
 answered on 06 Mar 2014
2 answers
328 views
how to disable or hide the expand/collapse column RadGridView when using the HierarchyChildTemplate
Yoan
Telerik team
 answered on 06 Mar 2014
4 answers
265 views
Good afternoon,

From time to time I've been experiencing Out of Memory Exception with RadRichText box library version 2013.1.222.40.

My exception is usually thrown when I right click to open the document Context Menu.

I would like to point out that I do add custom items to the document Context Menu depending if the user right clicks in a section with Custom Annotations.

e.g.

private void ContextMenuSubscribe()
{
    this.radRichTextBox.ContextMenu = new Telerik.Windows.Controls.RichTextBoxUI.ContextMenu();
    ContextMenu contextMenu = (ContextMenu)this.radRichTextBox.ContextMenu;
    contextMenu.Showing += this.ContextMenu_Showing;
}

private void ContextMenu_Showing(object sender, ContextMenuEventArgs e)
{
    #region Discontinue Product Menu Item
 
    // First check the context - if last selected annotation is product and user permissions
    if (Properties.Settings.Default.SystemUserPermissions.ProductsCanDiscontinue == true && !(this.radRichTextBox.Document.Selection.IsEmpty)
        && RadDocumentExtensions.GetLastSelectedAnnotationMarker(this.radRichTextBox.Document) is SemanticRangeStart)
    {
        //Get the selected annotations
        List<SemanticRangeStart> products = RadDocumentExtensions.GetSelectedAnnotationsRangeStarts<SemanticRangeStart>(this.radRichTextBox.Document);
 
        //Check Product Count is greater than 0
        if (products != null && products.Count > 0)
        {
            //Add menu item to data context
            RadMenuItem discontinueProductMenuItem = new RadMenuItem()
            {
                Header = "Discontinue Product",
                Icon = new System.Windows.Controls.Image() { Source = new BitmapImage(new Uri("Icons/Spec-Editor-Menu/block.png", UriKind.Relative)) },
                Tag = products[products.Count - 1] //Get last product item in selection
            };
            discontinueProductMenuItem.Click += this.DiscontinueProductMenuItem_Click;
            ContextMenuGroup customContextMenuGroup = new ContextMenuGroup();
            customContextMenuGroup.Add(discontinueProductMenuItem);
            e.ContextMenuGroupCollection.Add(customContextMenuGroup);
        }
    }
 
    #endregion
 
    #region Product Pricing Menu Item
 
    // First check the context - if selected annotation is end product and user permissions
    if (Properties.Settings.Default.SystemUserPermissions.OrderCanEdit == true && !(this.radRichTextBox.Document.Selection.IsEmpty) &&
        RadDocumentExtensions.GetLastSelectedAnnotationMarker(this.radRichTextBox.Document) is SemanticRangeStart)
    {
        //Get the selected annotations
        List<SemanticRangeStart> products = RadDocumentExtensions.GetSelectedAnnotationsRangeStarts<SemanticRangeStart>(this.radRichTextBox.Document);
 
        //Checked the last selected item is an end item
        //if (products.Count >= 0 && products[products.Count - 1].Product.HasChild == false)
        //{
            //Add menu item to data context
            RadMenuItem addPriceMenuItem = new RadMenuItem()
            {
                Header = "Set Price",
                Icon = new System.Windows.Controls.Image() { Source = new BitmapImage(new Uri("Icons/Spec-Editor-Menu/sterling_pound_currency_50.png", UriKind.Relative)) },
                Tag = products[products.Count - 1]
            };
            addPriceMenuItem.Click += this.SetPriceMenuItem_Click;
            ContextMenuGroup customContextMenuGroup = new ContextMenuGroup();
            customContextMenuGroup.Add(addPriceMenuItem);
            e.ContextMenuGroupCollection.Add(customContextMenuGroup);
        //}
    }
 
    #endregion
 
    #region Add New Item To Database Menu Item
 
    //Check Conditions
    if (Properties.Settings.Default.SystemUserPermissions.ProductsCanAdd == true &&
        this.radRichTextBox.Document.Selection.IsEmpty && RadDocumentAutoComplete.IsPositionBetweenDefinedAnnotations(this.radRichTextBox.Document.CaretPosition) == false)
    {
        //Check if text exists at caret position
        string text = RadDocumentExtensions.GetSpanBoxText(this.radRichTextBox.Document.CaretPosition);
 
        if (!String.IsNullOrWhiteSpace(text))
        {
            text.Trim();
 
            //Create New Menu Item
            RadMenuItem addNewItemToDatabase = new RadMenuItem()
            {
                Header = "Add New Item",
                Icon = new System.Windows.Controls.Image() { Source = new BitmapImage(new Uri("Icons/Spec-Editor-Menu/Database-Add-48.png", UriKind.Relative)) }
            };
 
            addNewItemToDatabase.Click += this.AddNewItemToDatabaseMenuItem_Click;
            ContextMenuGroup customContextMenuGroup = new ContextMenuGroup();
            customContextMenuGroup.Add(addNewItemToDatabase);
            e.ContextMenuGroupCollection.Add(customContextMenuGroup);
        }
    }
 
    #endregion
}


My application has also been designed to host multiple instance RadRichTextBox in RadDocking Panes (see the attached image). The docking panes are created and closed on a regular basis throughout the lifetime of the applications runtime.

Another point to add is that my RadDocuments contain a lot of Custom Annotations (unfortunately I cannot upload an example to this forum due to the filters for you to see).

To iterate my previous points, the Out of Memory Exception thus far only seems to occur once my application has been running for some time and only seems to occur when opening the Context Menu between custom annotations.

Is the Out of Memory Exception a known issue with library version 2013.1.222.40?
And can you offer any advice on what may be causing it and how to prevent the exception?

Many thanks,

Rob



 
Robert
Top achievements
Rank 1
 answered on 06 Mar 2014
4 answers
150 views
Your Control Panel is a WPF app with a nice auto-updater.

For WPF developers, deployment and automatic updates are always important issues to deal with so I'm wondering if you developed this auto-update technology in house and if so, would you consider releasing this techonology bundled with your UI for WPF so we can all use it and if not, why not?

Thanks,

Dean
Dean
Top achievements
Rank 1
 answered on 06 Mar 2014
2 answers
129 views
Hi,

I have a project which will use the RibbonView (if I can make it work like I want). I have managed to bind simple business objects to the ribbon and display tabs, groups and buttons including icons, but this is where it stops. My problem is that I am unable to find a good way to attach events to the buttons dynamically. The application has a lot of child views and each of these will have it's own items on the ribbonview. I was hoping that I could have one ribbon view defined in the main view and just bind business objects from the childviews. I was also hoping I could mix items on the ribbon view from both the main view and the active child view so that I don't have to add those "global" items everytime.

What I have done now is that I have one event handler in the datatemplate which handles all events from all buttons on the ribbon. This is a problem as I cannot distinguish them in any way except from looking at the content/text of the buttons, but this seems rather "ugly".

Do you have any good suggestion on how I can dynamically add items to ribbonview for a childview with attached events? Can I achieve this just by binding business objects or do I have to create a viewmodel and a view with a whole RadRibbonView for each separate childview? So far I haven't defined anything in xaml except for the ribbon view itself and the templates. Will this work or must I start defining tabs, groups and buttons so that I can add dedicated events to each of them?

I have looked at the RadRibbonView demo (Paint) you have where business objects are bound to the RibbonView with tabs, groups and buttons including icons, but no events are attached so it doesn't help me anything.

I'm sure there is some easy solution to this as it has to be a common scenario to dynamically populate a ribbon from multiple views. Probably I'm just missing something obvious, but hopefully you can help me with this.
 
Regards,
Rolf




Martin Ivanov
Telerik team
 answered on 05 Mar 2014
20 answers
356 views
I've been trying to get spell checking working for Arabic text entered into a RadRichTextBox, however it never appears to check the spelling of any Arabic words entered.  No Arabic words are getting marked as misspelled.

I've tried loading the ar-AR.tdf dictionary that can be downloaded into the editor's DocumentSpellChecker, and I've tried setting the spell checker's locale to AR, but neither have any effect.  I've also tried creating a class that implements ISpellChecker, and I've found that  CheckWordIsCorrect is never getting called for Arabic words, though it does seem to be getting called for any Latin-character words.

The same problem occurs with Hebrew text, though spell checking is working with Russian.

Is there a way to get the WPF RadRichTextBox to spell check Arabic words?  I'm using the .NET 4.0 Q3 2012 version of the WPF components, though I've tried the Q1 2013 release for both .net 4 and .net 4.5 and the issue still remains.
Missing User
 answered on 05 Mar 2014
3 answers
158 views
Hi,

I want to implement a feature to draw an angle's curve between two or more raddiagramconnections connected to a RadDiagramShape. I want to get the following behavior :
-The curve's  visibility is set from a property in the  viewmodel;
- When  add  or remove connections incoming to the raddiagramshape i want to update the RadDiagram automatically and change  the curve including new RadDiagramConnections or excluding removed RadDiagramConnections from  the path;

I want to have a result similar to attached images. Is there a simple way to do this? And Could I have a sample solution with this feature or something of similar??


Thanks
Pavel R. Pavlov
Telerik team
 answered on 05 Mar 2014
2 answers
75 views
Hi All,

How to select ResourceTypeTemplateSelector.MultipleSelectionTemplate?
Kalin
Telerik team
 answered on 05 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?