Telerik Forums
UI for WPF Forum
5 answers
1.0K+ views
Hi,
I have (randomly) this kind of problem in my application:

when I load the Window containing the telerik Chart control ("WindowChart") the app crashes with this kind of error:
"Specified value of type 'System.Windows.Media.SolidColorBrush' must have IsFrozen set to false to modify."

It doesn't happen when "WindowChart" is the First window loaded.
If I load other windows before (all containing other telerik controls - not chart) - only in some cases, but always loading "WindowChart" - the App crashes

can you help me?

Michele Semprini
Ves
Telerik team
 answered on 15 Jun 2011
3 answers
244 views
Hi,

We have a problem with the grid filters when using the IsFilterable property.

Here are the steps:

1. we select a ColumnFilter using the small icon on top of the column - the filtered records appear.
2. we select several records from this filtered list
3. we change the filter to any other of which output does not contain the previously selected records.

At this moment the selection we made is cleared leaving us with SelectedItems.Count == 0. Therefore we cannot use filters more then once to select records from different categories.

Please supply solution to this issue.
Rossen Hristov
Telerik team
 answered on 15 Jun 2011
1 answer
122 views

Hi Telerik,

I am using “RadDateTimePicker” with InputMode="DatePicker". I want to open a calendar with future dates when user click on calendar icon. By default, current months are opening with respective dates, but I want to set future date in order that calendar popup will open as per the future date/month.

 

Thanks,

Dinesh

Konstantina
Telerik team
 answered on 15 Jun 2011
1 answer
268 views
Hi,

I'm trying to create a custom column that inherits from GridViewBoundColumnBase but I want to style it entirely in XAML.

I need to know how to do the binding between the column's DataMemberBinding and the editor.

Here is a simple example (the GridViewColumnTextBox is empty and inherit's GridViewBoundColumnBase):

        <Style TargetType="{x:Type Controles:GridViewColumnTextBox}">
            <Setter Property="CellEditTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBox Text="BINDING?"/>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>

So, is there any way to do the binding to DataMemberBinding ?
Pavel Pavlov
Telerik team
 answered on 15 Jun 2011
8 answers
538 views
TypeA & TypeB both implement the same base type.  We are binding the RadGridView's ItemSource to an IList<BaseType> baseList

When we have the grid view filtering out TypeA and re-generate our baseList object, the on property changed throws the following:

As a note, we are using a custom hierarchy (as found in the examples: Telerik\RadControls for WPF Q1 2011 SP1\Demos\Examples\GridView\Hierarchy\CustomHierarchy)
-Type B has a list of TypeA,
-only TypeB is expandable (to show list of TypeA).

System.InvalidCastException: Unable to cast object of type 'TypeA' to type 'TypeB'.
   at System.Linq.Enumerable.<CastIterator>d__aa`1.MoveNext()
   at Telerik.Windows.Data.QueryableCollectionView.PopulateInternalList(IQueryable view)
   at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.EnsureInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
   at Telerik.Windows.Data.QueryableCollectionView.InternalIndexOf(Object item)
   at Telerik.Windows.Data.QueryableCollectionView.TryRestorePreviousCurrency()
   at Telerik.Windows.Data.QueryableCollectionView.InitializeCurrencyOnRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshInternal()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at Telerik.Windows.Data.RadObservableCollection`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.Remove(T item)
   at Telerik.Windows.Data.CollectionExtensions.RemoveItems[T](ICollection`1 collection, IEnumerable`1 items)
   at Telerik.Windows.Data.DataItemCollection.RemoveDescriptorsFromCollectionView()
   at Telerik.Windows.Data.DataItemCollection.set_CollectionView(QueryableCollectionView value)
   at Telerik.Windows.Data.DataItemCollection.CreateCollectionView(IEnumerable source)
   at Telerik.Windows.Data.DataItemCollection.SetItemsSource(IEnumerable source)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass18.<Bind>b__17()
   at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.Bind(Object newValue)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue)
   at Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
   at MS.Internal.Data.PropertyPathWorker.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at OurCode.NotifyPropertyChanged[T](Expression`1 propertySelector) in [Our stack trace here...]
Yavor Georgiev
Telerik team
 answered on 15 Jun 2011
1 answer
117 views
Hi,

I tried to add combox to one of the column header in my TreeListView as below, but it doesn't work.

 

<telerik:GridViewDataColumn  DataMemberBinding="{Binding UnweightedCount, Mode=OneWay}">
    <telerik:GridViewColumn.Header>
        <DataTemplate>
            <ComboBox >
                <ComboBoxItem  Name="cbi1">Item1</ComboBoxItem>
                <ComboBoxItem  Name="cbi2">Item2</ComboBoxItem>
                <ComboBoxItem  Name="cbi3">Item3</ComboBoxItem>
            </ComboBox>
        </DataTemplate>
    </telerik:GridViewColumn.Header>
</telerik:GridViewDataColumn>
 

By the way, I was going to attach some pictures, I couldn't find attach button when I edit this thread.

Regarding,

Fendy
Vlad
Telerik team
 answered on 15 Jun 2011
1 answer
113 views
I am trying to use a CellEditTemplate to define a RadDatePicker on a GridView cell. Reason for this is that I want to control the Selectable Dates, so the user cannot select a date after today. It is partially working.

I've defined a TextBlock as the CellTemplate and the RadDatePicker as the CellEditTemplate. But when I select a date and move to the next cell, it's not updating the value in the view mode for that cell.

I'm sure I'm missing something to make this work. How do I define a RadDatePicker as teh CellEditTemplate on a GridViewDataColumn bound to a property on my VM?
Rayne
Top achievements
Rank 1
 answered on 14 Jun 2011
0 answers
182 views
I'm setting my textbox to pick up the application theme and for a few of my controls, I need to remove the right rounded corners.

I'm basically trying to make a DropDownButton look sort of like an editable comboBox. I've got it working with the exception of the corner radius of the styled textbox. If I give the right side a border thickness of 1 so that it divides the text area from teh dropdown button, then the corners on that side show up.

How do I remove the corner radius from the right side just for these specific textboxes?
Rayne
Top achievements
Rank 1
 asked on 14 Jun 2011
3 answers
936 views
I'm using a drop down button to display a context menu of options. But I'd like the content of the button to appear as a TextBox (like an editable combobox, but read-only). Is this possible?

If not, can I at least left align the text that gets displayed? I'm using a ContentTemplate and setting HorizontalAlignment and TextAlignment to Left on the TextBlock, but it still is aligning to the center of the control.

Essentially I want it to look like an editable combobox (with a textbox and dropdown button to the side; textbox can look disabled/read-only).
Rayne
Top achievements
Rank 1
 answered on 14 Jun 2011
1 answer
335 views
Telerik support,

I have a RadTreeView that is populated with DataBinding to an XML data file.  I use a Hierarchical DataTemplate in the XAML code to populate the Tree.  I would like to use the following in the C# code-behind to delete elements with the delete key.  This works fine for all of the first-level nodes in the Tree.  I would like to be able to select child items also and delete them in the same way.  The child items are created with DragAndDrop.

Here is the code to delete the parent items:

void MyView_KeyDown(object sender, KeyEventArgs e)
        {          
            if (e.Key.Equals(Key.Delete))
            {
                IList source = this.MyView.ItemsSource as IList;
                source.Remove(MyView.SelectedItem);                               
            }
        }

How can I change this to delete the child items also?  I have looked at some of the examples in the forum, and I found

foreach

 

 

(MyItem item in MyView.ItemsSource)

 

 

    {

 

 

 

    foreach (MyItem child in item.Children)

 

 

        {

 

            source.Remove(MyView.SelectedItem);

 

        }

 

    }


but I don't know what to use for item.Children in the 2nd foreach statement if this is the best way to find all child nodes.

Thanks,
Scott
Scott
Top achievements
Rank 1
 answered on 14 Jun 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?