Telerik Forums
UI for WPF Forum
1 answer
108 views
I am having no end of trouble trying to find the magic to force a single-column RadTileView layout, with all tiles expanding to take up their fully available width.

What property should I be looking for which determines how the tiles determine their width?
Pavel R. Pavlov
Telerik team
 answered on 15 Nov 2012
1 answer
87 views
hello , im using Telerik-Word of WPF in my application , and im wondering if it's possible to make an event to make sure a page is printed out or not , is it possible ? if yes , how ?
Boby
Telerik team
 answered on 15 Nov 2012
4 answers
209 views
I am implementing my own blank row to display at the end of the grid where users will be allowed to enter new data.

I do this by adding an empty row to the end of my ItemsSource

The issue is on Filtering and Sorting the empty row is included in the action. I tried removing the row and then re-adding it  on the Filtering/Filtered and Sorting/Sorted events but on re-add the item is added to the sorted position not the end of the grid. Any help?

For reference this is how I set my DataContext for the Grid.
public DataTable CurrentDataTable
       {
           get { return dataGridView.ItemsSource != null ? ((BindingSource) dataGridView.ItemsSource).DataSource as DataTable : null; }
           set
           {
               CurrentSelectedTableName = value.TableName;
 
               //BindingSource to sync DataTable and DataGridView
               var bSource = new BindingSource {DataSource = value};
 
               //set the DataGridView DataSource
               dataGridView.DataContext = bSource;
           }
       }



Add and Unload Empty Row
public void LoadExtraRow()
 {
      var itemSourceDataTable = CurrentDataTable;
      if (itemSourceDataTable == null)
           return;
      var newRow = itemSourceDataTable.NewRow();
      newRow.RowError = "NEW_ROW";
      itemSourceDataTable.Rows.Add(newRow);
      dataGridView.Rebind();
 }
  
public void UnloadExtraRow()
{
      var itemSourceDataTable = CurrentDataTable;
      if (itemSourceDataTable == null)
           return;
      if (itemSourceDataTable.Rows.Count > 0)
      {
          var emptyRowToRemove = itemSourceDataTable.Rows[itemSourceDataTable.Rows.Count - 1];
          if (emptyRowToRemove.RowError == "NEW_ROW")
          {
               itemSourceDataTable.Rows.Remove(emptyRowToRemove);
          }
       }
   }





David
Top achievements
Rank 1
 answered on 15 Nov 2012
4 answers
762 views
Hi, is there any workaround on preventing the user from  typing beyond the maximum value? 

Please help we are still evaluating a trial copy and this demo will help my boss to decide if she will buy telerik or not.(I know this is not necessary, but lately no one has been replying on questions I post here LOL)

So please... help?
Haegen
Top achievements
Rank 1
 answered on 15 Nov 2012
1 answer
232 views
I have a RadMap, with an InformationLayer, in which I am drawing a MapPolygon and a MapPinPoint.

The MapLayer.Location of the PinPoint is bound to a Location property in the viewmodel, that raises PropertyChanged when modified.

When I change the location, in code, the MapPinPoint is drawn in the new location, so I'm pretty sure that I have the binding and the notification working right.

Now here's the thing - I want the map to center on that same location. So I've bound RadMap.Center to that same property. And that's not working - the center of the map does not change, even though the location of the MapPinPoint does, when both are bound to the same property.

Since the MapPinPoint is working, I have to assume that the property is working right, and that the RadMap is ignoring PropertyChanged events on Center.

So how, then, do I change the center of the map, through bound properties?
Jeff
Top achievements
Rank 1
 answered on 14 Nov 2012
0 answers
103 views
Hi guys,

I am working on a piece of code written by some other person that uses Telerik. An issue I am trying to resolve right now involves GUI formatting.

In this picture, you can see that the "Country" column has been highlighted and is active (i.e. has Distinct Filter). But in this case, that little wine-glass-like icon on the left is grey instead of orange. Do you know how I can make that icon change colour when the column is active?

The classes that are involved are RadGridView, a class that overrides IFilteringControl, and a set of GridViewColumns.

Thanks.
New
Top achievements
Rank 1
 asked on 14 Nov 2012
1 answer
286 views
We are attempting to use a RadDiagram that is nested inside two usercontrols. Our solution follows something like this:
- controls project
  -usercontrol
    -diagram
-app project
  -usercontrol
    -usercontrol (from controls project)

In the usercontrol the diagram is hosted in, the xaml designer can display the usercontrol and diagram without any errors. When viewing the parent usercontrol (in the app project) in the xaml designer, we intermittently receive one of three errors:

1.
Error 51 [A]Telerik.Windows.Controls.RadListBox cannot be cast to [B]Telerik.Windows.Controls.RadListBox. Type A originates from 'Telerik.Windows.Controls, Version=2012.3.1017.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'users\...\AppData\Local\Microsoft\VisualStudio\11.0\Designer\ShadowCache\uaf4o2b1.tgx\m5d3emjg.5ms\Telerik.Windows.Controls.dll'. Type B originates from 'Telerik.Windows.Controls, Version=2012.3.1017.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2012\Binaries\WPF45\Telerik.Windows.Controls.dll'.

2.
Telerik.Windows.DragDrop.Behaviors.DragDropState', on 'Telerik.Windows.DragDrop.Behaviors.DragDropBehavior`1[TState]' violates the constraint of type parameter 'TState'

3.
Cannot find resource file 'themes/genericwindows8touch.xaml'


The project builds and runs fine, but this issue causes problems for our designers who use the xaml designer and Blend (which reports the same errors in the designer). The first situation seems odd as we do not reference telerik controls from the install directory (C:\Program Files (x86)\Telerik\RadControls...) anywhere.

Are there any known issues with the diagram control, or possibly the listbox control and the 2012 xaml designer?

Thanks,
James
George
Telerik team
 answered on 14 Nov 2012
1 answer
134 views
When add a RadPane to a RadPane group as IsPinned = false, I get the following error.

public MainWindow(){
InitializeComponent();
RadPane rp = new RadePane();
rp.CanUserClose = false;
rp.CanFloat = false;
rp.CanUserPin = false;
rp.CanDockInDocumentHost = false;
rp.IsSelected = false;
rp.IsPinned = false;
rpgRight.Items.Add(rp);
}

My applications logs:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<entries>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="167206912" version="1.1.3.26256" specialBuild="">
        <message>
            Element already has a logical parent. It must be detached from the old parent before it is attached to a new one.
        </message>
        <stackTrace>
               at MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
   at MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
   at System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
   at Telerik.Windows.Controls.Docking.AutoHideArea.Add(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.Docking.AutoHideArea.UnpinPane(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.RadDocking.UnpinPane(RadPane radPane, AutoHideArea area, Boolean stopEvents)
   at Telerik.Windows.Controls.RadDocking.OnRadPanePinChange(Object sender, PinChangeEventArgs args)
 
Exception Type: System.InvalidOperationException
        </stackTrace>
    </entry>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="167829504" version="1.1.3.26256" specialBuild="">
        <message>
            Exception has been thrown by the target of an invocation.
        </message>
        <stackTrace>
               at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at Telerik.Windows.Controls.RadPane.<>c__DisplayClass7.<RaiseEventInternal>b__5()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
 
Exception Type: System.Reflection.TargetInvocationException
        </stackTrace>
    </entry>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="168116224" version="1.1.3.26256" specialBuild="">
        <message>
            Element already has a logical parent. It must be detached from the old parent before it is attached to a new one.
        </message>
        <stackTrace>
               at MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
   at MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
   at System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
   at Telerik.Windows.Controls.Docking.AutoHideArea.Add(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.Docking.AutoHideArea.UnpinPane(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.RadDocking.UnpinPane(RadPane radPane, AutoHideArea area, Boolean stopEvents)
   at Telerik.Windows.Controls.RadDocking.OnRadPanePinChange(Object sender, PinChangeEventArgs args)
 
Exception Type: System.InvalidOperationException
        </stackTrace>
    </entry>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="168665088" version="1.1.3.26256" specialBuild="">
        <message>
            Exception has been thrown by the target of an invocation.
        </message>
        <stackTrace>
               at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at Telerik.Windows.Controls.RadPane.<>c__DisplayClass7.<RaiseEventInternal>b__5()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Suddenlink.CustomerCare.Maestro.App.Main() in C:\Users\michael.sullivan\Development\CSR Desktop\Customer Care Desktop\Suddenlink.CustomerCare.Desktop\obj\x86\Debug\App.g.cs:line 0
 
Exception Type: System.Reflection.TargetInvocationException
        </stackTrace>
    </entry>
</entries>
Alek
Telerik team
 answered on 14 Nov 2012
1 answer
98 views
Hi,

How do I prevent the user from dragging content such as text and images and relocating it to a different location in the document?

Thanks,

Rob
Petya
Telerik team
 answered on 14 Nov 2012
1 answer
109 views
I have to show multiple calendars based on resources. I am able to show multiple calendars, however i need to have expander control over each individual calender and also needs to display some text above each individual calendar.

Let me know if this is possible.

Note: The changes are required in Month View definition and the orientation of calendar is horizontal.

Please refer the attachment for more details.
Yana
Telerik team
 answered on 14 Nov 2012
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?