Telerik Forums
UI for WPF Forum
4 answers
303 views
Hi,
I export the RadGridView via the Democode to a RadDocument.
The table in the RadDocument is could be quiet big. 
I want on every page the the TableHeader printed again.
Also i want some basic header and footer (I already could add pagenumber / logo ..)

But i have no chance to make the repeatable TableHeader, and if there are too many columns that it continues on the next page. 

Is this even possible with RadDocument or do I have to use Reporting for this?

kind regards
felix
Iva Toteva
Telerik team
 answered on 04 Jul 2012
1 answer
188 views
Hi,

I need include a custom control (WPF Web Application) at runtime into a RadPane....but....the method item or similar do not exits....

So....can you help me with this issue......??

Thanks....
Romell
Top achievements
Rank 1
 answered on 04 Jul 2012
1 answer
128 views
Hi,

It seems that a bug has slipped into the ToggleChildrenVisibilityRecursively method.
Indeed, this method doesn't take into account the property AreChildrenVisible value of the connection target. So even if a shape is declared as collapsed, when a shape parent is expanded, this child shape is also expanded. Unfortunately, the togglebutton doesn't indicate this state.

Below, a proposed solution :

private void ToggleChildrenVisibilityRecursively(Visibility nextVisibility, IShape shape)
{
    foreach (var connection in this.ParentDiagram.GetOutgoingConnectionsForShape(shape))
    {
        connection.Visibility = nextVisibility;
        if (!shape.Equals(connection.Target) && connection.Target != null)
        {
            connection.Target.Visibility = nextVisibility;
            var l_mindshapeTarget = connection.Target as MindmapShapeBase;
            if (nextVisibility == System.Windows.Visibility.Visible && l_mindshapeTarget != null && !l_mindshapeTarget.AreChildrenVisible)
            {
                continue;
            }
            this.ToggleChildrenVisibilityRecursively(nextVisibility, connection.Target);
        }
    }
}

Keep up the good work
Robert
Zarko
Telerik team
 answered on 04 Jul 2012
1 answer
144 views
Hi!

I'm not sure if it is bug, or I'm doing something wrong.

I have a RadDocument-object. When I try to add a picture in the back und export it to a PDF the property RelativeFrom of VerticalPosition doesn't work as expected when it is set to VerticalRelativeFrom.Page. 



private void Pic2PDF()
{
    var doc = new Telerik.Windows.Documents.Model.RadDocument();
    var stream = new FileStream("C:\\temp\\test.pdf", FileMode.Create);
    var pdfExp = new Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider();
    var pic = new FileStream("C:\\temp\\picture.jpg", FileMode.Open);
 
    var image = new Telerik.Windows.Documents.Model.FloatingImageBlock(pic, new Size(150, 150), "jpg");
    image.AllowOverlap = true;
    image.WrappingStyle = Telerik.Windows.Documents.Model.WrappingStyle.BehindText;
    image.HorizontalPosition = new Telerik.Windows.Documents.Model.FloatingBlockHorizontalPosition(Telerik.Windows.Documents.Model.FloatingBlocks.HorizontalRelativeFrom.Page, 250);
    image.VerticalPosition = new Telerik.Windows.Documents.Model.FloatingBlockVerticalPosition(Telerik.Windows.Documents.Model.FloatingBlocks.VerticalRelativeFrom.Page, 250);
    // if I uncomment the next line it works
    //image.VerticalPosition.RelativeFrom = Telerik.Windows.Documents.Model.FloatingBlocks.VerticalRelativeFrom.Paragraph;
 
    doc.InsertInline(image);
 
    pdfExp.Export(doc, stream);
 
}
Iva Toteva
Telerik team
 answered on 04 Jul 2012
1 answer
95 views
First, I have to say it's the best book for C# I've seen. Great product. Amazing features. But I have some wishes...and to see if they are valid and if can be done. Are about how the book looks.
1. First and most important i wish there is a shadow on the inside of the flipped page made by the flipped corner. I belive that this shadow should be in diagonal, parallel to the "bended" end of the page and it should move with it (from diagonal to the center of the page).  I attached an example of where and how the shadows would like to be.
2. Light reflexion on the page durring flip (some white at he end of the gradient)?
3. Also, why is there only one, I mean on one side-page, inner shadow once the book is opened? Plus, i wish we could control all these shadows (if they are applied or not) from some hooks/events in the program...
4. A question: is the book using hardware acceleration durring flip?
5. Durring the hard-page flip, text is flickering a lot. Why is that?
Zarko
Telerik team
 answered on 04 Jul 2012
1 answer
66 views
I have found in this post that the positions can be populated from the code-behind. But I'm wondering whether there is a databind solution for this? To make it more friendly for MVVM?
Andrey
Telerik team
 answered on 04 Jul 2012
1 answer
108 views
My goal is to take a datatable based (dynamic, unknown column names or row values until runtime) gridview and apply formatting or cell styling (column foreground, background, font weight, text wrapping and column width) from settings the user defines. When I generate my columns (GridViewBoundColumnBase) I see that background color is simple but changing the font weight or color seems a mystery...

From what I have read it would be achieved with some sort of converter and datatemplate. Any documentation or examples that could assist me complete this task that actually uses a datatable and could do font weight, color, column background color and text wrapping etc...? I don't want to reinvent the wheel if as much as possible.
Dimitrina
Telerik team
 answered on 04 Jul 2012
1 answer
83 views
Hi,

I am implementing the rad grid at run time.I need to access the value of a cell (say,case_number) in every row by column name,Plz let me know how to do it?

here is my code,

   IList<GridViewRow> rows = radGrid1.ChildrenOfType<GridViewRow>().ToList();
           foreach (GridViewRow  drow in rows)
{
                                   //drv.Cells[1].Text;          I can do this via column index but I need the same with column name
}

Thanks
Vlad
Telerik team
 answered on 04 Jul 2012
6 answers
198 views
Hi,


I've encountered a weird behavior.  I am trying to hide certain parts (table and font formatting) of a RadRichTextBox's content menu using the "Use ContextMenuBuilder class" approach of this example: http://www.telerik.com/help/wpf/radrichtextbox-features-context-menu.html

This is the class I created to hide certain parts of the context menu:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Documents.UI.Extensibility;
using Telerik.Windows.Documents.UI;
using Telerik.Windows.Controls.RichTextBoxUI.Menus;
using Telerik.Windows.Documents.Model;
using Telerik.Windows.Controls;
 
 
class CustomMenuBuilder : ContextMenuContentBuilder
{
    private RadRichTextBox radRichTextBox;
 
    public CustomMenuBuilder(RadRichTextBox radRichTextBox)
        : base(radRichTextBox)
    {
        this.radRichTextBox = radRichTextBox;
    }
 
    protected override ContextMenuGroup CreateTableCommands()
    {
        ContextMenuGroup g = new ContextMenuGroup();
        return g;
    }
 
    protected override ContextMenuGroup CreateHyperlinkCommands(bool forExistingHyperlink)
    {
        ContextMenuGroup g = new ContextMenuGroup();
        return g;
    }
 
    protected override ContextMenuGroup CreateTextEditCommands()
    {
        ContextMenuGroup g = new ContextMenuGroup();
        return g;
    }
}


And I then set my RichTextBox to use that new Context menu in another class:

((Telerik.Windows.Controls.RichTextBoxUI.ContextMenu)rtb1.ContextMenu).ContentBuilder = new CustomMenuBuilder(rtb1);

This works perfectly if you only have 1 RichTextBox you want to do this on.  The problem appears if you want to do this on many RichTextBoxes:

((Telerik.Windows.Controls.RichTextBoxUI.ContextMenu)rtb1.ContextMenu).ContentBuilder = new CustomMenuBuilder(rtb1);
((Telerik.Windows.Controls.RichTextBoxUI.ContextMenu)rtb2.ContextMenu).ContentBuilder = new CustomMenuBuilder(rtb2);
((Telerik.Windows.Controls.RichTextBoxUI.ContextMenu)rtb3.ContextMenu).ContentBuilder = new CustomMenuBuilder(rtb3);

Now, if you right click and paste in rtb1 or rtb2, the text appears in rtb3 (the last RichTextBox for which we assigned the menu).  It seems that the 3 menus are pointing to the same instance even though they are all new CustomMenuBuilder  objects.  Any way of hiding context menu sections and having each menu related to the right RichTextBox?

Thanks,

-- Joel
Robert
Top achievements
Rank 1
 answered on 04 Jul 2012
6 answers
366 views
Hi,

I would like to know if it's possible to create a "copy down" functionnality in GridView, a bit like in Excel.

The objective would be to enter values in some cells in the first rown of my grid, to select these cells, and with a contextual menu have a shortcut to "copy these values on every row of my grid".

The objective, is for users to type values only once instead of typing the same value on every row of the grid. I hope i'm clear enough in my explaination.

Thanks a lot for your help!
Doots
Top achievements
Rank 1
 answered on 04 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?