Telerik Forums
UI for WPF Forum
1 answer
93 views
Hi,

in my application I use a RadChart component and there is something visible and I want to know if it's possible to remove it. Picture enclosed.

Thank's
Petar Kirov
Telerik team
 answered on 24 Jul 2012
1 answer
87 views
I have a public property on one of my classes that is configurable by a PropertyGrid. It is a string property, but I want the user to be able to set it from a RadComboBox with values provided from an OpenAccess data model. I can't seem to put all the pieces together. The closest I got puts an odd value in the public property ("Telerik.Windows.Controls.RadComboBoxItem: City, State"). I've been banging my head against this for days and I'm tantalizingly close, but I'm just not seeing something.

How do I connect all the bits? The choices to the data source and the selected item to the public property? Here's my code without all my failed efforts taking up space.


Here's the property:
private string weatherloc;
 
[Category("MissionBoard")]
[Description("Weather station location")]
public string WeatherLoc
{
    get { return weatherloc; }
    private set { weatherloc = value; }
}

Here's the RadComboBox in the DataTemplate:
<Grid.Resources>
    <c:FieldTemplateSelector x:Key="DataTemplateSelector">
        <c:FieldTemplateSelector.WeatherDataTemplate>
            <DataTemplate>
                <telerik:RadComboBox x:Name="WeatherComboBox"
                             Loaded="WeatherComboBox_Loaded" />
            </DataTemplate>
        </c:FieldTemplateSelector.WeatherDataTemplate>
    </c:FieldTemplateSelector>
</Grid.Resources>

And here's the code-behind to (hopefully) populate the control:
private void WeatherComboBox_Loaded(object sender, RoutedEventArgs e)
{
    using (EntitiesModel dbContext = new EntitiesModel())
    {
        try
        {
            var q = (from i in dbContext.WeatherFeeds
                     orderby i.Location
                     select new { i.Location }).ToList();
 
            // How to bind all the bits? The public property to the SelectedItem
                // and the choices to the data source.
        }
        catch (SqlException sx)
        {
            Console.WriteLine(sx.ToString());
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.ToString());
        }
    }
}

Ivan Ivanov
Telerik team
 answered on 24 Jul 2012
9 answers
597 views
Hi,

i was wondering if i can change the display style of an appointment in radscheduleview like shown in the attached screenshot? Is it
possible?
The default appointment style does only display the subject of an appointment in the week view for example. In my opinion, this is a waste of useful display space and my goal is to display additional information like the location, resources or category of an appointment.
I looked through the examples and API documentation but didn't found any hint or solution for this problem.

thanks in advance,

best regards

Matthias
Dani
Telerik team
 answered on 24 Jul 2012
1 answer
89 views
Hello, i have a RadGridView with 50 columns and 12 groups. That sentences take 6 seconds.
  grid.Columns.Clear();
  grid.ColumnGroups.Clear();
How can i clear groups and columns faster?

Pavel Pavlov
Telerik team
 answered on 24 Jul 2012
3 answers
207 views
Hello,

I was wondering how can i have the checkbox "keep aspect ratio" in crop tool.

There is one easy way to do that?

By the way i couldn't find the documentation about this control.


Gilberto
Iva Toteva
Telerik team
 answered on 24 Jul 2012
1 answer
287 views
I've tried to no avail to remove the space between my header and the body of my document.  Is there any way to do this?  See my attached image.
Thanks in advance,
Steve

Martin Ivanov
Telerik team
 answered on 24 Jul 2012
1 answer
95 views
Hi telerik,

In my app I need to drag a row from at gridview onto a treeview.

When trying to drag, the cursor never changes to dragging-cursor. I'm a bit at a loss here.

I've tried to look at the example from "GridView Reorder Rows", but merging it over in my code has not produced the dragging cursor.


Can you confirm for me that it should be possible to drag from gridview to treeview?
Is it possible to construct a super simple example where it's done?

Internally in the treeview, I've got dragging working just fine -- the problem seems to be in allowing the dragging action to be initiated from gridview.

I'm still running Q1-release.

Thanks,

Anders, Denmark
Nick
Telerik team
 answered on 24 Jul 2012
1 answer
325 views
Trying to understand how recent documents works I looked at your teams demo for RibbonView and i cannot understand where template are coming from

<common:RecentDocuments x:Key="RecentDocuments" />
<common:RecentPlaces x:Key="RecentPlaces" />
<common:AvailableTemplates x:Key="AvailableTemplates" />
<common:HelpItems x:Key="HelpItemsTemplate" />
Lines showed above
<StackPanel Margin="15 15 0 0">
       <TextBlock Text="Recent Documents" FontSize="14" FontWeight="Bold" Margin="0 0 0 2" />
       <Rectangle Height="1" Fill="{StaticResource DottedLineBrush}" />
       <ItemsControl ItemsSource="{StaticResource RecentDocuments}" Margin="0 4 0 0"
                ItemTemplate="{StaticResource RecentDocumentTemplate}" />
</StackPanel>

And can you help me in understanding how ItemsControl work or direct me where can I learn about this

Thanks in advance
Miro Miroslavov
Telerik team
 answered on 24 Jul 2012
1 answer
319 views
Seems that AddHandler for a FrameworkElementFactory won't work, event are never called ...

here follows the test code

foreach (var c in radGridViewTest.Columns)

            {


                        var factory = new FrameworkElementFactory(typeof(Button), "myButton");

                        factory.SetValue(CursorPropertyCursors.Hand); // OK

                        factory.SetBinding(ContentPropertynew Binding(string.Format("[{0}]"4))); //OK

                        c.CellTemplate= new DataTemplate();

                        

                        var mh = new RoutedEventHandler(onClick);

                        factory.AddHandler(Button.ClickEventmh,true); // won't work ...

                        c.CellTemplate.VisualTree = factory;

                        c.CellTemplate.Seal();
            }


Ivan Ivanov
Telerik team
 answered on 24 Jul 2012
4 answers
117 views
I only get this some times (making it more annoying), but it seems like a bug in the OhlcSeriesRoundLayoutContext.SnapPointToGrid functionality. I need to be able to change the min/max of the vertical axis. Is there any way to turn off the snapping behaviour so it doesn't try to do it and thus doesn't break? Or is this something else doing it? I need to get this working rather soon. 


exception attached:

System.ArgumentOutOfRangeException was unhandled
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  Source=mscorlib
  ParamName=index
  StackTrace:
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
       at Telerik.Charting.OhlcSeriesRoundLayoutContext.SnapToLowGridLine(OhlcDataPoint point)
       at Telerik.Charting.OhlcSeriesRoundLayoutContext.SnapPointToGrid(OhlcDataPoint point)
       at Telerik.Charting.OhlcSeriesModel.ApplyLayoutRounding()
       at Telerik.Charting.CartesianChartAreaModel.ApplyLayoutRounding()
       at Telerik.Charting.ChartAreaModelWithAxes.ArrangeOverride(RadRect rect)
       at Telerik.Charting.ChartNode.Arrange(RadRect rect, Boolean shouldRoundLayout)
       at Telerik.Charting.ChartAreaModel.Arrange()
       at Telerik.Windows.Controls.ChartView.RadChartBase.UpdateChartArea()
       at Telerik.Windows.Controls.ChartView.RadChartBase.CallUpdateUI()
       at Telerik.Windows.Controls.ChartView.RadChartBase.OnInvalidated()
       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 MyApplication.App.Main() in D:\Work\MyApplication\MyApplication
\obj\x86\Debug\App.g.cs:line 0
  InnerException: 

Evgenia
Telerik team
 answered on 24 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?