Telerik Forums
UI for WPF Forum
3 answers
202 views

I'm using the tree control from C#.  Our application can fill the tree with a lot of data. Every time a user either expands an individual tree node or initiates the expand all nodes call, if any column is set to be sorted, an InvalidOperationException is thrown when Telerik's internal code is calling the "get" method of the "Column" property in the Telerik.Windows.Controls.GridView.ColumnSortDescriptor class.

The the VS debugger flags the exception in the file "c:\RadControlsSource\Controls\GridView\GridView\GridView\Sorting\ColumnSortDescriptor.cs", line 38.

Here's the exception information:

System.InvalidOperationException was unhandled by user code
  Message="The calling thread cannot access this object because a different thread owns it."
  Source="WindowsBase"
  StackTrace:
       at System.Windows.Threading.Dispatcher.VerifyAccess()
       at System.Windows.Threading.DispatcherObject.VerifyAccess()
       at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
       at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.get_Column()
       at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.CreateSortKeyExpression(ParameterExpression parameterExpression)
       at Telerik.Windows.Data.SortDescriptorBase.CreateSortKeyExpression(Expression itemExpression)
       at Telerik.Windows.Data.Expressions.SortDescriptorCollectionExpressionBuilder.Sort()
       at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, IEnumerable`1 sortDescriptors)
       at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, SortDescriptorCollection sortDescriptors)
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.get_BaseView()
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.CreateHierachyView(HierarchicalCollectionViewBase view)
       at Telerik.Windows.Data.HierarchyItem.get_Children()
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.<CreateView>b__23(HierarchyItem h)
       at Telerik.Windows.Data.EnumerableExtensions.<SelectRecursive>d__3`1.MoveNext()
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.PopulateInternalList(IQueryable view)
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.<>c__DisplayClass32.<CreateInternalList>b__2e(Object s, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
  InnerException:

I am accessing the TreeListView control from the main UI thread. When this exception happens, the state of the tree control is hosed and our Windows desktop application must be restarted. Can anyone give me a clue as to how I can avoid this problem?  Thanks.
Don
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
64 views
I am working on an application that has a list of Categories.  Each Category has a list of Tests.  When someone selects a student from the list, I want to be able to load their percentages as they are associated to the lists of Cat\Tests.  The problem is that I can't figure out how to access the cells in the grid that represent the values.  My tree part is loading just fine, but I want to be able to manually enter the scoring percentage from another object.  Is this possible?  I have included a mock up of what I am looking for

Name Correct Incorrect Not Answered
Math
Test 1 4 1 0
Test 2 6 0 0
Spelling
Alphabet Test 20 0 6
Lower Case 18 5 3

As I said before, I have the tree loading through binding, but I need to access the cells for the other numbers directly based on the selected student.

Thanks in advance,
Lee
Lee
Top achievements
Rank 1
 answered on 03 Oct 2012
2 answers
81 views
Hi am able to build the Radtreeview with child items, I used the load on demand event to load the child items and it works for fine.
The problem here is for every child item there is expand sign but there is a point there are no child items for a parent in that case for the child items I don't want show the expand sign. How can I achieve this ?
Pavel R. Pavlov
Telerik team
 answered on 03 Oct 2012
2 answers
151 views
It seems RadRibbonWindow  that does not work with RadRichTextBoxRibbonUI or the standard RadRibbonView but only with the RadRibbonBar. The result is that the ribbon does not merge/blend with the window title bar nicely.
I'm using RadRichTextBoxRibbonUI because my form is mainly a rich text editing form, so I want it to easily bind with a richtext control. 
Is this true? If so, how can I overrride this problem?
Tina Stancheva
Telerik team
 answered on 03 Oct 2012
2 answers
137 views
Hello,

I tried to change OrgLayoutAlgorithm so he can have several root, but I can not do it. Is that you could help me?
Joël
Top achievements
Rank 2
 answered on 03 Oct 2012
3 answers
244 views
I'd like to clarify the discussion towards the bottom of this page, http://www.telerik.com/help/silverlight/radchartview-series-databinding.html, specifically:

"If we needed to track the selling of our products in real-time, we can simply put the product types in an observable collection and whenever we update a product's sold quantity, the chart will be updated."

and

"The only requirement left for the code above to work is that our Product class needs to implement INotifyPropertyChanged and raise the PropertyChanged event when its QuantitySold property changes"

If we are using GenericDataPointBinding, how does the chart know that it's the QuantitySold property that it is interested in (because it binds to that property via a lambda)? (This become relevant, if for example, the Product class has other properties, not displayed in the chart, that cause PropertyChanged events). Does the chart listen for a PropertyChange on any property and then attempt to find the new value of the data point?
Ves
Telerik team
 answered on 03 Oct 2012
2 answers
139 views
When I use a DataTemplateSelector, the type passed into SelectTemplate via the item parameter is PropertyDefinition. I can get things like the name of the property and the type of the property, but how about the type that contains the property? If I have five classes with a string property called "Reference" and I need a data template for each of those, I need the name of the class that contains that property to select the proper template. How do I obtain that information?
Ivan Ivanov
Telerik team
 answered on 03 Oct 2012
1 answer
109 views
Hi,

in my application I have a RadGridview. I have a RadButton to launch a call to my backend to get data. When the user want to apply filters on a column, he click on the column header icon, the color of the icon change and he can select values in the dialog (see: filters ok.png).

When the user click on my RadButton, I call the RadGridView.FilterDescriptors.Clear() method, the filter icon in the column header change but the values in he filter dialog remain checked (see: filters not ok.png). By the amount of data in my grid, I can see that the filters was removed but like I said, If I go back in the filters dialog, the values remain checked.

Thank's
Dimitrina
Telerik team
 answered on 03 Oct 2012
3 answers
261 views
Hello, I am using the RadDocking to manage a collection of panes.  I have a DataTemple with a EditableContentControl to allow modification of header text.  This works quite well with the exception of when a pane is moved to a new group.  When a RadPane is removed from the initial RadPaneGroup and placed in a new location, and I add a new pane, all RadPanes in the new RadPaneGroup do not utilize the DataTemplate defined in the initial.  Is there some resolution to this?
You can see from the XAML below that I am binding the ItemSource for the RadPaneGroup to a collection using an extension.  The newly greated RadPaneGroup does correctly bind to the collection of panes so I had assumed that the DataTemplate too would be applied.

Thanks

Paul

<Grid>
   <TelerikDocking:RadDocking>
     <TelerikDocking:RadDocking.DocumentHost>
       <TelerikDocking:RadSplitContainer>
         <TelerikDocking:RadPaneGroup Extension:PaneGroupExtensions.ItemsSource="{Binding Panes, Source={StaticResource QueueWindowViewModel}}">
           <Extension:PaneGroupExtensions.ItemHeaderTemplate>
             <DataTemplate>
               <Grid>
                 <Root:EditableContentControl Content="{Binding HeaderText, Mode=TwoWay}"/>
               </Grid>
             </DataTemplate>
           </Extension:PaneGroupExtensions.ItemHeaderTemplate>
         </TelerikDocking:RadPaneGroup> 
       </TelerikDocking:RadSplitContainer>
     </TelerikDocking:RadDocking.DocumentHost>
   </TelerikDocking:RadDocking>
</Grid>

 

 

 

Paul
Top achievements
Rank 1
 answered on 02 Oct 2012
0 answers
92 views
Hello Everyone,

I am adding my custom logic in CanDrag method as described in below link

http://www.telerik.com/help/wpf/radscheduleview-features-draganddrop.html

Before I return false in the CanDrag method, I am displaying the Message box using MessageBox.Show("You can not drag this appointment")

After message box displayed on my screen, my application is hanging endlessly. I am unable to understand the cause of this issue.

Any help would be greatly appreciated.

Regards,
Kshamesh
Kshamesh
Top achievements
Rank 1
 asked on 02 Oct 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?