Telerik Forums
UI for WPF Forum
2 answers
65 views
Hi everyone

Quick question:

Is there a way to group the same Member several times? Take a look at the following code:

                         
                        <telerik:GridViewDataColumn Header="Jahr" DataMemberBinding="{Binding datum}" DataFormatString="{}{0:yyyy}" /> 
                        <telerik:GridViewDataColumn Header="Monat" DataMemberBinding="{Binding datum}" DataFormatString="{}{0:MMM}" /> 
                        <telerik:GridViewDataColumn Header="Tag" DataMemberBinding="{Binding datum}" DataFormatString="{}{0:dd}" /> 
 
         

I would like to group by Year (Jahr) and Month (Monat). Because the Member is always "datum" (date), I only can group one at a time.
Is there  a way to achieve this within or outside the RadGridView?


Martin Egger
Top achievements
Rank 2
 answered on 29 Apr 2010
1 answer
142 views
Hi guys,

I think you are missing ThicknessConverter declaration in "Customizing appearance of the radial gauge" help topic.
Like:
<telerik:ThicknessExpressionConverter x:Key="ThicknessConverter" />

Nikolay
Telerik team
 answered on 29 Apr 2010
1 answer
275 views
I am looking at needle customization documentation topic: "Customizing appearance of the radial gauge " and the following template:
<Style x:Key="TriangleNeedleTemplate" TargetType="{x:Type telerik:Needle}"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:Needle}"
                            <Grid Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="{TemplateBinding ActualHeight}"/> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
 
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="{TemplateBinding ActualHeight}" /> 
                                </Grid.RowDefinitions> 
                                <Border Background="Red" /> 
                                <Polygon Grid.ColumnSpan="2" Points="0,0 1,0.5 0,1 0,0" Stretch="Fill"  
                                         Fill="White" /> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 

produces templatebinding (attached) picture. Note the red rectangle that should be ActualHeight x ActualHeight big, yet it is much wider (1/2 of the grid).
However, the "should be equivalent" binding
{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight
produces the correct result (see expandedbinding picture).
Correct style:
<Style x:Key="TriangleNeedleTemplate" TargetType="{x:Type telerik:Needle}"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:Needle}"
                            <Grid Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}"/> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
 
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" /> 
                                </Grid.RowDefinitions> 
                                <Border Background="Red" /> 
                                <Polygon Grid.ColumnSpan="2" Points="0,0 1,0.5 0,1 0,0" Stretch="Fill"  
                                         Fill="White" /> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 



Andrey
Telerik team
 answered on 29 Apr 2010
1 answer
99 views
Looks like the editor doesn't recover anymore after the first comment keyword (see attached pic)
Kaloyan
Telerik team
 answered on 29 Apr 2010
1 answer
123 views
Looking at the deoms (Compass) I see this needle template:
<Grid x:Name="PART_Grid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="*" /> 
                                    <!-- Column 0 - tail --> 
                                    <ColumnDefinition Width="*" /> 
                                    <!-- Column 1 - pin point --> 
                                    <ColumnDefinition Width="*" /> 
                                    <!-- Column 2 - arrow --> 
                                </Grid.ColumnDefinitions> 
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="*" /> 
                                </Grid.RowDefinitions> 

I guess the old one that appears in the documentation (without TemplatePart) is obsolete and even not properly working?
Andrey
Telerik team
 answered on 29 Apr 2010
1 answer
120 views
I have a child grid as below, but it doesn't honor Widths set to the columns in Xaml.  Also, even though I've set the FrozenColumnCount, when I scroll left or right, the entire child table scrolls left or right and the columns that are supposed to be frozen scroll as well.

<telerik:RadGridView.HierarchyChildTemplate>
                        <DataTemplate>
                            <telerik:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="True" CanUserInsertRows="False"
                                                 CanUserReorderColumns="False" CanUserResizeColumns="True" FrozenColumnCount="8" ShowColumnHeaders="True" IsFilteringAllowed="False"
                                                 AutoGenerateColumns="False" ItemsSource="{Binding SkuForecastArchiveData}"  ShowGroupPanel="False" IsReadOnly="True">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn Header="Sku" DataMemberBinding="{Binding Sku}" Width="48" />
...
Yordanka
Telerik team
 answered on 28 Apr 2010
2 answers
91 views
How i can set the grid as non editable?, is this possible?
dennis
Top achievements
Rank 1
 answered on 28 Apr 2010
1 answer
117 views
Hi guys,

Check out the following XAML
<Window x:Class="WpfApplication28.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="350" Width="525" Background="Gray"
    <Grid> 
        <Grid.Resources> 
            <ControlTemplate x:Key="Tubo"
                <telerik:RadialGauge Width="150" Height="150"
                    <telerik:RadialScale Name="radialScale" StartAngle="135" SweepAngle="270" Radius=".95" 
                            MajorTicks="5" MinorTicks="1" MiddleTicks="1" LabelRotationMode="None"
                        <telerik:RadialScale.Label> 
                            <telerik:LabelProperties Location="Inside" FontSize="20" Foreground="Red" /> 
                        </telerik:RadialScale.Label> 
                    </telerik:RadialScale> 
                </telerik:RadialGauge> 
            </ControlTemplate> 
            <Style TargetType="{x:Type Control}"
                <Setter Property="Template" Value="{StaticResource Tubo}"
                </Setter> 
            </Style> 
        </Grid.Resources> 
        <Grid.RowDefinitions> 
            <RowDefinition /> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
        <Control /> 
        <telerik:RadialGauge Grid.Row="1"
            <telerik:RadialScale Name="radialScale" StartAngle="135" SweepAngle="270" Radius=".95" 
                            MajorTicks="5" MinorTicks="1" MiddleTicks="1" LabelRotationMode="None"
                <telerik:RadialScale.Label> 
                    <telerik:LabelProperties Location="Inside" FontSize="20" Foreground="Red" /> 
                </telerik:RadialScale.Label> 
            </telerik:RadialScale> 
        </telerik:RadialGauge> 
    </Grid> 
</Window> 
 

It shows two gauges, first one defined through a controltemplate embedded in style while the other directly. The former doesn't apply Label properties at all nor MajorTicks (not shown) but it does apply Needle if one is specified.
Andrey
Telerik team
 answered on 28 Apr 2010
1 answer
112 views
Hi,

I am new to Telerik chart. Actually downloaded the wpf controls to try before purchasing. I have added the following
XAML:

 

 

<GroupBox Style="{DynamicResource NoTitledGroupBox}" Grid.Row="1" Margin="20,5,20,20">

 

 

 

     <telerikChart:RadChart x:Name="RadChart1">

 

 

 

     </telerikChart:RadChart>

 

 

 

</GroupBox>

 


Code:

RadChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat =

"{0:F2}"

 

RadChart1.DefaultView.ChartArea.AxisX.MaxValue = 1000

RadChart1.DefaultView.ChartArea.AxisX.MinValue = 0

RadChart1.DefaultView.ChartArea.AxisX.[Step] = 100.0

RadChart1.DefaultView.ChartArea.AxisY.ExtendDirection = AxisExtendDirection.Smart

RadChart1.DefaultView.ChartArea.AxisX.Step = 100.0

RadChart1.DefaultView.ChartArea.AxisY.Title =

"Head"

 

RadChart1.DefaultView.ChartArea.AxisX.Title =

"GPM"

 

 

'RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.TitleStyle = TryCast(Resources("CustomAxisTitleStyle"), Style)

 

 

Dim dsSeries As DataSeries = GenerateSeries(obj.getAdjustedHeadCalc, obj.getAdjustedCapacity)

 

dsSeries.LegendLabel =

"Head"

 

dsSeries.Definition =

New LineSeriesDefinition

 

RadChart1.DefaultView.ChartArea.DataSeries.Add(dsSeries)

I have about 17 points. The YAxis draws the labels fine but I see some missing tick marks. I want 10 ticks on the XAxis but it keeps drawing 17 ticks and the labels are all messed up. Is there anything I am doing wrong?

I have attached the produced chart with the above code.

Regards,
Boaz

Ves
Telerik team
 answered on 28 Apr 2010
3 answers
212 views
Hi,

I would like to ask for help, I tried to find a solution in emos and forum threads, but I failed.
I have a DataTable binded to a RadGridView. One of the columns in the binded DataTable is date and I want to display/edit it in a RadDatePicker. Somehow I didn't manage to bind it correctly. I binded the date field to the GridViewDataColumn with DataMemberBinding, but I can not pass it to the template. I can not even pass it to a TextBlock template. However I managed to display and edit with a non-templated GridViewDataColumn. But my goal is to display and edit the date values with RadDatePicker. I guess the main difference is with your provided demo thet here I want to bind a datatable and I must use DataMemberBinding for its field, but I can not use it inside a CellTemplate. I would be greateful if you could ge me a tip or sample code how to resolve this problem.  Here is a sample:

 

 

 

<Window.Resources>

 

 

 

 

    <bl:TimeBand x:Key="timeBands"/>

 

</Window.Resources>

 

...

 

 

 

<telerik:RadGridView Name="grTimeBand" AutoGenerateColumns="False" ActionOnLostFocus="CommitEdit" ShowGroupPanel="False" ItemsSource="{Binding Source={StaticResource timeBands}, Path=TimeBandTable, debug:PresentationTraceSources.TraceLevel=High}">

 

 

 

 

    <telerik:RadGridView.Columns>

 

 

 

 

        <telerik:GridViewComboBoxColumn Header="InclAllSpecDays" Width="100" ItemsSourceBinding="{Binding Source={StaticResource booleanValues}, Path=BooleanValueList}" DataMemberBinding="{Binding INCLUSIVE_ALL_SPECIAL_DAYS}" />

 

 

 

 

        <telerik:GridViewDataColumn DataMemberBinding="{Binding START_TIME}">

 

 

 

 

            <telerik:GridViewDataColumn.CellTemplate>

 

 

 

 

                <DataTemplate>

 

 

 

 

                    <TextBlock Text="{Binding START_TIME, debug:PresentationTraceSources.TraceLevel=High}" /> ?????

 

 

 

 

                </DataTemplate>

 

 

 

 

            </telerik:GridViewDataColumn.CellTemplate>

 

 

 

 

            <telerik:GridViewDataColumn.CellEditTemplate>

 

 

 

 

                <DataTemplate>

 

 

 

 

                    <telerikInput:RadDatePicker SelectedDate="{Binding START_TIME, Mode=TwoWay}" />

 

 

 

 

                </DataTemplate>

 

 

 

 

            </telerik:GridViewDataColumn.CellEditTemplate>

 

 

 

 

        </telerik:GridViewDataColumn>

 

 

 

 

        <telerik:GridViewDataColumn Header="EndTime" Width="100" DataMemberBinding="{Binding END_TIME}"/>
        ...
                        
    </telerik:RadGridView.Columns>

 

 

 

 

 

 

 

 

</telerik:RadGridView>

 

Ferenc Gál
Top achievements
Rank 1
 answered on 28 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
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
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?