Telerik Forums
UI for WPF Forum
3 answers
243 views

I am implementing "edit HTML" functionality by creating a RadDocument and loading a HTML file. Once I modify the RadDocument and try to export/save with below code snippet; the newly HTML has improper rendering. By improper rendering, I mean, some additional content gets added than what appears in the RadDocument.

 

//---------------------------Code snippet of Importing-------------------------------------

document = fromFormatProvider.Import(readStream); ===========> Load the *HTM provider readStream to RadDocument

//-----------------------------------------------------------------------------------------------------

 

// -----------------------------Code snippet of Exporting-------------------------------------

               IDocumentFormatProvider fromFormatProvider = new HtmlFormatProvider();
               using (FileStream writeStream = new FileStream(emailtemplateinfo.Path, FileMode.OpenOrCreate))
                {
                    document.EnsureDocumentMeasuredAndArranged();
                    fromFormatProvider.Export(document, writeStream); ======================> Export the newly modified RadDocument to HTM provider
                }

//-----------------------------------------------------------------------------------------------------
Gaurav
Top achievements
Rank 1
 answered on 20 Oct 2016
7 answers
409 views

Hello,

 

I'm using a RadGridView. In columns, I set data items with simple string values, but the encoding doesn't working : I'm french, and I'm using accents :)

 

For example :

- I want that the grid displays "DO Cité"  ---> You can see the result in attached file.

___

So, I didn't find how I can apply encoding for my RadGridView (or my Window).

 

Thank you for your help !

 

Valentin.

Dilyan Traykov
Telerik team
 answered on 20 Oct 2016
1 answer
119 views

Hello everyone,

I'm looking for a chart (x-y Axis) which has the following abilities:

1. can display series of different types (line , area ..)

2. drag and drop ability of point in line series

3. drag and drop ability of section in line series

4. give a different style ( color, thickness) to each section in the line series.

Is there a chart containing all these abilities? maybe some example of this chart.

Thanks for your help,

Roman


Martin Ivanov
Telerik team
 answered on 20 Oct 2016
1 answer
88 views

Hi!

My export is good but I have a model xls file and  I would like to begin my export starting from my ligne 7 of my model file.

Also I would like to know if I can recover some information with my radGridView. 

I have a problem with my first line is move automatically, it's not the good position, what can I do ?

Thanks for answering

Dilyan Traykov
Telerik team
 answered on 20 Oct 2016
0 answers
161 views

Hello,

I have this problem. I have a class named Holds with 2 properties: OriginOrTargetId(type int) and OriginOrTargetName(type string).

I have a Combobox in my xaml file that display the OriginOrTargetName of this object. And I have a Grid with two columns (one of them display the holds, so I have the HoldId (corresponds to the OriginOrTargetId) also on this object).

I need that when I select a value OriginOrTargetName displayed in the combo I need to filter in the grid the correct hold through the OriginOrTargetId.

I also need that at the opening of the page all the holds in the Grid are visible (and it's ok if nothing is selected in the combo or also there is a a default value like "please Select..."). How can I do this? I have an exception of filtering on the OriginOrTargetId and I'm not able to display all the holds when nothing is selected in the combo. Here is my code:

In the XAML I declare:

<Grid Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

...some code to define columns...

<ComboBox Grid.Column="1" Name="NamesDDL" ItemsSource="{Binding YardHolds}"
          SelectedItem="{Binding SelectedYardHold, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
          IsEnabled="True"
          IsEditable="True" >
       <ComboBox.ItemTemplate>
                 <DataTemplate>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                     <TextBlock Text="{Binding HoldName}"/>
                                     <TextBlock Text="{Binding HoldId}" Visibility="Hidden"/> //I don't know if it is necessary
                        </StackPanel>
                 </DataTemplate>
        </ComboBox.ItemTemplate>

</ComboBox>
</Grid>

In my VIEWMODEL class I have done this:

public CompositeFilterDescriptor FilterDescriptor { get; set; }
public FilterDescriptor HoldFilterDescriptor { get; set; }
public ObservableCollection<TerminalHold> YardHolds { get; set; }
public TerminalHold SelectedYardHold { get; set; }

FilterDescriptor = new CompositeFilterDescriptor
{
LogicalOperator = FilterCompositionLogicalOperator.And
};
HoldFilterDescriptor = new FilterDescriptor("OriginOrTargetId", FilterOperator.IsEqualTo, null);
FilterDescriptor.FilterDescriptors.Add(HoldFilterDescriptor);

private void OnSelectedYardHoldChanged()
{
         if (SelectedYardHold == null || SelectedYardHold.Id < 1)
                    HoldFilterDescriptor.Value = "";
          else
                  HoldFilterDescriptor.Value = SelectedYardHold.HoldId;

}

What am I wrong? I have search everywhere and for now I'm not able to found a solution!

Thank you

Serena
Top achievements
Rank 1
 asked on 20 Oct 2016
1 answer
150 views

hi dear all,

i am using raddiagram to create a flowchart. normally, the user must select a shape to see shape's connectors and start connection manupulation from one of the connectors and create connection to other shape.

BUT:

i need to a connection manupulation to be started when a user go over the shape and click and hold and continiue to create connection by moving the hold mouse button to the other shape. also i need the connections to be started from the shape , not connector. in other words, i need the user to not to start connection manupulation by selectiong the shape connector. i mean the connection to be started automatically when the user click and hold left click on a non-selected shape  and whithout selecting any connectors of the shape(i prefer the shapes to not have any connectors or atleast they would be hidden).

best regards.

Kiril Vandov
Telerik team
 answered on 20 Oct 2016
7 answers
301 views

Hi

I have a richtextbox and I want each section has its own header. In the following code I have set the header but all the sections have the same header.

I have three question

1) How can I have different header for each section.

2) How can I have access to the selected section?

3) How can I access to other sections. Because there is no index for collection sections in the Document.

I will appreciate if someone answers. Thanks in advance.

            dd.Section section = new dd.Section();
            dd.Paragraph paragraph = new dd.Paragraph();
            dd.Span span = new dd.Span(this.txtHeader.Text);
            
            paragraph.Inlines.Add(span);
            section.Blocks.Add(paragraph);
            dd.RadDocument document = new dd.RadDocument();
            document.Sections.Add(section);

            dd.Header header = new dd.Header();
            header.Body = document;
            this.radRichTextBox.UpdateHeader(this.radRichTextBox.Document.Sections.First, dd.HeaderFooterType.Default, header);

Media
Top achievements
Rank 1
 answered on 20 Oct 2016
1 answer
112 views

Hello!

I have a issue about show conent of RadDocumentPane when LoadLayout.

in my project,I LoadLayout of a docking from xml file,the Layout can be loaded right,

the conent in other  RadPane can be shown right,but content in RadDocumentPane can not show.

this is my code:

<telerik:RadDocking x:Name="MainDocking">
            <telerik:RadDocking.DocumentHost >
                <telerik:RadSplitContainer>
                    <telerik:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical">
                        <telerik:RadPaneGroup>
                            <telerik:RadPane Header="a1" telerik:RadDocking.SerializationTag="a2" CanUserClose="False">
                                <TextBlock Text="CanShow" />
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup>
                            <telerik:RadDocumentPane x:Name="documentPane" CanUserClose="False" Title="Robot" Header="Robot">
                                <TextBlock Text="CanNotShow" />
                            </telerik:RadDocumentPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

 

back code:

private MainWindow()
        {
            InitializeComponent();
            LoadLayout();
        }
        public void LoadLayout()
        {
            var path = Path.Combine(vm.rootPath, "1.xml");
            using (var fileStream = File.Open(path, FileMode.Open, FileAccess.Read))
            {
                var reader = new StreamReader(fileStream);
                var serializationString = reader.ReadToEnd();
                LoadLayoutFromString(serializationString);
            }
        }

        private void LoadLayoutFromString(string xml)
        {
            using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
            {
                stream.Seek(0, SeekOrigin.Begin);
                this.MainDocking.LoadLayout(stream);
            }
        }

 

what should I do?

Wang
Top achievements
Rank 1
 answered on 20 Oct 2016
2 answers
274 views

Hi Everyone,

I want similar control as shown in attached image. I want to populate pop up window with list control when we click on button. Similar to test studio recorder control.

Is there single to achieve it? can any one tell me how to implement it ?

Regards,

Rajendar.

Martin Ivanov
Telerik team
 answered on 20 Oct 2016
1 answer
236 views
Hi have some 'hint text' (which I set up by WatermarkContent  property) in my RadAutoCompleteBox. But when I am calling RadAutoCompleteBox.Focus() in my source code, 'hint text' just despairs. How can set focus on control and save 'hint text'?
Nasko
Telerik team
 answered on 19 Oct 2016
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?