Telerik Forums
UI for WPF Forum
1 answer
457 views
How can I create a horizontal line similar to what is supported in Word in C# code programmatically without ever showing a RichTextBox control on screen.  We are using RadDocument to output read-only report data.

Also,  how can I do this without messing up the font before and after the table?  The fonts get reduced in size just before and after the table.

internal static void AddHorizontalLine(Section sec, RadDocument doc, double widthInches)
{
    //insert a horizontal line - table with 1 row and column - with a top border line and a table height of a few pixels
          
    Table t = new Table() {PreferredWidth = new TableWidthUnit(TableWidthUnitType.Fixed, Unit.InchToDip(widthInches)) };
    Border noBorder = new Border(BorderStyle.None);
    t.Borders = new TableBorders(noBorder, new Border(BorderStyle.Single), noBorder, noBorder);
    TableRow row = new TableRow();
    row.Height = 2.0;

TableCell cell = new TableCell();
cell.PreferredWidth = new TableWidthUnit(TableWidthUnitType.Percent, 100.0);

Paragraph par = new Paragraph();
par.FontSize = 2;
par.Inlines.Add(new Span(" "));
cell.Blocks.Add(par);
row.Cells.Add(cell);

t.Rows.Add(row);

sec.Blocks.Add(t);

//We need to re-measure and re-layout the document after modifying the blocks, inlines, children and properties to format the output correctly. The fonts will be off if this is not done.
//doc.MeasureAndArrangeInDefaultSize(); //causes formatting problems in TOC
}

I've seen these two similar questions.
  http://www.telerik.com/forums/adding-an-horizontal-line-programatically
  http://www.telerik.com/forums/horizontal-line-ce12906b62c2

Petya
Telerik team
 answered on 31 Jul 2014
1 answer
188 views
Hi

I have a set of items which I need to show in grid. Items  can be grouped by some columns, but some rows I need to exclude from being grouped and display them in the same grid as regular rows without group row and indent cell.

ths,
Slava . 
Dimitrina
Telerik team
 answered on 31 Jul 2014
1 answer
93 views
We have a textblock in a cell as below:

    <contentpresenter Name="PART_ContentPresenter" Uid="40569470">
      <textblock AutomationId="CellElement_0_0" Uid="29580916">3</textblock>
    </contentpresenter>

I am using TTF in Visual Studio. When we start script to catch this cell/textblock. It gets object successfully but in textblock tag, i don't see the AutomationId element. 

However, after i turn on the Inspect.exe tool to try to verify properties on my product, i re-run my script, i see the AutomationId element appears in textblock tag. 

If I turn off inspect tool, restart my application, re-run my script again, i don't see the AutomationId element in textblock tag.... :(

I really need to get the AutomationId property to use it to get exactly data cell i need to work on.

Maybe the inspect tool performs any action on my application,... i am not sure. Could you please help me on this ? do i need to set any configuration in my script ?

Thanks and Regards,
Hoang.

Hoang
Top achievements
Rank 1
 answered on 31 Jul 2014
7 answers
316 views
I use RadGridView.

RadGridView horizontalScrollBar move GridViewComboBoxColumn displayed on the screen blanks. But verticalScrollBar no change.

What's the problem?

<telerikGridView:GridViewComboBoxColumn 
                                                Header="AccessibleTimeGroup" 
                                                DisplayMemberPath="Name" 
                                                CellStyleSelector="{StaticResource UserCardCellStyleSelector}" 
                                                DataMemberBinding="{Binding Card.AccessableTimeGroup}" ItemsSourceBinding="{Binding AccessibleTimeGroups}" />
LEE
Top achievements
Rank 1
 answered on 31 Jul 2014
1 answer
68 views
Does the RichTextBox support the "Repeat as header row at the top of each page" feature which can be found in Word? This video demonstrates the feature.

If not, any ideas on how this could be accomplished using custom code as I'm already generating the table programmatically?
Petya
Telerik team
 answered on 30 Jul 2014
5 answers
185 views
Hi,

for days I mess around with "Database Storage" - but it drives me crazy.

What I got so far was - create a daily recurring appoint and also adding an exception to it.
But here the problems start.

Lets say my original recurring appointment was at 10:00.
I move on occurrence to 9:00 - and what I get is a new Appointment (the exception) and an ExceptionDate with an ExceptionDate of 10:00.

Now I edit the series and change the start to 11:00.

I now get a new ExcpetionOccurrence (and a new Exception Appointment).
Appointment - the same as before.
Occurrence - pointing to the new exception - with an ExceptionDate of 11:00.

BUT - the old Exception as well as the old ExpceptionOccurrence still exist.

To make thing a bit more transparent - I took your xaml-sdk example an tried the same thing here.
The datamodel there is slightly different than mine - but this doesn't matter.

I can also add an appointment - and an exception.
But when I try to move the original appointment I get an exception in SqlExceptionAppointment.cs IAppointment Copy.
This method is not implemented - instead it throws an InvalidOperation Exception.

Is there a working DB example?
Or at least a documentation how data is handled?

All I found out so far is that ExceptionOccurrence is generated when I create an exception (OK so far) and that if I change the series an extra copy is generate for every existing Exception / Exception occurrence. But the old elements are neither deleted nor remove from the appointments collection.

About the DataModel - (what I think):
ExceptionAppointment - the data for an exception.
ExceptionOcurrence - a reference to the appointment as well as a DataTime for the Occurrence of the appointment which gets an override.

My Idea - Since ExceptionAppointment and ExceptionOccurrence is 1:1 I could also have one table for "all of it".
AppointmentID int (PK, auto)
MasterAppointmentID int (null)
ExceptionOcurrence DateTime (null)
Start....

So I could find Exceptions via MasterAppointmentID!=null
Find all Appointments via MasterAppointmentID==null


This would avoid a lot of cascading deletes and so far.
The only thing to solve could be (but also possible with a "start==end" or so) an exception where there should be no occurrence.
I found that such a thing results in an ExceptionOcurrence with no ExceptionAppointment.

By the way - I found no way to remove such an exception via UI.

Anyhow - a simple working example would be a good starting point.

Manfred

Kalin
Telerik team
 answered on 30 Jul 2014
1 answer
96 views
Hello,
if you're looking at the RadListBox properties in the documentation, only 4 of them are displayed!
http://www.telerik.com/help/wpf/allmembers_t_telerik_windows_controls_radlistbox.html#propertyTableToggle
Patrick
Yana
Telerik team
 answered on 30 Jul 2014
3 answers
193 views
Hi,

with the ScheduleView control, when we have 2 appointments which overlap each other, the control display both appointments side by side. I would like to know if it's possible to have the same bahavior when we have a special slot and an appointment which overlap each other???

Thank's
Alain
Konstantina
Telerik team
 answered on 30 Jul 2014
1 answer
118 views
Please see attached image. I want to be able to sort by the values in these fields. I have read all of the articles and see plenty about column group description sorting but nothing about aggregate value sorting - is this possible and if so how?

Thanks
Rosen Vladimirov
Telerik team
 answered on 30 Jul 2014
1 answer
142 views
Hi,

I have implemented Keyboard Functionality for rename,When i press F2 key for editing the node it will edit for second press or need to press and hold a sec.

Please find the below Code..

 void treeview_KeyDown(object sender, KeyEventArgs e)
        {
               if(e.Key==Key.F2)
                {
                    treeview.IsEditable = true;
                  //  e.Handled = true;
                }              
                }
       }
Please help me ASAP.

Regards,
Ranjith
Pavel R. Pavlov
Telerik team
 answered on 30 Jul 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?