Telerik Forums
UI for WPF Forum
1 answer
95 views

Hi All,

I need some help to modify "Horizontal Bar" chart created using Portlet Factory. I have following problem in my chart

  1. When data is very low like 1 or 2, horizontal scale doesn't appear properly. It come like 0 0 0 1 1 1 1 1 2 2 2. As data increase it shows scale properly like(more then 3) 0 1 2 3.
  2. If any Option doesn't have any data(empty), still it shows blank space for that option.  

For your reference I have attached one image file with this post.

 
Please help me to resolve this.

Thanks in advance...

regards
Vikas

Evgenia
Telerik team
 answered on 20 Sep 2010
0 answers
53 views


Hello Telerik,
I am developing a customcontrol for radbutton .


I have a requirement to change the image of the radbutton to different image on 'Hover' operation.

public

 

 

class TngButton : TngBaseTemplateControl

 

 

 

 

{

 


 

 

static TngButton()

 

{

DefaultStyleKeyProperty.OverrideMetadata(

 

 

 

 

typeof(TngButton), new FrameworkPropertyMetadata(typeof(TngButton)));

 

}

 

 

 

#endregion

 

 

public override void OnApplyTemplate()

 

{

 

 

 

 

 

base.OnApplyTemplate();

 

 

 

 

 

 

RadButton btn = this.Template.FindName("PART_BaseControl", this) as RadButton;

 

 

 

 

 

 

ContentPresenter content = this.Template.FindName("PART_ContentControl", this) as ContentPresenter;

 

 

 

 

 

 

btn.Hover+=new EventHandler<Telerik.Windows.RadRoutedEventArgs>(btn_Hover);

 

 

}

 

 

 

 

 

 

void btn_Hover(object sender, EventArgs e)

 

{

 

 

 

 

 

 

// code to change the image at the hover .

 

 

 

 

 

 

 

}


i want to have two properties like 'originalimage' and 'hoverimage" which can be changed on mover hover action
can you help me in how to setting the logic for this ?

regards,
Srinivas

 

 

 

Srinivas
Top achievements
Rank 1
 asked on 20 Sep 2010
0 answers
29 views


Hello Telerik,
I am developing a customcontrol for radbutton .


I have a requirement to change the image of the radbutton to different image on 'Hover' operation.

public

 

 

class TngButton : TngBaseTemplateControl

 

 

{

 


 

 

static TngButton()

 

{

DefaultStyleKeyProperty.OverrideMetadata(

 

 

typeof(TngButton), new FrameworkPropertyMetadata(typeof(TngButton)));

 

}

 

#endregion

 

 

public override void OnApplyTemplate()

 

{

 

 

 

base.OnApplyTemplate();

 

 

 

 

RadButton btn = this.Template.FindName("PART_BaseControl", this) as RadButton;

 

 

 

 

ContentPresenter content = this.Template.FindName("PART_ContentControl", this) as ContentPresenter;

 

 

 

 

btn.Hover+=new EventHandler<Telerik.Windows.RadRoutedEventArgs>(btn_Hover);

 

 

}

 

 

 

 

void btn_Hover(object sender, EventArgs e)

 

{

 

 

 

 

// code to change the image at the hover .

 

 

 

 

 

}


i want to have two properties like 'originalimage' and 'hoverimage" which can be changed on mover hover action
can you help me in how to setting the logic for this ?

regards,
Srinivas

 

Srinivas
Top achievements
Rank 1
 asked on 20 Sep 2010
0 answers
109 views


Hello Telerik,
I am developing a customcontrol for radbutton .


I have a requirement to change the image of the radbutton to different image on 'Hover' operation.

public

 

 

class TngButton : TngBaseTemplateControl

 

{

 


 

 

static TngButton()

 

{

DefaultStyleKeyProperty.OverrideMetadata(

 

typeof(TngButton), new FrameworkPropertyMetadata(typeof(TngButton)));

 

}

#endregion

 

 

public override void OnApplyTemplate()

 

{

 

 

base.OnApplyTemplate();

 

 

 

RadButton btn = this.Template.FindName("PART_BaseControl", this) as RadButton;

 

 

 

ContentPresenter content = this.Template.FindName("PART_ContentControl", this) as ContentPresenter;

 

 

 

btn.Hover+=new EventHandler<Telerik.Windows.RadRoutedEventArgs>(btn_Hover);

 

 

}

 

 

 

void btn_Hover(object sender, EventArgs e)

 

{

 

 

 

// code to change the image at the hover .

 

 

 

 

}


i want to have two properties like 'originalimage' and 'hoverimage" which can be changed on mover hover action
can you help me in how to setting the logic for this ?

regards,
Srinivas

Srinivas
Top achievements
Rank 1
 asked on 20 Sep 2010
6 answers
165 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
190 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
96 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
74 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
126 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
122 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
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rating
SplashScreen
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?