Telerik Forums
UI for WPF Forum
10 answers
282 views
I'm trying to get the RadGridView for WPF to work in our software, and I was wondering if it is possible to show the Item count of a group in the group header without using predefined GroupDescriptions and preferably a XAML-only solution.

So far, all the examples on AggregateFunctions I have found, either have predefined GroupDescriptions in XAML or set the AggregateFunction programmatically using a hardcoded GroupDescription.

Edit:

I managed to fake the desired functionality by using the GroupDescriptions.CollectionChanged event:

 
private void GroupDescriptions_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)  
    {  
      if (recordings.GroupDescriptions.Count > 0)  
      {  
        foreach (RadGroupDescription rgd in recordings.GroupDescriptions)  
        {  
          CountFunction cf = new CountFunction(rgd.PropertyName, rgd.PropertyName, "");  
          rgd.AggregateFunctions.Add(cf);  
        }  
      }  
    } 

Strangely, the e.Action is never Add when dragging a column to the GroupPanel, so I had to do it this way.

 

 

Vlad
Telerik team
 answered on 16 Jul 2009
3 answers
148 views
Upgraded to 2009.2.701.35 and now it does not use the value in the HeaderText field.

This displays "Data.FirstName" as the column header instead of "First Name"
                        <telerik:GridViewDataColumn  
                            HeaderText="First Name"  
                            IsCustomSortingEnabled="False"  
                            IsFilterable="False"  
                            DataMemberPath="Data.FirstName" /> 


This displays "Default" as the column header instead of "Default Value"
                    <telerik:GridViewDataColumn  
                        HeaderText="Default Value"  
                        UniqueName="Default" 
                        IsSortable="True"> 
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 

Vlad
Telerik team
 answered on 16 Jul 2009
1 answer
98 views
Hi, i have a problem with a GridView, Is possible add events to gridView's childs? or how do I access to Childs?, I need the event Mouse_DoubleClick for the child


Regards!!!!
Vlad
Telerik team
 answered on 16 Jul 2009
1 answer
149 views
Hi,

I have a Button named photo and label named Signature on the form. and one submit button. When user clicks photo button or click on the label, some operation take place. When user clicks submit, operations related to Photo button and signatures label submits to the database. But if the user doesn't click photo Button or label, no DB is updated.

I want to know is there any way , I can force user to click the button or label . These are WPF controls.

Thanks,

Veena
Hristo Borisov
Telerik team
 answered on 15 Jul 2009
1 answer
123 views
I'm trying to change the date format of the RadDatePicker to display only "dd/MM".  I followed the example here but it doesn't seem to work - I've put the code in the Loaded event if that's any help.

Also, if there's any way to declare this in XAML it'd be a much neater solution.
Kaloyan
Telerik team
 answered on 15 Jul 2009
5 answers
221 views
Hi.

I do not know WPF (yet) and I haven't tried the controls, but from the demos it seems that the customization options for the controls is largely about color, linestyle and gradients.

I am looking for a WPF set which gives options to customize all visuals. Some customers may want click-handling on the chart legends, some want visuals like engineering units on top of the graph, some like it under, some would like it as tooltip. Some would like the various curves to be possible to enable/disable. Some would like to highlight a set of curves. Some would like other metadata to be drawn onto the graph backdrop. Some present a jpg from mspaint and state that they want it "exactly like that".

How customizeable are the WPF radcontrols from Telerik? Are their visuals fully expressed in XAML that I can edit so that I for example easily can remove/add a stackpanel with dimmed curve legends within the graph? 

That kind of stuff.

The screen real estate is very important, so it is important that, if I choose to not use the axis, title, legends, border etc, that they collapses and do not take up space. ie, That it can be stripped down to operate pretty much "fullscreen" within another wpf control container.
Giuseppe
Telerik team
 answered on 15 Jul 2009
1 answer
122 views
i am developping a project and i used rad scheduler control from release Q3 sp1 and now i need to use Rad masked text box which is contained in the new release (2009)  
i customized the scheduler and i want it to work using the old version, so can i use both versions  ,each for the control i wish or no ??
and if possible how can i do it ??
Boyan
Telerik team
 answered on 15 Jul 2009
3 answers
248 views

Hi

I've done quite a lot of WinForm stuff but I'm juist getting into WPF.

I have been experimenting with the simple thermometer demonstration on your website at:
http://www.telerik.com/help/wpf/linear-gauge-create-thermometer.html

And I'm getting the following error:

"The type reference cannot find a public type named 'MajorTickProperties'."

on:

<Style x:Key="ScaleMajorTick" TargetType="{x:Type telerik:MajorTickProperties}">
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm guessing it's a reference/namespace issue but I'm referencing Telerik.Windows.Controls and Telerik.Windows.Controls.Gauge.

And I'm including xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" in the Window declaration.

<Window x:Class="Thermometer.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    Title="MainWindow" Height="400" Width="400">

The rest of the code is here:

<Window x:Class="Thermometer.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    Title="MainWindow" Height="400" Width="400">
   
    <Window.Resources>
        <Style x:Key="CommonScaleStyle" TargetType="{x:Type telerik:LinearScale}">
            <Setter Property="Top" Value="0.05" />
            <Setter Property="StartWidth" Value="0.05" />
            <Setter Property="EndWidth" Value="0.05" />
            <Setter Property="MiddleTicks" Value="1" />
            <Setter Property="MinorTicks" Value="5" />
            <Setter Property="BorderBrush" Value="Transparent" />
        </Style>
        <Style x:Key="ScaleMajorTick" TargetType="{x:Type telerik:MajorTickProperties}">
            <Setter Property="Length" Value="0.03" />
            <Setter Property="TickWidth" Value="0.2" />
        </Style>
        <Style x:Key="ScaleMinorTick" TargetType="{x:Type telerik:MajorTickProperties}">
            <Setter Property="Length" Value="0.02" />
            <Setter Property="TickWidth" Value="0.15" />
        </Style>
        <Style x:Key="ScaleLabel" TargetType="{x:Type telerik:MajorLabelProperties}">
            <Setter Property="Offset" Value="0.03" />
        </Style>
        <Style x:Key="ThermometerBarStyle" TargetType="{x:Type telerik:LinearBar}">
            <Setter Property="StrokeThickness" Value="0" />
            <Setter Property="IsAnimated" Value="True" />
            <Setter Property="EmptyFill" Value="Transparent" />
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="-0.0263883,0.499995" EndPoint="1.01428,0.499995">
                        <GradientStop Color="#FFFEFFFE" Offset="0"/>
                        <GradientStop Color="#FFFEFFFE" Offset="0.5"/>
                        <GradientStop Color="#FFD8DADB" Offset="0.501"/>
                        <GradientStop Color="#FFB2B5B7" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="StartWidth" Value="0.013"/>
            <Setter Property="EndWidth" Value="0.013"/>
        </Style>
        <DataTemplate x:Key="TickLabelEmpty" />
        <Style x:Key="BulbStyle" TargetType="{x:Type telerik:CustomTickMark}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <ContentPresenter>
                            <ContentPresenter.Content>
                                <Grid Margin="-5,0,-5,24" Width="100">
                                    <Grid Margin="39.5,1,39.5,0">
                                        <Ellipse Stretch="Fill" Height="21" Fill="#FF720700" Margin="0,0,0,0" VerticalAlignment="Bottom" Opacity="0.5"/>
                                        <Border CornerRadius="6,6,6,6" BorderBrush="#FF720700" BorderThickness="2,2,2,2" Margin="3,0,3,2" Width="12" Opacity="0.5">
                                            <Border.Background>
                                                <LinearGradientBrush StartPoint="0.5,0.955317" EndPoint="0.5,0.00861141">
                                                    <GradientStop Color="#FF5A0400" Offset="0"/>
                                                    <GradientStop Color="#FF900C00" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border Margin="6.5,1,6.5,3" CornerRadius="5,5,5,5" BorderBrush="#FFFF6D00" BorderThickness="1,1,1,1" Background="{x:Null}" VerticalAlignment="Stretch"/>
                                        <Ellipse Stretch="Fill" Height="17" VerticalAlignment="Bottom" Stroke="#FFFF6D00" Margin="2,0,2,2" x:Name="redEllipse">
                                            <Ellipse.Fill>
                                                <RadialGradientBrush>
                                                    <GradientStop Offset="0" Color="#FF720700" />
                                                </RadialGradientBrush>
                                            </Ellipse.Fill>
                                        </Ellipse>
                                        <Border Margin="7.5,2,7.5,4" CornerRadius="4,4,4,4" BorderBrush="#FF720700" BorderThickness="1,1,1,1">
                                            <Border.Background>
                                                <LinearGradientBrush StartPoint="0.5,0.955317" EndPoint="0.5,0.00861141">
                                                    <GradientStop Color="#FF5A0400" Offset="0"/>
                                                    <GradientStop Color="#FF900C00" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border Margin="8.5,220,8.5,9" CornerRadius="3,3,3,3">
                                            <Border.Background>
                                                <LinearGradientBrush StartPoint="-0.0263883,0.499995" EndPoint="1.01428,0.499995">
                                                    <GradientStop Color="#FFFEFFFE" Offset="0"/>
                                                    <GradientStop Color="#FFFEFFFE" Offset="0.5"/>
                                                    <GradientStop Color="#FFD8DADB" Offset="0.501"/>
                                                    <GradientStop Color="#FFB2B5B7" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Ellipse Stretch="Fill" Height="13" Margin="4,0,4,4" VerticalAlignment="Bottom">
                                            <Ellipse.Fill>
                                                <LinearGradientBrush StartPoint="-0.0263883,0.499995" EndPoint="1.01428,0.499995">
                                                    <GradientStop Color="#FFFEFFFE" Offset="0"/>
                                                    <GradientStop Color="#FFFEFFFE" Offset="0.50"/>
                                                    <GradientStop Color="#FFD8DADB" Offset="0.501"/>
                                                    <GradientStop Color="#FFB2B5B7" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Ellipse.Fill>
                                        </Ellipse>
                                    </Grid>
                                </Grid>
                            </ContentPresenter.Content>
                        </ContentPresenter>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="ItemTemplate" Value="{StaticResource TickLabelEmpty}" />
            <Setter Property="Length" Value="1" />
            <Setter Property="Offset" Value="0" />
            <Setter Property="TickWidth" Value="1" />
            <Setter Property="Type" Value="Custom" />
        </Style>
    </Window.Resources>
   
    <Grid Width="150" Height="300">
        <telerik:RadGauge>
            <telerik:LinearGauge>
                <telerik:LinearScale Name="Celsius" Max="40" Min="-30" MajorTicks="7" Style="{StaticResource CommonScaleStyle}">
                    <telerik:LinearScale.MajorTick>
                        <telerik:TickProperties Style="{StaticResource ScaleMajorTick}" Location="Outside" />
                    </telerik:LinearScale.MajorTick>
                    <telerik:LinearScale.MinorTick>
                        <telerik:TickProperties Style="{StaticResource ScaleMinorTick}" Location="Outside" />
                    </telerik:LinearScale.MinorTick>
                    <telerik:LinearScale.Label>
                        <telerik:LabelProperties Style="{StaticResource ScaleLabel}" Location="Outside"/>
                    </telerik:LinearScale.Label>
                    <telerik:TickList>
                        <telerik:CustomTickMark Value="-2" Style="{StaticResource BulbStyle}" Location="OverCenter"/>
                        <telerik:CustomTickMark Style="{StaticResource EmptyShapeCustomTick}" Value="-37">
                            <telerik:CustomTickMark.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock>C&#0176;</TextBlock>
                                </DataTemplate>
                            </telerik:CustomTickMark.ItemTemplate>
                        </telerik:CustomTickMark>
                    </telerik:TickList>
                    <telerik:IndicatorList>
                        <telerik:LinearBar Style="{StaticResource ThermometerBarStyle}" Value="5"/>
                    </telerik:IndicatorList>
                </telerik:LinearScale>

                <telerik:LinearScale Name="Fahrenheit" Max="104" Min="-22" MajorTicks="6" StartTickOffset="2" EndTickOffset="-4"    Style="{StaticResource CommonScaleStyle}">
                    <telerik:LinearScale.MajorTick>
                        <telerik:TickProperties Style="{StaticResource ScaleMajorTick}" Location="Inside" />
                    </telerik:LinearScale.MajorTick>
                    <telerik:LinearScale.MinorTick>
                        <telerik:TickProperties Style="{StaticResource ScaleMinorTick}" Location="Inside" />
                    </telerik:LinearScale.MinorTick>
                    <telerik:LinearScale.Label>
                        <telerik:LabelProperties Style="{StaticResource ScaleLabel}" Location="Inside"/>
                    </telerik:LinearScale.Label>
                    <telerik:TickList>
                        <telerik:CustomTickMark Style="{StaticResource EmptyShapeCustomTick}" Location="Inside" Value="-34.5">
                            <telerik:CustomTickMark.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock>F&#0176;</TextBlock>
                                </DataTemplate>
                            </telerik:CustomTickMark.ItemTemplate>
                        </telerik:CustomTickMark>
                    </telerik:TickList>
                </telerik:LinearScale>
            </telerik:LinearGauge>
        </telerik:RadGauge>
    </Grid>
</Window>

 

Hope someone can suggest something?

Regards

Rob

 

 

 

Robert
Top achievements
Rank 1
 answered on 14 Jul 2009
2 answers
254 views
Hi,

If I have a grid like this:

<telerik:RadGridView Name="radGridView1" AutoGenerateColumns="False">  
   <telerik:RadGridView.Columns> 
      <telerik:GridViewDataColumn HeaderText="Name" UniqueName="Name" /> 
      <telerik:GridViewDataColumn HeaderText="Testabc 1" DataMemberPath="Test1"/>  
      <telerik:GridViewDataColumn HeaderText="Testabc 2" DataMemberPath="Test2"/>  
      <telerik:GridViewDataColumn HeaderText="Testabc 3" DataMemberPath="Test3"/>  
   </telerik:RadGridView.Columns> 
</telerik:RadGridView> 
  the column headers don't show the text in HeaderText, but the UniqueName or DataMemberPath text.
JDB
Top achievements
Rank 1
 answered on 14 Jul 2009
3 answers
593 views
I have a telerik RadGridView that I would like to bind the row selection to a ICommand object, so my viewModel can execute it's code. I obviously cannot bind the SelectionChanged Event to a command, so I was wondering if there was another way to do this currently? Thank you for any assistance.
Casey Watson
Top achievements
Rank 1
 answered on 14 Jul 2009
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
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?