Telerik Forums
UI for WPF Forum
2 answers
144 views
Hi,

I need to have control over the reordering of columns. More specific, in case the user reorder column, i need to reorder another column in order to keep the symmetry.

I tried to use ColumnReordered event but i have 2 problems with this approach:

1) I am having infinite loop, because i also have to user grid.ReorderColumns  (and then i get the event again)

2) in the  ColumnReordered  event i don't have the original index of the column before the reordering. I need it in order to know which other column should i reorder.

Thanks,

Ofer
Tsvyatko
Telerik team
 answered on 27 Jan 2010
3 answers
126 views
Hi,

version:2009.3.1314.35
.net 4.0 beta 2

I have the following problem:

Dragging a column to the grouppanel goes well, but when I try to ungroup I get the following error:

System.InvalidCastException was unhandled by user code
  Message=Unable to cast object of type 'MS.Internal.NamedObject' to type 'Telerik.Windows.Data.GroupDescriptor'.
  Source=Telerik.Windows.Data
  StackTrace:
       at Telerik.Windows.Data.GroupDescriptor.Equals(Object obj) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Data\Grouping\GroupDescriptor.cs:line 191
       at System.Object.Equals(Object objA, Object objB)
       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at System.Windows.TreeWalkHelper.InvalidateOnInheritablePropertyChange(FrameworkElement fe, FrameworkContentElement fce, InheritablePropertyChangeInfo info, Boolean skipStartNode)
       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, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Controls.ItemContainerGenerator.UnlinkContainerFromItem(DependencyObject container, Object item)
       at System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex)
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 141
       at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
       at Telerik.Windows.Data.RadObservableCollection`1.RemoveItem(Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 212
       at Telerik.Windows.Data.ObservableItemCollection`1.RemoveItem(Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 68
       at System.Collections.ObjectModel.Collection`1.Remove(T item)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.Ungroup(String member) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3302
       at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass2a.<GroupingRequested>b__29() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3196
       at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\CursorManager.cs:line 16
       at Telerik.Windows.Controls.GridView.GridViewDataControl.GroupingRequested(Object origin, GroupingRequestedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3177
  InnerException:
Pavel Pavlov
Telerik team
 answered on 27 Jan 2010
5 answers
664 views
Can I do a VU meter (like progressbar and "analog") with Gauges? This is the design I'm look for. I'm not a graphicdesigner so I need som help. See attachment.
Velin
Telerik team
 answered on 26 Jan 2010
2 answers
95 views
Hi,

I am trying to set a DataTable as ItemsSource for a RadGridView and get the following exception:

   at System.Linq.Enumerable.<CastIterator>d__aa`1.System.Collections.IEnumerator.Reset()
   at Telerik.Windows.Data.EnumerableExtensions.TryGetFirstElementType(IEnumerable source, Type& firstElementType) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\EnumerableExtensions.cs:line 54

I do the following:

DataTable

 

dataTable = new DataTable();

 

 

string[] values = dataValue.Value.Split(',');

 

 

for (int i = 0; i < values.Length; i++)

 

{

dataTable.Columns.Add(i.ToString(),

typeof(string));

 

}

dataTable.Rows.Add(values);

 

this.radGridView1.AutoGenerateColumns = true;

 

 

this.radGridView1.ItemsSource = dataTable;

 



Anybody has some suggestions what I am doing wrong here?
Pascal
Top achievements
Rank 1
 answered on 26 Jan 2010
5 answers
146 views
Hi,

I have downloaded latest trial verision of Wpf RadControls. They are working very good, but there is one exception. I can not drop pane(floating window state) outside the window of wpf application. Dragging and docking works only inside window of app - when I am trying to drag pane outside the window, pane "hides" underneath the border of app.
Is there any solution of this "problem"?

Best regards
Pit
Boyan
Telerik team
 answered on 26 Jan 2010
1 answer
139 views
hi all,
i hv a refresh button and i want to set first row or previously selected row as selected row after user refreshes the grid.
in the below code, _selectRow is of object type.  i am using customobjects in the project so _selectRow will be custom object of type "sample". however, i am unable to set selectedrow using the below code, please let me know if iam missing anything here.

regards,
Sandy



 

if (wipGridView.SelectedItem != null)

 

_selectedRow = wipGridView.SelectedItem ;

 

else

 

{

_selectedRow = wipGridView.Items[0] ;

}

 

this.Cursor = Cursors.Wait;

 

LoadWipGrid(_selectedDisplayType);

wipGridView.CurrentItem = _selectedRow;

wipGridView.SelectedItem = _selectedRow;

wipGridView.SetIsCurrent(_selectedRow,

true);

 

wipGridView.SetIsSelected(_selectedRow,

true);

 

Milan
Telerik team
 answered on 26 Jan 2010
1 answer
100 views
Hello Forum!

Is this a place to only discuss telerik products or is this also a place for people just learning WPF?
Milan
Telerik team
 answered on 26 Jan 2010
4 answers
173 views
Hello,

I attached event handler for GridViewRow Selected event by eventSetter.
But i getting "Handler type is not valid" exception.


void Row_Selected(object sender, RoutedEventArgs e){} 
<Style TargetType="telerik:GridViewRow">  
     <EventSetter Event="Selected" Handler="Row_Selected"/>  
</Style> 
What should be the right handler type for this event?

Basicly what I'm trying to do is after the data is loaded to set programaticly the second colomn of Grid to current and in edit mode.
Additionaly on arrow navigartion Up/Down current cell should be updated to the up/down cell in the same colomn and always current cell should be in edit mode.

Thank you
Milan
Telerik team
 answered on 26 Jan 2010
3 answers
178 views
Hi, i'm new on Telerik for WPF,

And i have some issue :

My grid is dynamiclly refreshed with prices, in the cells.
And i want to have my Cell's background change to green when the new price is bigger than the old one,
and change to a Red Background if my new price is lower than the old one.


So, i need to do this in the codebehind (i guess), but i'm not able to find the cell's background color properties there.

Can someone explain me how to do this ?


Thanks for your support.
Vlad
Telerik team
 answered on 26 Jan 2010
1 answer
49 views
We are getting an excessive amount of Null Reference Exceptions from the Telerik grid.   We are using the latest build that was released on Jan 14th.  We only use the grid in a read only fashion.  We use it as a work queue listing.  We refresh the data quite frequently.  We are setting the ItemsSource, we do NOT call Rebind(), we  DO reset SelectedItem and if not null we call the ScrollIntoView method.  All grid operations are in Try/Catch blocks.  Since these null exceptions are happening inside the Telerik DLL's our application is crashing

Vlad
Telerik team
 answered on 26 Jan 2010
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?