Telerik Forums
UI for WPF Forum
5 answers
220 views
Hello,

Haven't found a specific case like mine on the forums, but I've tried several variances of code I've seen with no avail.

My problem is simple in nature, I have a data-bound GridViewComboBoxColumn that, when I load the program, doesn't display values synonymous with the data its bound to, or at all.  Data its bound to is correct on our other application using the same datasource, and the List<T> its bound to shows up when the combo box is clicked on, there are just no values initially in the grid.

XAML
<telerik:GridViewComboBoxColumn Header="Type" Width="160" UniqueName="Type" DataMemberBinding="{Binding Path=Type}" DisplayMemberPath="Name" /> 

C# on constructor call for the new view being created.
((GridViewComboBoxColumn)(Tasks.Columns[1])).ItemsSource = AdminHandler.GetQuestTaskTypes();

This is the ONLY instance of this in our tool, while every other GridViewComboBoxColumn is formatted the same way and working perfectly.  The only difference with this, is the C# is getting called inside the constructor of a new view, while the rest of the ItemsSource assignments are inside the LayoutRoot_Loaded event.

Thank you.
Maya
Telerik team
 answered on 16 Jan 2012
0 answers
135 views
I am working with Telerik WPF controls, RadGridView, RadDataPager and VirtualQueryableCollectionView<T>.
The PageCount of RadDataPager is incorrect once i filtered the data via RadGridView header. The PageCount  is  
always 1.  please find attached image screenshot.

I do not know how to fix this issue. In following code, i set the VirtualItemCount value as new value but the RadDataPager show me 1 as PageCount. I could not move to next page.  

Assembly version is: 2011.3.1220.40 

<telerik:RadGridView x:Name="GridView" ItemsSource="{Binding DataView}" Width="700" MinHeight="386" MaxHeight="500"
                .........
</telerik:RadGridView>
  
<telerik:RadDataPager PageSize="100" Grid.Row="1" Source="{Binding DataView}"  />

public VirtualQueryableCollectionView<VSOEChageItemViewModel> DataView
     {
         get
         {
             if (_DataView == null)
             {
                 _DataView = new VirtualQueryableCollectionView<VSOEChageItemViewModel>() { LoadSize = 40, VirtualItemCount = 40 };
                 _DataView.ItemsLoading += DataViewItemsLoading;
             }
             return _DataView;
         }
         private set
         {
             if (_DataView != null)
             {
                 _DataView.ItemsLoading -= DataViewItemsLoading;
             }
  
             _DataView = value;
  
             if (_DataView != null)
             {
                 _DataView.ItemsLoading += DataViewItemsLoading;
             }
         }
     }

private void DataViewItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs e)
     {
         string filertString = GetFilertString();
  
         var sort = DataView.SortDescriptors;
         var sortString = sort.ToDynamicLinq();
         if (!string.IsNullOrEmpty(sortString))
             sortString = sortString.Remove(0, sortString.IndexOf(".") + 1);
  
         int allCount = 0;
         List<VSOEChageItemViewModel> dd1 = LoadData(filertString, sortString, e.StartIndex, e.ItemCount, out allCount);
  
  
         if (allCount != DataView.VirtualItemCount)
         {
             DataView.VirtualItemCount = allCount;
         }
  
         DataView.Load(e.StartIndex, dd1);
  
     }
Srikrishna Illendula
Top achievements
Rank 1
 asked on 16 Jan 2012
4 answers
98 views
When I plot an OHLCSeries or CandlestickSeries on a ChartView, sometimes I have data points where the open, high, low, and close values are all the same.  In these cases, the data point doesn't show up at all -- no matter how far I may zoom in.  It seems that I should at least be able to see some small visual indicator of where the data point is instead of it being completely invisible.  This seems like a bug/usability issue, but I could be wrong.  Is this behavior by design?  

I'd like to request that such data points always be shown or that an option be provided to show them when each OHLC component value is the same.  Thanks!

Paul     
Paul
Top achievements
Rank 1
 answered on 14 Jan 2012
1 answer
229 views
Hello,
I'm developing a king of help in my WPF application... I've found no HTMLTextBox/TextBlock.... how can I present HTML just as Text inside WPF?

Thanks

RichTextBox doesn't seems to match my needs for showing just text

Thanks
Martin Ivanov
Telerik team
 answered on 13 Jan 2012
1 answer
103 views
Original code:
protected virtual double CalculateMaxValue()
{
    double maxValue = this.ActualMinValue;
 
    while ((decimal)maxValue < (decimal)this.SeriesMaxValue)
        maxValue += this.ActualStep;
 
    return maxValue;
}

If we have maxValue or SeriesMaxValue not in the decimal type range then we have an exception
"Value was either too large or too small for a Decimal.";

Stacktrace
System.OverflowException: Value was either too large or too small for a Decimal.
    Ð² System.Decimal..ctor(Double value)
    Ð² Telerik.Windows.Controls.Charting.AxisRange.CalculateMaxValue()
    Ð² Telerik.Windows.Controls.Charting.AxisRange.UpdateRange()
    Ð² Telerik.Windows.Controls.Charting.AxisRangeY.UpdateRange()
    Ð² Telerik.Windows.Controls.Charting.AxisY.InitializeAxisValuesForAutoRange()
    Ð² Telerik.Windows.Controls.Charting.Axis.BuildAxisData()
    Ð² Telerik.Windows.Controls.Charting.AxisY.BuildAxisData()
    Ð² Telerik.Windows.Controls.Charting.Axis2D`1.UpdateAxisData(Axis axis, Size newSize)
    Ð² Telerik.Windows.Controls.Charting.Axis2D`1.AxisSizeChanged(Object sender, SizeChangedEventArgs e)
    Ð² System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    Ð² System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    Ð² System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    Ð² System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    Ð² System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    Ð² System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
    Ð² System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
    Ð² System.Windows.ContextLayoutManager.fireSizeChangedEvents()
    Ð² System.Windows.ContextLayoutManager.UpdateLayout()
    Ð² System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
    Ð² System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
    Ð² System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
    Ð² System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
    Ð² System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
    Ð² System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    Ð² MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

WPF 4.0
Telerik 2011.3.1116
Yavor
Telerik team
 answered on 13 Jan 2012
6 answers
244 views
I have a grid that I'm binding to an ObservableItemCollection and a separate toolbar that allows the user to perform Add, Delete, etc. operations on the data within the grid. The data going into the collection is not sorted. I'm setting the default sort on a column in the code behind. When I add a new row using the toolbar button or hitting Insert the new row is added underneath the last record in the ObservableItemCollection, not the end of the grid where I'd expect it to be. So the new row could show up anywhere within the grid. If I don't set the default sorting, it puts the row at the end. Is there a way to force the row to be inserted after the last record within the grid?

Also, I noticed when I don't set a default sort, then sort the grid on the client side I'm getting the same behavior. The insert it happening wherever the last item was put into the collection.

Thanks,
Karen
Jason
Top achievements
Rank 1
 answered on 13 Jan 2012
8 answers
204 views
Is it possible to remove the label column within an Autogenerating DataForm?
Colin Wright
Top achievements
Rank 2
 answered on 13 Jan 2012
6 answers
146 views
In the current version (Q3 2011), when the user enters a value below the specified 'Minimum', the bound property is updated to this value.

In Q2, the source was also updated first to the wrong value, but afterwards a second update occurred using the specified minimum value.

The current behavior is just completely wrong, while the behavior in Q2 is also not really expected as I would expect of the control not to update the source to a value below the minimum in the first place, but directly to the minimum value.

<Window x:Class="RadNumericUpDownProblem.MainWindow"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <telerik:RadNumericUpDown Minimum="0"
                              Value="{Binding NumericUpDownValue}"/>
</Window>

namespace RadNumericUpDownProblem
{
    public partial class MainWindow
    {
        private int mNumericUpDownValue;
 
        public MainWindow()
        {
            InitializeComponent();
 
            DataContext = this;
        }
 
        public int NumericUpDownValue
        {
            get { return mNumericUpDownValue; }
            set { mNumericUpDownValue = value; }
        }
    }
}
Stefan
Top achievements
Rank 1
 answered on 13 Jan 2012
1 answer
83 views
Hi
is ther a simpale way to print the radchart?
hanan
Evgenia
Telerik team
 answered on 13 Jan 2012
1 answer
163 views
When I put RadTimeBar control on design surface it does not look quite similar to waht's shown in demos and documenation. For example, I don't see time perioids shown both on top and bottom row of the control. The selection bar looks alos different. I don't see the scrollbar at the bottom. I am using the later version of the control. Does anyone know why is sucsh a difference in the statndard look without any custome styling?

Thanks,
Pabitra
Tsvetie
Telerik team
 answered on 13 Jan 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?