Telerik Forums
UI for WPF Forum
1 answer
223 views
Hi,

I need to programmatically update the sort order for a gridview, for example if I have a list of orders from different companies, in different countries for different amounts, and the user clicks on the country column to sort, I want to add the company and value columns to the sort so that within each country the orders are sorted by company, and within a company the orders are sorted by amount.

I have tried to add these as SortDescriptors in the 'Sorting' event but I cannot get the sort to use the newly added descriptors.

What technique should I be using?

Thanks,
Yavor Georgiev
Telerik team
 answered on 23 Nov 2010
2 answers
112 views
Hello,
I am evaluating Your controls and I would need the interactivity feature for charts, but I can't get it to work.
I am using WPF 4, but nothing. I tried to use the same code in a Silverlight project and there it works perfectly.
You can find my sample project with the WPF and Silverlight application under the following link:
http://www.sendspace.com/file/ap73ki

Could You please tell me what I'm doing wrong?

The only difference I noted was the different Version of the "Telerik.Windows.Controls.Charting".
WPF: 2010.2.924.35
Silverlight: 2010.2.924.1040

Regards
Gernot
Top achievements
Rank 1
 answered on 23 Nov 2010
3 answers
54 views
Hi,

I am trying to do some Geocoding using the BingSearchProvider.  I have been adding british postcodes and there are some that it doesn't like, which causes a crash that I cannot handle

For example, try

B21 0AG

in your Search Demo

If I add 

B21 0AG, Birmingham

then we just get back a Geocoded location for Birmingham as a whole. It works with similar postcodes, for example

B64 6HN
Andrey
Telerik team
 answered on 23 Nov 2010
1 answer
98 views
I am plotting a line graph with a set of test data of only 5 data points and it takes visibly long time to plot the line. Is it some kind of animated behavior that is responsible for this or I am missing something? Please help me on how I can get the line plotted in just one shot - with no visible delay between its start and end ...

The code is as follws:

The data structure that is set to the itemsource of  RadChart control is

private ObservableCollection<KeyValuePair<int, Double>> _datapoints;

The chart is initialised as below:
radchart.DefaultView.ChartArea.AxisX.AutoRange = false;
radchart.DefaultView.ChartArea.AxisX.AddRange(-100, 100, 50);
radchart.DefaultView.ChartArea.AxisX.MajorGridLinesVisibility = Visibility.Visible;
radchart.DefaultView.ChartArea.AxisY.AutoRange = false;
radchart.DefaultView.ChartArea.AxisY.AddRange(-100, 100, 50);
radchart.DefaultView.ChartArea.AxisY.MajorGridLinesVisibility = Visibility.Visible;
SeriesMapping sm = new SeriesMapping();
sm.SeriesDefinition = new LineSeriesDefinition();
sm.SeriesDefinition.ShowItemLabels = false;
sm.ItemMappings.Add(new ItemMapping("Key", DataPointMember.XValue));
sm.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue));
radchart.SeriesMappings.Add(sm);
radchart.ItemsSource = _datapoints;

_datapoints.Add(

new KeyValuePair<int, double>(1, 10.0));

 

_datapoints.Add(

new KeyValuePair<int, double>(50, 20.9));

 

_datapoints.Add(

new KeyValuePair<int, double>(80, 80.1));

 

_datapoints.Add(

new KeyValuePair<int, double>(100, 34.8));

 



I have a button to trigger refresh on the control, who handler is as follows:

private void Refresh_Click(object sender, RoutedEventArgs e)
{           
    _datapoints[0] = new KeyValuePair<int, double>(1, Rnd.Next(-100, 100) *   Rnd.NextDouble());
    _datapoints[1] = new KeyValuePair<int, double>(50, Rnd.Next(-100, 100) * Rnd.NextDouble());
    _datapoints[2] = new KeyValuePair<int, double>(80, Rnd.Next(-100, 100) * Rnd.NextDouble());
    _datapoints[3] = new KeyValuePair<int, double>(100, Rnd.Next(-100, 100) * Rnd.NextDouble());
}

Evgeni "Zammy" Petrov
Telerik team
 answered on 23 Nov 2010
1 answer
87 views
Hi,

I would like to set a default error handling method for all of my DatePicker controls in my application. This "default error handling method" is to set the last valid value on focus lost, if the actual value cannot be parsed. This way, I would like to avoid mistyping problems.

For example if the current value is "2010-11-17" and the user types "aaa", I would like to reset the value back to "2010-11-17" on focus lost instead of clearing the value of the control.

My first idea was to set this behavior in App.xaml as part of the default style of DatePicker (by triggers). Is it possible to achieve my goal this way? Could someone please help me with an example on how to do this? If my idea is wrong, could somebody tell me how this task can be solved?
(The application is using the MVVM pattern.)


Thank you for the answer in advance,
                                                             G. M.
George
Telerik team
 answered on 23 Nov 2010
5 answers
79 views
I am displaying a large amount of timestamped data on a WPF RadGridView that has two levels of grouping.
The two indexed fields used for grouping refer to two other classes of object.
I have a value convertor that allows me to display the name field of the group object on the group header
That works very well.

I now have two needs:

1. What I would really like is that when a group header is selected a 'GroupDetail' section would expand
in the same fashion as a RowDetail so that I can display the fields of the grouping object.

2. Within my data I have some rows that are blank except for the time and an index to an event object 

DataTable

time       event   data_0 ... data_n

t0             0           x0             xn

t1             0           y0            yn

t2             e1        nul           nul

t3             0           z0            zn

The event class has different subclasses, They all have a string field but may have different sets of data fields.

I would like to be able to display each event object as a row displaying its string field on a single wide cell, like a group header without the expander.  The RowDetails for that row could then ask the event object to display its particular fields.

Thanks

Rossen Hristov
Telerik team
 answered on 23 Nov 2010
1 answer
167 views
Hello,

ASFIK there is no zoom shortcut in RadScheduleView. As slider seems to be not best solution, I'm trying to implement zoom on CTRL+MouseWheel. But RadScheduleView.MouseWheel event is never invoked.

I've done some research and found the following event handler in ScheduleViewBase

protected override void OnMouseWheel(MouseWheelEventArgs e)
{
    e.Handled = true;
    double newDelta = SystemParameters.WheelScrollLines * this.VerticalSmallChange;
    if (e.Delta > 0)
    {
        newDelta = -newDelta;
    }
    double offset = Math.Min(this.ExtentHeight, Math.Max((double) 0.0, (double) (this.VerticalOffset + newDelta)));
    this.VerticalOffset = offset;
    base.OnMouseWheel(e);
}

MouseWheel event is always handled by control itself.

Is it possible to expose it as done in RadScheduler?

Thanks,
Anatoly
Hristo
Telerik team
 answered on 23 Nov 2010
0 answers
197 views
Hello,

I have a need to refresh data in a nested grid and keep any expanded rows, sorting or filtering.

I am using a nested RadGridView.  I would like to hold onto the explanded rows state, filter state and sort state of the master and detail grids.

I have been somewhat successful, however I cannot find the correct way to re-apply the expanded items and the detail filters/sorting.

I have tried RadGridView1.ItemContainerGenerator.ContainerFromItem but it always comes back empty.  However, the items are populated.

How do I programatically set the row.Isexpanded property using the Items bound to the Itemssource?

How do I re-apply any sorting or filtering to children grids?

Thank you,
Rick
Rick Knicely
Top achievements
Rank 1
 asked on 22 Nov 2010
6 answers
299 views
Hi,

Is it possible to have the aggregate function's source field pointed to a Path?
My data source is generated dynamically so I'm trying to use the Path approach like in DataMemberBinding.

Thanks.


<
telerik:GridViewDataColumn Header="Field 1" Width="120" 
      DataMemberBinding="{Binding Mode=TwoWay, Path=Columns[1]}" DataFormatString="{}{0:N2}" >
    <telerik:GridViewDataColumn.AggregateFunctions>
       <telerik:SumFunction Caption="Sum: " SourceField="{Path=Columns[1]}" ResultFormatString="{}{0:N2}"/>
    </telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
Miguel Peixoto
Top achievements
Rank 1
 answered on 22 Nov 2010
5 answers
473 views
Hello

I try to use the RadPanelBar with a Binding as ItemSource, but get an unexpected result. Without binding I would use it like this:
<telerik:RadPanelBar> 
    <telerik:RadPanelBarItem> 
        <telerik:RadPanelBarItem.Header> 
            <Label Content="Header 1"/> 
        </telerik:RadPanelBarItem.Header> 
        <Label Content="Content 1"/> 
    </telerik:RadPanelBarItem> 
</telerik:RadPanelBar> 

That is no problem and looks exactly as expected. But as soon as I use it like this:
<telerik:RadPanelBar Name="AttributeSetPanelBar" ItemsSource="{Binding}"
    <telerik:RadPanelBar.Resources> 
        <DataTemplate DataType="{x:Type wrp:AttributeSet}"
            <telerik:RadPanelBarItem> 
                <telerik:RadPanelBarItem.Header> 
                    <Label Content="{Binding Name}"/> 
                </telerik:RadPanelBarItem.Header> 
                <Label Content="Content"/> 
            </telerik:RadPanelBarItem> 
        </DataTemplate> 
    </telerik:RadPanelBar.Resources> 
</telerik:RadPanelBar> 
and set it's DataContext to a List of objects (in this case AttributeSet), it changes its behaviour! Now the header includes the whole content, and the content itself (the secont Label) is also displayd as Header.
Am I doing something wrong, or is this a bug?

Regards
Simon
Tina Stancheva
Telerik team
 answered on 22 Nov 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?