Telerik Forums
UI for WPF Forum
1 answer
195 views
Using following code, we can print & preview of RadGridView using Telerik Reproting with grouping, filtering functionality of RadGridView with nos. of columns are generated dynamic in the Report.
Dimitrina
Telerik team
 answered on 07 May 2014
1 answer
144 views
Hi,

I have my GridView defiined in xaml with a custom GridViewHeadCell style.


<telerik:RadGridView x:Name="RadGrid" Margin="5"  IsReadOnly="True"
            AutoGenerateColumns="False" CanUserInsertRows="False" ShowGroupPanel="False" 
                                           DataLoadMode="Asynchronous"     IsSynchronizedWithCurrentItem="True"
                                                     GridLinesVisibility="Both"
                                                     VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                                     ItemsSource="{Binding CurrentParticlesList}">
                <telerik:RadGridView.Resources>
                    <Style TargetType="telerik:GridViewHeaderCell">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="telerik:GridViewHeaderCell">
                                    <ContentPresenter>
                                        <ContentPresenter.LayoutTransform>
                                            <RotateTransform Angle="270" />
                                        </ContentPresenter.LayoutTransform>
                                        <ContentPresenter.HorizontalAlignment>
                                            Center
                                        </ContentPresenter.HorizontalAlignment>
                                        <ContentPresenter.Margin>
                                            2,5,2,10
                                        </ContentPresenter.Margin>
                                    </ContentPresenter>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </telerik:RadGridView.Resources>
            </telerik:RadGridView>


I canot figure out how to get vertical lines to be drawn to separate the column headers.  Does anybody know what I can do to have some drawn?
Boris
Telerik team
 answered on 07 May 2014
1 answer
163 views
Using following code, we can print & preview of RadGridView using Telerik Reproting with grouping, filtering functionality of RadGridView with nos. of columns are generated dynamic in the Report.

Code:

using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Windows;<br>using Telerik.Reporting;<br>using System.Collections.ObjectModel;<br>using Telerik.Reporting.Processing;<br>using Telerik.Windows.Controls;<br>using Telerik.Windows.Controls.GridView;<br><br>namespace YourNamespaceHere<br>{<br>    /// <summary><br>    /// Interaction logic for PrintPreviewTelerikReportViewer.xaml<br>    /// </summary><br>    public partial class PrintPreviewTelerikReportViewer : Window<br>    {<br>        #region Variables<br>        RadGridView _CurrentRadGridView = new RadGridView();<br>        #endregion<br><br>        #region Ctor<br>        /// <summary><br>        /// ctor<br>        /// </summary><br>        /// <param name="p_RadGridView"></param><br>        public PrintPreviewTelerikReportViewer(RadGridView p_RadGridView)//this is for print preview<br>        {<br>            try<br>            {<br>                InitializeComponent();<br>                TitleBackground = Params.RibbonThemeSolidColor;<br>                _CurrentRadGridView = p_RadGridView;<br>                this.Loaded += new RoutedEventHandler(PrintPreviewTelerikReportViewer_Loaded);<br>            }<br>            catch (Exception _Exception)<br>            {<br>                MessageBox.Show(_Exception.Message.ToString());<br>            }<br>        }<br>        #endregion<br><br>        #region Events<br>        /// <summary><br>        /// loaded event<br>        /// </summary><br>        /// <param name="sender"></param><br>        /// <param name="e"></param><br>        void PrintPreviewTelerikReportViewer_Loaded(object sender, RoutedEventArgs e)<br>        {<br>            try<br>            {<br>                rvCommonReportViewer.ReportSource = GenerateReport(_CurrentRadGridView);<br>                rvCommonReportViewer.RefreshReport();<br>                rvCommonReportViewer.ViewMode = Telerik.ReportViewer.Wpf.ViewMode.PrintPreview;<br>            }<br>            catch (Exception _Exception)<br>            {<br>                MessageBox.Show(_Exception.Message.ToString());<br>            }<br>        }<br>        #endregion<br><br>        #region Methods<br>        /// <summary><br>        /// print telerik report static method<br>        /// </summary><br>        /// <param name="p_RadGridView"></param><br>        public static void PrintTelerikReport(RadGridView p_RadGridView)<br>        {<br>            try<br>            {<br>                ReportSource _ReportSource = GenerateReport(p_RadGridView);<br>                ReportProcessor _ReportProcessor = new ReportProcessor();<br>                _ReportProcessor.PrintReport(_ReportSource, null);<br>            }<br>            catch (Exception _Exception)<br>            {<br>                MessageBox.Show(_Exception.Message.ToString());<br>            }<br>        }<br><br>        /// <summary><br>        /// generate report static Methods<br>        /// </summary><br>        /// <param name="p_RadGridView"></param><br>        /// <returns></returns><br>        private static Telerik.Reporting.Report GenerateReport(RadGridView p_RadGridView)<br>        {<br>            #region Variables For Report<br><br>            Telerik.Reporting.Report _testReport = new Telerik.Reporting.Report();<br><br>            Telerik.Reporting.GroupHeaderSection _GroupHeaderSection = new Telerik.Reporting.GroupHeaderSection();<br>            Telerik.Reporting.GroupFooterSection _GroupFooterSection = new Telerik.Reporting.GroupFooterSection();<br>            Telerik.Reporting.PageFooterSection _PageFooterSection = new Telerik.Reporting.PageFooterSection();<br>            Telerik.Reporting.TextBox _CurrentTimeTextBox = new Telerik.Reporting.TextBox();<br>            Telerik.Reporting.TextBox _PageInfoTextBox = new Telerik.Reporting.TextBox();<br>            Telerik.Reporting.ReportHeaderSection _ReportHeaderSection = new Telerik.Reporting.ReportHeaderSection();<br>            Telerik.Reporting.TextBox _TitleTextBox = new Telerik.Reporting.TextBox();<br>            Telerik.Reporting.DetailSection _DetailSection = new Telerik.Reporting.DetailSection();<br><br>            Telerik.Reporting.Group _Group = new Telerik.Reporting.Group();<br><br>            Telerik.Reporting.Drawing.StyleRule _StyleRule1 = new Telerik.Reporting.Drawing.StyleRule();<br>            Telerik.Reporting.Drawing.StyleRule _StyleRule2 = new Telerik.Reporting.Drawing.StyleRule();<br>            Telerik.Reporting.Drawing.StyleRule _StyleRule3 = new Telerik.Reporting.Drawing.StyleRule();<br>            Telerik.Reporting.Drawing.StyleRule _StyleRule4 = new Telerik.Reporting.Drawing.StyleRule();<br><br>            double _Headerlocation = 0.02;<br>            double _GroupHeaderlocationY = 0.02;<br>            double _GroupHeaderlocationX = 0.02;<br>            #endregion<br><br>            #region This is for Detail<br>            //this is for group detail<br>            foreach (ColumnGroupDescriptor _ColumnGroupDescriptor in p_RadGridView.GroupDescriptors)<br>            {<br>                _Group.Groupings.Add(new Telerik.Reporting.Grouping("=Fields." + _ColumnGroupDescriptor.Column.UniqueName));<br><br>                Telerik.Reporting.TextBox _tbHeader = new Telerik.Reporting.TextBox();<br>                _tbHeader.CanGrow = true;<br>                _tbHeader.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_GroupHeaderlocationX), Telerik.Reporting.Drawing.Unit.Inch(_GroupHeaderlocationY));<br>                _tbHeader.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(5.0), Telerik.Reporting.Drawing.Unit.Inch(0.30000000596046448D));<br>                _tbHeader.Style.Font.Bold = true;<br>                _tbHeader.Style.Font.Name = "Segoe UI";<br>                _tbHeader.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br>                _tbHeader.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;<br>                _tbHeader.Value = "=Fields." + _ColumnGroupDescriptor.Column.UniqueName;<br><br>                _GroupHeaderSection.Items.Add(_tbHeader);<br><br>                _GroupHeaderlocationY += 0.20;<br>                _GroupHeaderlocationX += 0.10;<br>            }<br><br>            //this is for simple detail<br>            foreach (Telerik.Windows.Controls.GridViewColumn _GridViewColumn in p_RadGridView.Columns)<br>            {<br>                if (_GridViewColumn.GetType() != typeof(GridViewSelectColumn) && _GridViewColumn.IsVisible != false)<br>                {<br>                    double _DataWidth = Convert.ToDouble(_GridViewColumn.Width.Value / 100);<br><br>                    Telerik.Reporting.TextBox _tbHeader = new Telerik.Reporting.TextBox();<br>                    _tbHeader.CanGrow = true;<br>                    if (p_RadGridView.GroupDescriptors.Count != 0)<br>                    {<br>                        _tbHeader.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_Headerlocation), Telerik.Reporting.Drawing.Unit.Inch(_GroupHeaderlocationY));<br>                    }<br>                    else<br>                    {<br>                        _tbHeader.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_Headerlocation), Telerik.Reporting.Drawing.Unit.Inch(0.02));<br>                    }<br>                    _tbHeader.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(_DataWidth), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D));<br>                    _tbHeader.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>                    _tbHeader.Style.Font.Bold = true;<br>                    _tbHeader.Style.Font.Name = "Segoe UI";<br>                    _tbHeader.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br>                    _tbHeader.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;<br>                    _tbHeader.StyleName = "Caption";<br>                    _tbHeader.Value = _GridViewColumn.Header.ToString();<br><br>                    _GroupHeaderSection.Items.Add(_tbHeader);<br><br><br><br>                    Telerik.Reporting.TextBox _tbData = new Telerik.Reporting.TextBox();<br>                    _tbData.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_Headerlocation), Telerik.Reporting.Drawing.Unit.Inch(3.9577484130859375E-05D));<br>                    _tbData.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(_DataWidth), Telerik.Reporting.Drawing.Unit.Inch(0.20));<br>                    _tbData.Style.Font.Name = "Segoe UI";<br>                    _tbData.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br>                    _tbData.Value = "=Fields." + _GridViewColumn.UniqueName;<br><br>                    _DetailSection.Items.Add(_tbData);<br><br>                    _Headerlocation += Convert.ToDouble(_GridViewColumn.Width.Value / 100);<br>                }<br>            }<br>            #endregion<br><br>            #region This is for Page Footer<br>            // labelsGroupFooterSection<br>            _GroupFooterSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.099999904632568359D);<br>            _GroupFooterSection.Name = "labelsGroupFooterSection";<br>            _GroupFooterSection.Style.Visible = false;<br><br>            // pageFooter<br>            _PageFooterSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.44166669249534607D);<br>            _PageFooterSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _CurrentTimeTextBox, _PageInfoTextBox });<br>            _PageFooterSection.Name = "pageFooter";<br><br>            // currentTimeTextBox<br>            _CurrentTimeTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));<br>            _CurrentTimeTextBox.Name = "currentTimeTextBox";<br>            _CurrentTimeTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.1979167461395264D), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D));<br>            _CurrentTimeTextBox.Style.Font.Name = "Segoe UI";<br>            _CurrentTimeTextBox.StyleName = "PageInfo";<br>            _CurrentTimeTextBox.Value = "=NOW()";<br><br>            // pageInfoTextBox<br>            _PageInfoTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.2395832538604736D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));<br>            _PageInfoTextBox.Name = "pageInfoTextBox";<br>            _PageInfoTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.1979167461395264D), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D));<br>            _PageInfoTextBox.Style.Font.Name = "Segoe UI";<br>            _PageInfoTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;<br>            _PageInfoTextBox.StyleName = "PageInfo";<br>            _PageInfoTextBox.Value = "=PageNumber";<br>            #endregion<br><br>            #region This is for Page Header<br>            // labelsGroupHeaderSection<br>            _GroupHeaderSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.44166669249534607D);<br>            _GroupHeaderSection.Name = "labelsGroupHeaderSection";<br>            _GroupHeaderSection.PrintOnEveryPage = true;<br><br>            // reportHeader<br>            _ReportHeaderSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.35833343863487244D);<br>            _ReportHeaderSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {<br>            _TitleTextBox});<br>            _ReportHeaderSection.Name = "reportHeader";<br><br>            // titleTextBox<br>            _TitleTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D), Telerik.Reporting.Drawing.Unit.Inch(0D));<br>            _TitleTextBox.Name = "titleTextBox";<br>            _TitleTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.2375001907348633D), Telerik.Reporting.Drawing.Unit.Inch(0.31999999284744263D));<br>            _TitleTextBox.Style.Color = System.Drawing.Color.Black;<br>            _TitleTextBox.Style.Font.Name = "Segoe UI";<br>            _TitleTextBox.StyleName = "Title";<br>            _TitleTextBox.Value = "Test Summary Report";<br>            #endregion<br><br>            // detail<br>            _DetailSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.20);<br>            _DetailSection.Name = "detail";<br><br>            _Group.GroupFooter = _GroupFooterSection;<br>            _Group.GroupHeader = _GroupHeaderSection;<br><br>            _testReport.Groups.AddRange(new Telerik.Reporting.Group[] { _Group });<br>            _testReport.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _GroupHeaderSection, _GroupFooterSection, _PageFooterSection, _ReportHeaderSection, _DetailSection });<br><br>            #region This is for Style<br>            _testReport.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D));<br>            _testReport.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;<br>            _testReport.Style.BackgroundColor = System.Drawing.Color.White;<br>            _testReport.Style.BorderColor.Bottom = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>            _testReport.Style.BorderColor.Default = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>            _testReport.Style.BorderColor.Left = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>            _testReport.Style.BorderColor.Right = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>            _testReport.Style.BorderColor.Top = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>            _testReport.Style.BorderStyle.Bottom = Telerik.Reporting.Drawing.BorderType.Solid;<br>            _testReport.Style.BorderStyle.Left = Telerik.Reporting.Drawing.BorderType.Solid;<br>            _testReport.Style.BorderStyle.Right = Telerik.Reporting.Drawing.BorderType.Solid;<br>            _testReport.Style.BorderStyle.Top = Telerik.Reporting.Drawing.BorderType.Solid;<br>            _testReport.Style.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br>            _StyleRule1.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br>            new Telerik.Reporting.Drawing.StyleSelector("Title")});<br>            _StyleRule1.Style.Color = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));<br>            _StyleRule1.Style.Font.Name = "Tahoma";<br>            _StyleRule1.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(18D);<br>            _StyleRule2.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br>            new Telerik.Reporting.Drawing.StyleSelector("Caption")});<br>            _StyleRule2.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));<br>            _StyleRule2.Style.Color = System.Drawing.Color.White;<br>            _StyleRule2.Style.Font.Name = "Tahoma";<br>            _StyleRule2.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(10D);<br>            _StyleRule2.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;<br>            _StyleRule3.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br>            new Telerik.Reporting.Drawing.StyleSelector("Data")});<br>            _StyleRule3.Style.Color = System.Drawing.Color.Black;<br>            _StyleRule3.Style.Font.Name = "Tahoma";<br>            _StyleRule3.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(9D);<br>            _StyleRule3.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;<br>            _StyleRule4.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br>            new Telerik.Reporting.Drawing.StyleSelector("PageInfo")});<br>            _StyleRule4.Style.Color = System.Drawing.Color.Black;<br>            _StyleRule4.Style.Font.Name = "Tahoma";<br>            _StyleRule4.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br>            _StyleRule4.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;<br>            _testReport.StyleSheet.AddRange(new Telerik.Reporting.Drawing.StyleRule[] {<br>            _StyleRule1,<br>            _StyleRule2,<br>            _StyleRule3,<br>            _StyleRule4});<br>            _testReport.Width = Telerik.Reporting.Drawing.Unit.Inch(6.4375D);<br>            #endregion<br><br>            _testReport.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4;<br><br>            //_testReport.DataSource = p_RadGridView.ItemsSource;//this is for all data<br>            _testReport.DataSource = p_RadGridView.Items;//this is for filter grid<br>            return _testReport;<br>        }<br>        #endregion<br>    }<br>}<br>


Thanks,
Yogesh Goswami
Dimitrina
Telerik team
 answered on 07 May 2014
1 answer
203 views
Hi,

I am struggeling for hours now to implement the multi selection in the carousel. I tried several ways, the last being this one :

<Style TargetType="{x:Type telerik:CarouselItem}">
 
        <Setter Property="Background" Value="AliceBlue" /><!--#50FFFFCC-->
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Height" Value="{Binding ItemHeight, RelativeSource={RelativeSource AncestorType={x:Type local:ILCarousel}}}" />
        <Setter Property="Width" Value="{Binding ItemWidth, RelativeSource={RelativeSource AncestorType={x:Type local:ILCarousel}}}" />
         
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:CarouselItem}">                                   
             <Border BorderThickness="2" CornerRadius="2" Padding="5" Background="{TemplateBinding Background}" BorderBrush="#FFB8D6FB">
                        <Grid>
                             
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                             
                            <Grid.RowDefinitions >
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
 
                            <local:ILScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" x:Name="content" Grid.ColumnSpan="3" >
                                <ContentPresenter Name="PART_presenter" />
                            </local:ILScrollViewer>
 
                            <CheckBox Grid.Column="0" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" >
                                <CheckBox.Visibility>
                                    <MultiBinding Converter="{StaticResource and}">
                                         
                                        <Binding Path="SelectionMode" Converter="{StaticResource visibleIfNotEquals}"
                                                 ConverterParameter="{x:Static SelectionMode.Single}"
                                                 RelativeSource="{RelativeSource AncestorType={x:Type local:ILCarousel}}" />
                                         
                                        <Binding Path="IsCurrent" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource not}"/>
                                         
                                    </MultiBinding>
                                </CheckBox.Visibility>
                            </CheckBox>
                             
                            <CheckBox Grid.Column="2" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" >
                                <CheckBox.Visibility>
                                    <MultiBinding Converter="{StaticResource and}">
                                        <Binding Path="SelectionMode" Converter="{StaticResource visibleIfNotEquals}"
                                                 ConverterParameter="{x:Static SelectionMode.Single}"
                                                 RelativeSource="{RelativeSource AncestorType={x:Type local:ILCarousel}}" />
                                        <Binding Path="IsCurrent" RelativeSource="{RelativeSource TemplatedParent}"/>
                                    </MultiBinding>
                                </CheckBox.Visibility>
                            </CheckBox>
                             
                            <CheckBox Grid.Column="4" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" >
                                <CheckBox.Visibility>
                                    <MultiBinding Converter="{StaticResource and}">
                                        <Binding Path="SelectionMode" Converter="{StaticResource visibleIfNotEquals}"
                                                 ConverterParameter="{x:Static SelectionMode.Single}"
                                                 RelativeSource="{RelativeSource AncestorType={x:Type local:ILCarousel}}" />
                                        <Binding Path="IsCurrent" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource not}"/>
                                    </MultiBinding>
                                </CheckBox.Visibility>
                            </CheckBox>
                             
                             
                        </Grid>
                    </Border>
 
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

But it acts as if the RadCarousel SelectedItems property is deactivated.

Do you have any idea how I could do this?

Thank you,

Grégoire
Maya
Telerik team
 answered on 07 May 2014
1 answer
103 views
Is there a way to get a breakdown of items that aggregate to a current cell's value.
Rosen Vladimirov
Telerik team
 answered on 07 May 2014
1 answer
120 views
Hi,

In my control (ScheduleView with WeekViewDefinition), I alway displaying from monday to friday and from 8:00AM to 6:00PM for each day (each day can have 1 ou 2 resource). For each cell, I need to create a SpecialSlot and of course, I need to add available appointments. When the user navigate through each weeks, I need to recreate the same pattern but this pattern seem's to take a huge amount of time and the application freeze between each week rendering.

Actually, I set the SpecialSlotsSourceand the AppointmentsSource to null before the rendering and I assign my collections to the control after the special slots and the appointments was created.

Can you gave me some hints to accelerate my week generation?

Thank's
Alain
Kalin
Telerik team
 answered on 06 May 2014
2 answers
469 views
Hello,
I have a GridView that contains a column bound to a Boolean value.
I want that the value is not displayed with the default check box, so I wrote a converter that displays a check mark only when the value is true.

If I use the converter only on the DataContext, the column is still displayed with the standard check box:
DataContext="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"

To have the column displayed normally, I had to define a cell template:
<tk:GridViewDataColumn DataContext="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"
                       Header="Already played"
                       IsGroupable="False"
                       ShowFieldFilters="False"
                       UniqueName="IsTeamMate"
                       Width="30">
  <tk:GridViewDataColumn.CellTemplate>
    <DataTemplate>
      <TextBlock Text="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}" />
    </DataTemplate>
  </tk:GridViewDataColumn.CellTemplate>
</tk:GridViewDataColumn>

Is it a normal behavior or is there another way to display the column correctly ?
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 06 May 2014
2 answers
167 views
Hello, basically in the event handler "CellEditEnded", I would like to check if the old cell value is the same as the new cell value.
e.OldData == e.NewData returns true if I completely don't touch the cell values.

However, if I for example, add something to the cell, and delete it again BACK to the same value, then e.OldData == e.NewData return false.
(Example - original value: test --> typed 's' to become 'tests' --> backspace again to become 'test' which is back to the same value.
Setting breakpoints does show that  e.OldData and e.NewData still have the same value, but somehow no longer equal.

e.OldData.ToString() and e.NewData.ToString() works, however, there will be exception if the column is binded to any non-string datatype (such as int / datetime etc). Is there any workaround for this? Thanks for your attention.
Nick
Telerik team
 answered on 06 May 2014
2 answers
91 views
I was wondering if anyone has done any work in showing the RadTimeBar in a vertical orientation?  Every example I have seen shows it in a horizontal layout, and I don't see anything that would allow me to show it vertical.  Am I overlooking it somewhere, or is it not currently a feature?

Thanks
Paul
Paul
Top achievements
Rank 1
 answered on 06 May 2014
3 answers
238 views
Hello,
i have some trouble with the RadComboBox control.

Window is Loaded, see Screenshot 001
I clicked in RadComboBox, see Screenshot 002
I typed in "14" and pressed Enter, see Screenshot 003

I clicked again in RadComboBox and I have severell problems. (see Screenshot 004)
  • Marked Text cannot be overriden
  • DropDown doesn't show up, even if I clicked clear
  • No caret appears

The Code is very minimalistic
<Window x:Class="RadComboBoxSample.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="220" Width="220">
    <Window.Resources>
        <Style x:Key="RadComboBoxContentUserControlStyle" TargetType="telerik:RadComboBox">
            <Setter Property="Margin" Value="10" />
            <Setter Property="Padding" Value="10" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="IsReadOnly" Value="True" />
            <Setter Property="IsEditable" Value="True" />
            <Setter Property="IsFilteringEnabled" Value="True" />
            <Setter Property="CanAutocompleteSelectItems" Value="True" />
            <Setter Property="CanKeyboardNavigationSelectItems" Value="True" />
            <Setter Property="OpenDropDownOnFocus" Value="True" />
            <Setter Property="TextSearchMode" Value="Contains" />
            <Setter Property="ClearSelectionButtonVisibility" Value="Visible" />
            <Setter Property="ClearSelectionButtonContent" Value="Clear" />
            <Setter Property="EmptyText" Value="Please select" />
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" MinWidth="200" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <telerik:RadComboBox Grid.Column="0" Grid.Row="0" Style="{StaticResource RadComboBoxContentUserControlStyle}">
            <telerik:RadComboBoxItem Content="14 - Car" />
            <telerik:RadComboBoxItem Content="15 - Airplane" />
            <telerik:RadComboBoxItem Content="16 - Boat" />
            <telerik:RadComboBoxItem Content="17 - Bike" />
        </telerik:RadComboBox>
    </Grid>
</Window>




Kalin
Telerik team
 answered on 06 May 2014
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?