Telerik Forums
UI for WPF Forum
6 answers
111 views
Hello!

I have problem with RadGridView grouping.

<telerikGrid:RadGridView x:Name="InmattVolymGridView" Language="sv-SE" AutoGenerateColumns="False"         
                                         ShowColumnFooters="True"
                                         VerticalAlignment="Top"
                                         ItemsSource="{Binding InmattaVolymer, ValidatesOnDataErrors=True, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                         Validation.ErrorTemplate="{DynamicResource validationTemplate}"
                                         ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" >
                   
                    <telerikGrid:RadGridView.Columns>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Sortiment}" Header="Sortiment" Width="85"/>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding InmattM3F}" Header="m3f Inmätt" Width="100" >
                            <telerikGrid:GridViewDataColumn.AggregateFunctions>
                                <telerikData:SumFunction SourceField="InmattM3F" />
                            </telerikGrid:GridViewDataColumn.AggregateFunctions>
                        </telerikGrid:GridViewDataColumn>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding SortimentTyp}" Header="Sortimenttyp" Width="85"/>
                    </telerikGrid:RadGridView.Columns>
                    <telerikGrid:RadGridView.GroupDescriptors>
                        <telerikData:GroupDescriptor SortDirection="Ascending" Member="SortimentTyp">
                            <telerikData:GroupDescriptor.AggregateFunctions>
                                <telerikData:CountFunction Caption="Total volym:" />
                            </telerikData:GroupDescriptor.AggregateFunctions>
                        </telerikData:GroupDescriptor>
                    </telerikGrid:RadGridView.GroupDescriptors>
                 </telerikGrid:RadGridView>

I get 'Invalid Property or Field' on Member in GroupDescription. How should I connect the grouping to the column.

Best regards / Anna
Rudis
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
131 views
Two questions into one....

1: Can I customize the style of the scrollbars when using the scrolling/zooming features
2: Can I make it so that the width of the bars are fixed?

I'm trying to make a chart where there are a larger number elements that can be scrolled through (keeping the Y-Axis fixed).

Thanks!

Sia
Telerik team
 answered on 14 Apr 2010
2 answers
431 views
Hi,

I'm trying to bind the background of a GridViewDataColumn to a property in my ViewModel:
<radGrid:GridViewDataColumn Header="State" Width="090" Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" DataMemberBinding="{Binding Path=State}"/> 

Based on the value of the State property the background should change: if State = new, the background should be green, if State = rejected the value should be red, and so on.
However, if I bind the State property to the Background, i get a BindingExpression path error stating that my State property is not found on my object, while the same databinding works fine on the DataMemberBinding.
Anyone got a clue what is wrong here?

The Xaml:
<radGrid:RadGridView ItemsSource="{Binding Orders}" > 
     <radGrid:RadGridView.Columns> 
          <radGrid:GridViewDataColumn Header="State" Width="090" 
                                     
Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" 
                                     
DataMemberBinding="{Binding Path=State}"/>  
     </radGrid:RadGridView.Columns> 
</radGrid:RadGridView> 

and the code from the viewModel:
private ObservableCollection<SingleOrder> _orders = new ObservableCollection<SingleOrder>()  
public ObservableCollection<SingleOrder> Orders { get { return _orders; } }  
 
public class SingleOrder   
        : ViewModelBase  
{  
        private Instrument _instrument;  
        public Instrument Instrument  
        {  
            get { return _instrument; }  
            set 
            {  
                if (!Instrument.Equals(_instrument, value))  
                {  
                    _instrument = value;  
                    this.OnPropertyChanged("Instrument");  
                }  
            }  
        }  
 
        private System.String _state;  
        public System.String State  
        {  
            get { return _state; }  
            set 
            {  
                if (!String.Equals(_state, value))  
                {  
                    _state = value;  
                    this.OnPropertyChanged("State");  
 
                }  
            }  
        }  
}  
 

Thanks a lot!

Hans
Hans Smit
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
427 views
Not a question this time. I just thought I might post this in case it is of help to others playing with the RadMap.
 
This is how to add images to the radmap map with a bit more control over the image than is available by simply adding a bitmap using the pinpoint method.

        // Set provider
                BingMapProvider provider = new BingMapProvider(MapMode.Aerial, true, "YOUR CODE GOES HERE");
                provider.IsTileCachingEnabled = true;
                mWindow.radmap.Provider = provider;

        // Create information layer
                iLayer = new InformationLayer();
                iLayer.MapControl = mWindow.radmap;
                mWindow.radmap.Items.Add(iLayer);

        // Create a new image object and add it to bing map.
                Uri uri = new Uri(@"" + imageName, UriKind.Relative);

                BitmapImage bitmap = new BitmapImage();
                bitmap.BeginInit();
                bitmap.UriSource = uri;
                bitmap.EndInit();

                Image image = new Image();
                image.Source = bitmap;
                image.Opacity = 0.85;
                image.Width = imageWidth;
                image.Height = imageHeight;
                image.Stretch = Stretch.UniformToFill;
                image.SnapsToDevicePixels = true;
                image.Name = Name;

        // When added to map, centre image over Lat/Long rather than use upper left corner for placement
                image.VerticalAlignment = VerticalAlignment.Center;
                image.HorizontalAlignment = HorizontalAlignment.Center;

        // Add the image to the map
                MapLayer.SetLocation(image, new Location(dLatitude, dLongitude));
                iLayer.Items.Add(image);

Andrey
Telerik team
 answered on 14 Apr 2010
1 answer
111 views

Hello!

I’m working with your Chart, and I found it working incorrectly.

<QuickStart:ExampleControl x:Class="Telerik.Windows.Examples.Chart.WPF.TwoDimensional.Bar.Example"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:QuickStart="clr-namespace:Telerik.Windows.QuickStart;assembly=Telerik.Windows.QuickStart"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>     
        <telerik:RadChart x:Name="RadChart1"/>
    </Grid>
</QuickStart:ExampleControl>

As a result I expect to see a Chart of 0x0 size, but instead it’s 800x600.
I do not understand where this size comes from, because it’s not written anywhere.
How can I solve that problem?
The matter is crucial for me, since in my application I need to implement the floating layout.
Thank you very much.

RadarSoft

Velin
Telerik team
 answered on 14 Apr 2010
1 answer
107 views
Out of the blue, I have started getting an assembly error when i try to debug my application. I am utilizing RadControls for WPF Q1 2010 in VS 2008:

Error   1   Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Line '1' Position '491'.   C:\Documents and Settings\akedzier\My Documents\Visual Studio 2008\Projects\CCMB_WPF\WpfApplication1\panels\Panel_04.xaml   12   13   CCBM_Wpf

Here is the code it tags as problematic. It is almost verbatim from the Telerik example:
            <ControlTemplate x:Key="NewGaugeBackground"  TargetType="{x:Type ContentControl}"
                <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="20"/> 
                        <ColumnDefinition Width="*"/> 
                        <ColumnDefinition Width="20"/> 
                    </Grid.ColumnDefinitions> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="20"/> 
                        <RowDefinition Height="*"/> 
                        <RowDefinition Height="20"/> 
                    </Grid.RowDefinitions> 
                    <Ellipse Stretch="Fill" Grid.ColumnSpan="3" Grid.RowSpan="3"
                        <Ellipse.Fill> 
                            <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> 
                        </Ellipse.Fill> 
                        <Ellipse.BitmapEffect> 
                            <BevelBitmapEffect BevelWidth="20" 
                                EdgeProfile="BulgedUp" 
                                Relief="0.5" 
                                Smoothness="0.3" /> 
                        </Ellipse.BitmapEffect> 
                    </Ellipse> 
                    <Ellipse Grid.Row="1" Grid.Column="1" Stretch="Fill" Fill="White" /> 
                    <Ellipse Grid.Row="1" Grid.Column="1" Height="48" Width="48"
                        <Ellipse.Fill> 
                            <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> 
                        </Ellipse.Fill> 
                        <Ellipse.BitmapEffect> 
                            <BevelBitmapEffect BevelWidth="5" 
                                EdgeProfile="BulgedUp" 
                                Relief="0.5" 
                                Smoothness="0.3" /> 
                        </Ellipse.BitmapEffect> 
                    </Ellipse> 
                </Grid> 
            </ControlTemplate> 

This has compiled and run just fine previously. Not sure what changed to cause the error.


Andrey
Telerik team
 answered on 14 Apr 2010
1 answer
147 views
        I have seen the instruction about Map and know it supports Bing's map.  Now I wanna know if it supports Google's map.  If the answer is YES, how to do it?
Nikolay
Telerik team
 answered on 14 Apr 2010
3 answers
117 views
Hi,

The call to RadWindow.Alert("msg") crashes on Window XP PRO while it's working on Windows Seven boxes

We are using this telerik package RadControls_for_WPF_2010_1_0309_DEV.msi

Please find below the error stack we have during the crash 

{"La valeur '/Telerik.Windows.Controls.Navigation;component/Themes/GenericVista.xaml' ne peut pas ĂŞtre attribuĂ©e Ă  la propriĂ©tĂ© 'Source' de l'objet 'System.Windows.ResourceDictionary'. La valeur '/Telerik.Windows.Controls.Navigation;component/themes/vista/CarouselDataFieldPresenter.xaml' ne peut pas ĂŞtre attribuĂ©e Ă  la propriĂ©tĂ© 'Source' de l'objet 'System.Windows.ResourceDictionary'. La rĂ©fĂ©rence d'objet n'est pas dĂ©finie Ă  une instance d'un objet.  Erreur Ă  l'objet 'System.Windows.ResourceDictionary' dans le fichier de balisage 'Telerik.Windows.Controls.Navigation;component/Themes/GenericVista.xaml'.  Erreur Ă  l'objet 'System.Windows.ResourceDictionary'."} 


Thank you for your support.

Best Regards.

Luciano





Boyan
Telerik team
 answered on 14 Apr 2010
1 answer
144 views
I have a RadToolBar with some buttons.
Some of them are navigationbuttons which I want to Enable/Disable from codebehind:

<Button x:Name="btnFirst" Command="{Binding FirstCommand}" IsEnabled="{Binding IsLeftEnabled}" Width="26">
                <Image Width="16" Height="16" Source="/Star3;component/Images/16/navigate_beginning.png"/>     
</Button>     

It works not 100%: I had expected a gray image when disabled.
But the image just disappeares.
And it won't come back when enabled again...     

Marinus
Vladislav
Telerik team
 answered on 14 Apr 2010
3 answers
204 views
Hi,

Is there a way to export only the specified columns to excel. If not ;
<telerik:GridViewDataColumn IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" Header="Adet" Width="125"
                        <telerik:GridViewDataColumn.CellTemplate> 
                            <DataTemplate> 
                                <StackPanel Orientation="Horizontal"
                                    <TextBlock Text="{Binding ItemAmount}" FontWeight="Bold"/> 
                                    <TextBlock Text=" yerine "/> 
                                    <TextBlock Text="{Binding ArrivedAmount}" FontWeight="Bold"/> 
                                </StackPanel> 
                            </DataTemplate> 
                        </telerik:GridViewDataColumn.CellTemplate> 
                         
                    </telerik:GridViewDataColumn> 

As you see at the code above i am using e cell template at the grid column. While exporting it does not export the data inside the cell template. Is the a way to solve this.

Regards.
Vlad
Telerik team
 answered on 14 Apr 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?