Telerik Forums
UI for WPF Forum
6 answers
184 views
Hi,

i have a really strange problem with the gridview and i can't figure out what the exact problem ist. my scenario: i have a usercontrol with several other controls, a combobox and a gridview. the gridview contains several columns: text-, checkboxes- and one combobox-column. the deal is when i'm selecting a value in the combobox OUTSIDE the grid, the combobox INSIDE should be updated. which works pretty good - exept for one thing. when i load the data to the grid, change 1 cell in the grid, and then select the combobox outside, i get following exception:
________________________________________________________________________________________

System.FormatException was unhandled by user code
  Message="GUID muss 32 Ziffern mit 4 Bindestrichen enthalten (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."
  Source="System"
  StackTrace:
       bei System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
       bei Telerik.Windows.Data.ItemPropertyInfoExtensions.SetValue(ItemPropertyInfo itemProperty, Object item, Object value)
       bei Telerik.Windows.Controls.GridView.EditContext.ReturnOldValuesToRow(GridViewColumnCollection columns, Dictionary`2 oldValues, Object dataItem)
       bei Telerik.Windows.Controls.GridView.EditContext.CancelRowEdit(GridViewRow gridViewRow)
       bei Telerik.Windows.Controls.GridView.EditContext.CancelEdit(GridViewEditingUnit editingUnit)
       bei Telerik.Windows.Controls.GridView.GridViewDataControl.CancelEdit(GridViewEditingUnit editingUnit)
       bei Telerik.Windows.Controls.GridView.GridViewDataControl.CancelEdit()
       bei Telerik.Windows.Controls.GridView.GridViewDataControl.ItemsSourceChanged(Boolean sourceChanged)
       bei Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue)
       bei Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       bei Telerik.Windows.Controls.DataControl.set_ItemsSource(Object value)
       bei Hsg.Baxter.Cpe.BaxterWPFClient.Pages.Subpages.AssayDialog.PlateLayout_Changed(Object sender, SelectionChangedEventArgs e) in C:\Users\kogmon.HS\Desktop\TFS_Baxter\CPE_MAIN\BaxterWPFClient\Pages\Subpages\AssayDialog.xaml.cs:Zeile 1796.
       bei System.Windows.Controls.SelectionChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       bei System.Windows.Controls.ComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
       bei System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems)
       bei System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
       bei System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(Object item, Boolean assumeInItemsCollection)
       bei System.Windows.Controls.ComboBox.NotifyComboBoxItemMouseUp(ComboBoxItem comboBoxItem)
       bei System.Windows.Controls.ComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       bei System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
       bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       bei System.Windows.Input.InputManager.ProcessStagingArea()
       bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  InnerException:
___________________________________________________________________________________________

if i first load the data, then select any value from the combobox and change the values in the grid after everything works fine.
i have tried to "delete" the existing itemsource by setting grid.ItemSource = null before rebinding the changed data but this also provides the same exception. any ideas what i can change?
thx in advance
Monika Kogler
Top achievements
Rank 1
 answered on 20 Sep 2010
4 answers
193 views
I am binding my chart to a DataTable.  Using the following code in the chart's constructor to display two bar series works:

SeriesMapping histCostSeriesMapping = new SeriesMapping { LegendLabel = "Historic Cost", SeriesDefinition = new BarSeriesDefinition()};
histCostSeriesMapping.ItemMappings.Add(new ItemMapping("YEAR", DataPointMember.XCategory));
histCostSeriesMapping.ItemMappings.Add(new ItemMapping("HISTCOST", DataPointMember.YValue));
chart.SeriesMappings.Add(histCostSeriesMapping);
  
SeriesMapping replCostSeriesMapping = new SeriesMapping { LegendLabel = "Replacement Cost", SeriesDefinition = new BarSeriesDefinition()};
replCostSeriesMapping.ItemMappings.Add(new ItemMapping("YEAR", DataPointMember.XCategory));
replCostSeriesMapping.ItemMappings.Add(new ItemMapping("REPLCOST", DataPointMember.YValue));
chart.SeriesMappings.Add(replCostSeriesMapping);

chart.ItemsSource = _model.Data;


However, if I replace both instances of DataPointMember.XCategory with DataPointMember.XValue, I get the following error:

InvalidOperationException - The binary operator GreaterThanOrEqual is not defined for the types 'System.Object' and 'System.Double'.

Also if I use just one series on the chart (with DataPointMember.XValue), it works fine. 
Eric
Top achievements
Rank 1
 answered on 20 Sep 2010
2 answers
103 views
I have a business requirement to render on a map control the same data that is displayed in a GridView control.  For example, if the grid is loaded with all of the companies locations in North America, display those locations on the map.  That part is simple.  Where I have a problem is if the user filters the grid to show only US locations, they want the map to show only those locations. 

I can see that the RadGridView.Items class has a private property of CollectionView that contains the collection of the filtered items. if this collectionview were a read-only property I could just use if for my map object.

I would think that reusing the filtered data from a grid for other purposes would not be an entirely rare requirement.

Is there another way to do this that I am missing?

Thanks in advance for any assistance.
Dan
Top achievements
Rank 1
 answered on 20 Sep 2010
1 answer
75 views
Hi,
I have some data with a big interval, for example maximum of my data is 15,962,940,000.00 and my minimum data is 185,400.00, and my other data is between this 2 data.
When I use pie chart for showing that I am getting  Value was either too large or too small for an Int32. error.
this is a part of my stack trace :
at System.Convert.ToInt32(Double value)
   at Telerik.Windows.Controls.Charting.AxisRange.get_ActualIntervalCount()
   at Telerik.Windows.Controls.Charting.AxisX.BuildAxisData()
   at Telerik.Windows.Controls.Charting.Axis.UpdateAxis()
   at Telerik.Windows.Controls.Charting.Axis.ChartAreaDataChanged(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Telerik.Windows.Controls.Charting.ChartArea.OnDataChanged()
   at Telerik.Windows.Controls.Charting.ChartArea.UpdateChart()
   at Telerik.Windows.Controls.Charting.ChartArea.OnDataSeriesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Controls.Charting.RadHierarchicalObservableCollection`1.InsertItem(Int32 index, T item)


can you help me to solve this error.

best regards
A.Mahdavi
Giuseppe
Telerik team
 answered on 20 Sep 2010
3 answers
141 views
Hello,

I downloaded Telerik for asp in september 2007. It was buggy and I finally turn to DevExpress (buggy but better, to my opinion).

Today, I downloaded DevExpress but was not impressed with it (I haven't found the up-down in the demo). I then downloaded Telerik for WPF. Mainly to look at the up-down. Not a big control that is hard to design but to save time and have an idea on what worth Telerik. I downloaded the trial, installed and 5 minutes after accessing the web site and try the demo of it, I found a bug in the control I need. WOW !!!
I tried to report the bug but I can't. It says many sentenses that I can't figure out in wich case I have exactly but I can't report a bug. I didn't buy it and I already downloaded something 3 years ago (is that for that reason ???). Anybody should be able to report a bug. A company that really want to improve their product would beneficiate from the greatest amount of feedbacks.

The bug is that if you click on the left of a previous entry (say you click before 1 in an entry of 12 345.67) you can "Del" delete the "1" but can't delete more. If you modifiy the text, then the delete works fine...
But they don't want to hear about it from me. They blocked me to report it. The first control I tried was buggy and I found the bug in 30 seconds of try. WPF is not new anymore. I don't really want to continue. I just don't trust them at all. Plus, they don't care of what I have found, they don't want to know they have bugs. Probably they also want to hide them to futur buyer (i did'nt try to look for the knowledge base but I suppose it is also inaccessible).

For me its clear, Telerik is not an option.
Eric Ouellet
Konstantina
Telerik team
 answered on 20 Sep 2010
2 answers
135 views
Hi,
i dont know how to achive mine problem, i got a GridView with two checkboxes Yes and No, when user click Yes, No should be Unchecked and when user clicks No, than Yes should be unchecked.

<telerik:RadGridView Name="listGridView" IsSynchronizedWithCurrentItem="True" AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Tak" Width="40" IsReadOnly="True">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding CheckYes, Mode=TwoWay}" HorizontalAlignment="Center"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Nie" Width="40" IsReadOnly="True">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding CheckNo, Mode=TwoWay}" HorizontalAlignment="Center"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Nazwa" Width="*" UniqueName="Description" IsReadOnly="True"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

Also i need to save current row to database when something is clicked (Yes or No, cos default is none) so i need to fire an event.

Last question is how can i select current row on checkbox click ?
Zbigniew Kozłowski
Top achievements
Rank 1
 answered on 20 Sep 2010
2 answers
79 views
When the user presses enter the selection of the radgridview goes to the next row. I don't want this behaviour. Is there a way to prevent this as there is no SelectionChanging event on the radgridview yet?
Davy Tavernier
Top achievements
Rank 1
 answered on 20 Sep 2010
3 answers
120 views

I have two treeviews, the "A" is an inventory of stuff, and "B" is a "shopping list". In "A" I don't want any changes and no drop is allowed.

Problems:

1. On "A"  treeview I don't want any drop at all so I have IsDropAllowed=False on each RadTreeViewItem, but still I can drop between two items, I don't want that, what to do?

2. When I drag from "A" to "B" the item removes on "A" treeview, I don't want items removed on my "stuff list". 

3. When drop on "B" treeview I can drop between RadTreeViewItems, I only want to drop on specific Items. How to solv that?

My code is based on Telerik "DragDrop.Example", so no drag-drop code in C#, only WPF. But code is OK for this solution.

Thanks!
Daniel Munnings
Top achievements
Rank 1
 answered on 20 Sep 2010
2 answers
97 views
I have a RadChart which receives data in a fairly ordered fashion (the data points are not guarenteed to be ordered, but almost always are). However, charts seem to have their data ordered bizarrely (I'm basically trying to sort by the XCategory). If I apply an ascending sort descriptor to the chart, there is no effect; descending does indeed "go in reverse" but the data still isn't actually sorted. For horizontal bar charts this results in shuffled data, but for line charts, it results in tens of lines darting horizontally back and forth. The sort descriptors are added to both RadChart.SortDescriptors and SeriesMapping.SortDescriptors. A grouping is in effect, but not by XCategory.

Is this a common pitfall? Is something obvious missing?
Adam Petaccia
Top achievements
Rank 1
 answered on 17 Sep 2010
4 answers
124 views
I have a RadCarousel (not RadCarouselPanel) which is sometimes updated from an external source, or via the mouse, etc. What I need to be able to do is be notified that RadCarousel (or its panel) is changing which items are in view, and discover them so that the rest of the UI may update its state accordingly.

What events would I need to bind to in order to accomplish this?
Adam Petaccia
Top achievements
Rank 1
 answered on 17 Sep 2010
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
ProgressBar
Sparkline
LayoutControl
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
Rating
Accessibility
Callout
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?