Telerik Forums
UI for WPF Forum
1 answer
99 views
We are using RADPIVOT grid connected to our SQL Server 2014 Analysis server. What we want to be able to do is create session based calculated fields from the C# client. I can create these session based calculated fields using an MDX query however as they are session based only I need to be able to create them using the same connection as the ADOMDDataprovider does so they will be visible and selectable in the RADPivotField List. I want them to be session based as I want them to disappear once the connection is closed.

I was hoping that the ADOMDDataprovider class actually exposed an ADOMD Connection and then I could just send my MDX query via a ADOMD Command down this connection however as far as I can see is does not seem to expose this.

Have you any ideas how this may be possible.?

Thanks
Rosen Vladimirov
Telerik team
 answered on 05 Sep 2014
5 answers
358 views
Hello,

I just upgraded my WPF solution to the latest Telerik version, 2014.1.224.40. Whenever switching implicit themes I see hundreds of these errors: 

System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='Telerik.Windows.Controls.InternalResourceKey'; ResourceKey.HashCode='0'; ResourceKey.Type='Telerik.Windows.Controls.InternalResourceKey'

Also, sometimes when switching themes the application freezes. I'm thinking it's related to the hundreds, if not thousands, of these errors showing in the output window.

I saw this was noted as fixed in the version notes of 2014.1.224.40, yet I am still seeing it. Any ideas?

Thanks,
Niko
Vanya Pavlova
Telerik team
 answered on 05 Sep 2014
2 answers
50 views
Hi All,
Can you please see this video: https://www.youtube.com/watch?v=znp18AcUTOA
You will see that I add a new item and when click to add a second item on focus is last column. How I can make the focus to be on first column every time when user try to add new item? When click on "Click here to add new item" message and with shortcut. Every time when new item row is open the focus to be on first column.

Best regards,
Saykor
Saykor
Top achievements
Rank 2
 answered on 04 Sep 2014
1 answer
172 views
Hi !

I have a RadGridView with attached OnDragInitialize event handler.
When I try to scroll the gridview's scrollviewer then the event is triggered.
How may I disable this?

I've tried this solution:
public void Rad_OnDragInitialize(object sender, Telerik.Windows.DragDrop.DragInitializeEventArgs e)
        {
            RadGridView itemsControl = (RadGridView)sender;
            ScrollViewer scroll = UIHelpers.GetScrollViewer(itemsControl) as ScrollViewer;
            GridViewVirtualizingPanel presenter = UIHelpers.GetItemsPresenter(itemsControl);
             
            if (presenter != null && scroll != null && scroll.IsMouseOver && !presenter.IsMouseOver)
            {
                return;
            }
.............

The event isn't triggered anymore but the scrollviewer won't move at all.

thanks,
Idan
Nick
Telerik team
 answered on 04 Sep 2014
5 answers
248 views
Hi all,

I have seen very few examples of the diagram control in the WPF Control demo that gets installed.  I think there are only 2 and 1 is just a theming demo.  Given the potential for this tool I think that is a shame; anyway...

I need to build an application that allows users to search for objects from a database.  They can then drag objects from the search results onto a diagram control where all the immediate relationships coming from those are drawn and laid out.  There is, as always, a slight twist in the fact these objects are effectively entities and any one entity can have more than one role (just names really) but the important things is an entity can have one or more relationships and a role can have one or more relationships.

I therefore need to diagram an objects relationships to other objects, baring in mind that if the object is an entity it can also have roles which have relationships and vice versa.

I'd appreciate it if someone could take the time to help get me started with a sample application that basically provides the above functionality which I can then grow on.  If anyone has experience developing something similar then I'd also be interested in any advice and lessons learnt...


Thanks,
Drammy
Pavel R. Pavlov
Telerik team
 answered on 04 Sep 2014
8 answers
2.1K+ views
Hi,

I have a requirement to display the row number (index of the binded ObservableCollection) similar to how Excel displays rows.  How can I accomplish this behavior?  I looked into different ways, but I didn't have much success.

Thanks in advance,

Wagner
Saykor
Top achievements
Rank 2
 answered on 03 Sep 2014
6 answers
305 views
Hi Team,

I am doing auto generate properties to false and providing my own property definitions.
The issue is the text box in my data template are not properly align some are of small size some are big based on the text.
I want it to be properly aligned like " stretch" when I resize the grid they should get resized properly and all will be of equal length.
 Also I want the splitter in the grid should uniformly separate the propert name from its value.

could le you help me achieve this
Yoan
Telerik team
 answered on 03 Sep 2014
3 answers
436 views
Hello, sorry if this is posted in the wrong section of the forum.

Now, my question is simple.
I want to find and replace text(strings) in a document, I've tried using the following code:

private void ReplaceAllMatches(RadDocument document, string toSearch, string toReplaceWith)
{
       DocumentTextSearch search = new DocumentTextSearch(document);
       List<TextRange> rangesTrackingDocumentChanges = new List<TextRange>();
       foreach (var textRange in search.FindAll(toSearch))
       {
                TextRange newRange = new TextRange(new DocumentPosition(textRange.StartPosition, true),
                new documentPosition(textRange.EndPosition, true));
                rangesTrackingDocumentChanges.Add(newRange);
            }
 
            RadDocumentEditor docEdit = new RadDocumentEditor(document);
            foreach (var textRange in rangesTrackingDocumentChanges)
            {
                document.CaretPosition.MoveToPosition(textRange.StartPosition);               
                document.DeleteRange(textRange.StartPosition, textRange.EndPosition);
                 
                StyleDefinition style = new StyleDefinition();
                style.SetPropertyValue(Span.ForeColorProperty, Colors.Red);
                                               
                document.Insert(toReplaceWith, style);
 
                textRange.StartPosition.Dispose();
                textRange.EndPosition.Dispose();
            }
        }

But I get two errors, "document.DeleteRange() is obsolete use RadDocumentEditor.Delete() instead." and "document.Insert() is obsolete use RadDocumentEditor.InsertInline() instead.".
I can't figure out how to use these functions instead so that's why I need help!

I've never used this library before so all help is very appreciated.
Best regards
Isak
Petya
Telerik team
 answered on 03 Sep 2014
7 answers
860 views
Hello,

i tried to get the text in RichTextBox with Binding with a property of my ViewModel with type 'string'.
But
something with binding is always wrong. I couldn't pass a defined
string from ViewModel, and i got always string.empty from RichTextBox.

Here is my code in xaml, i also tried RadWatermarkTextBox, that works fine.
<telerik:XamlDataProvider RichTextBox="{Binding ElementName=richTextBox1}" Xaml="{Binding PropertyName, Mode=TwoWay}" />
<telerik:RadRichTextBox Name="radRichTextBox"/>
 
<telerik:RadWatermarkTextBox Text="{Binding Path=PropertyName, Mode=TwoWay}"/>

I have seen some articals with using selection. But i don't want to use it instead of lovely binding...
Another try i have done is with TextRange
var startPosition = new DocumentPosition(radRichTextBox.Document.CaretPosition);
var endPosition = new DocumentPosition(radRichTextBox.Document.CaretPosition);
startPosition.MoveToFirstPositionInDocument();
endPosition.MoveToLastPositionInDocument();
 
var text = new TextRange(
           // TextPointer to the start of content in the RichTextBox.
           startPosition,
           // TextPointer to the end of content in the RichTextBox.
           endPosition).Text;
But Telerik TextRange has difference of MS TextRange, it has no property Text...

Is there a easy way to implement that? That could not be so hard, right? Or what i did wrong in my code?
Petya
Telerik team
 answered on 03 Sep 2014
3 answers
163 views
Is it possible to get hold of the Office2013Palette.Palette.AccentMainColor in XAML?

I know you can get hold of the brushes, using something such as
      telerik:Office2013Resource ResourceKey=EffectAccentHighBrush

however, I need to assign to a color property in the XAML. For the Windows 8 theme, I would use something along the lines of 
      Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MainColor}"

Is there a way to get the similar value for the Office2013 theme? 

Thanks
Jason
Vanya Pavlova
Telerik team
 answered on 03 Sep 2014
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?