Telerik Forums
UI for WPF Forum
1 answer
50 views
When I have the following in my XAML code:

<Window.Resources>
   <my:MyViewModel x:Key="MyViewModel"/>
 
    <Style x:Key="CalendarStyle" TargetType="telerik:RadCalendar"
              BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Expression_DarkTheme, ElementType=telerik:RadCalendar}}">
      <Setter Property="AreWeekNumbersVisible" Value="False" />
    </Style>
 
    <Style TargetType="{x:Type telerik:RadDateTimePicker}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Expression_DarkTheme, ElementType=telerik:RadDateTimePicker}}">
      <Setter Property="CalendarStyle">
          <Setter.Value>
          <Style BasedOn="{StaticResource CalendarStyle}" TargetType="telerik:RadCalendar">
          </Style>
        </Setter.Value>
      </Setter>
    </Style>
 
 
  </Window.Resources>
    <Grid DataContext="{StaticResource MyViewModel}">
    <telerik:RadGridView Grid.Row="0"
                             Name="clubsGrid"
                             ItemsSource="{Binding Clubs}"
                             AutoGenerateColumns="False"              
                             Margin="5">
            <telerik:RadGridView.Columns>  
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
                                            Header="Est."
                                            DataFormatString="{}{0:yyyy/MM/dd}"
                                     />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
                                            Header="Stadium"
                                            DataFormatString="{}{0:N0}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>


If I change AreWeekNumbersVisible to True, it works just fine. I am using telerik version 2013.3.1204.45.

See attached images.
Kalin
Telerik team
 answered on 14 Nov 2014
5 answers
357 views
I'm using Telerik DocumentSpellChecker together with a RadRichtextBox in a WPF-Application .

How do I do a case insensitive word comparison???
Petya
Telerik team
 answered on 14 Nov 2014
5 answers
330 views
Is it possible to use a ChartSeriesProvider with a CompositeCollection as the Source? Just specifying one as a StaticResource (which works fine for something like a ListBox that uses ItemsSource) results in an exception:
    Could not find property 'SeriesType' for type 'System.Windows.Data.CollectionContainer'

Example source of what I'm trying to do (modified version of the example Petar provided in this thread:

<Window x:Class="TwoDynamic.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <CollectionViewSource x:Key="FirstList" Source="{Binding Path=Series1}"/>
        <CollectionViewSource x:Key="SecondList" Source="{Binding Path=Series2}"/>
        <CompositeCollection x:Key="NewList">
            <CollectionContainer Collection="{Binding Source={StaticResource FirstList}}" />
            <CollectionContainer Collection="{Binding Source={StaticResource SecondList}}" />
        </CompositeCollection>
    </Window.Resources>
    <Grid>
        <telerik:RadCartesianChart>
            <telerik:RadCartesianChart.Resources>
                <Style TargetType="telerik:LineSeries">
                    <Setter Property="StrokeThickness" Value="2"/>
                    <Setter Property="Stroke" Value="Blue" />
                </Style>
                <Style TargetType="telerik:BarSeries">
                    <Setter Property="CombineMode" Value="None"/>
                </Style>
            </telerik:RadCartesianChart.Resources>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis LabelFitMode="Rotate" LabelFormat="MMM-dd" />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.SeriesProvider>
                <telerik:ChartSeriesProvider Source="{StaticResource NewList}">
                    <telerik:ChartSeriesProvider.SeriesDescriptors>
                        <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" TypePath="SeriesType" CategoryPath="Date" ValuePath="Value"/>
                    </telerik:ChartSeriesProvider.SeriesDescriptors>
                </telerik:ChartSeriesProvider>
            </telerik:RadCartesianChart.SeriesProvider>
        </telerik:RadCartesianChart>
    </Grid>
</Window>

And the ViewModel:
namespace TwoDynamic
{
    public class DataPoint
    {
        public DateTime Date { get; set; }
        public double Value { get; set; }
    }
    public class SeriesBase
    {
        public ObservableCollection<DataPoint> Data { get; set; }
        public Type SeriesType { get { return SeriesTypeOverride; } }
        public virtual Type SeriesTypeOverride { get { return null; } }
    }
    public class PointData : SeriesBase
    {
        public override Type SeriesTypeOverride { get { return typeof(BarSeries); } }
    }
    public class LineData : SeriesBase
    {
        public override Type SeriesTypeOverride { get { return typeof(LineSeries); } }
    }
    public class ViewModel
    {
        private Random _Random = new Random();
        public ObservableCollection<SeriesBase> Series1 { get; private set; }
        public ObservableCollection<SeriesBase> Series2 { get; private set; }
        public ViewModel()
        {
            Series1 = new ObservableCollection<SeriesBase>();
            Series1.Add(new PointData() { Data = GenerateSomeData() });
            Series1.Add(new PointData() { Data = GenerateSomeData() });
            Series2 = new ObservableCollection<SeriesBase>();
            Series2.Add(new LineData() { Data = GenerateSomeData() });
            Series2.Add(new LineData() { Data = GenerateSomeData() });
        }
        private ObservableCollection<DataPoint> GenerateSomeData()
        {
            ObservableCollection<DataPoint> newCollection = new ObservableCollection<DataPoint>();
            for (int i = 0; i < 10; i++)
                newCollection.Add(new DataPoint() { Date = new DateTime(2012, 12, 31).AddDays(i), Value = _Random.Next(100) });
            return newCollection;
        }
    }
}
Petar Marchev
Telerik team
 answered on 14 Nov 2014
1 answer
154 views
Hi there. I am using a dataform to allow updates to a small class that contains a numeric value (specifically a decimal type).  The autogenerated field for the variable doesn't seem to be permitting me to input a decimal point. 

Any thoughts?
Boris
Telerik team
 answered on 14 Nov 2014
2 answers
178 views
Hi,

I am trying to display current time with an annotation, but it gets missplaced when the vertical scrollbar is shown (see screenshots).

I think the reason for the issue is that the VirtualizingTimelinePanel for annotation occupies the whole radtimeline width while the VirtualizingTimelinePanel for items is shrink by the ScrollViewer.

I am using the Windows8 theme.

Is this a known issue? Is there a workaround for it?

Best,

Ola
Ola
Top achievements
Rank 1
 answered on 13 Nov 2014
4 answers
199 views
During our evaluation of the RadMap control, we noticed that there is a significant delay (almost 1 second) between the mouse dragging and the starting of map panning.

I am using a local single image provider, so loading time shouldn't be the issue.

Is there any parameter I need to set to reduce this delay.
Ian
Top achievements
Rank 1
 answered on 13 Nov 2014
3 answers
110 views
Is there a way to change the background of the last column in GridView (attached image)

I have to display different number of columns based on some properties so i can not use Data binding, I ma creating the columns in code behind and also setting the width of columns.
In order to not have the last blank column i tried to set the width of last column to *, but when i do that the horizontal scroll bar do not appear if the content in the rows is bigger than the view can display

Here is the code i am using
/// <summary>
        /// Create the grid based on the list type
        /// </summary>
        private void InitializeGrid(csEnumListType listType)
        { 
            switch (listType)
            {
                case csEnumListType.csLstAppointmentTypes:
                    AddColumn("Description", 250, "GridDescription");
                    AddColumn("Abbreviation", 100, "ColumnValue1");
                    AddColumn("Appointment Category", 100, "ColumnValue2", true);
                    break;                
                case csEnumListType.csLstCollectors:
                case csEnumListType.csLstOperators:
                    AddColumn("Name", 400, "GridDescription");                    
                    AddColumn("Abbreviation", 85, "ColumnValue1", true);
                    break;
                case csEnumListType.csLstClmStyles:
                    AddColumn("Description", 300, "GridDescription");
                    AddColumn("Abbreviation", 100, "ColumnValue1");
                    AddColumn("Billing Media", 85, "ColumnValue2");
                    AddColumn("Claim Format", 100, "ColumnValue3", true, true);
                    break;
                default:
                    AddColumn("Description", 300, "GridDescription");
                    AddColumn("Abbreviation", 100, "ColumnValue1", true);                    
                    break;
            }            
        }

/// <summary>
        /// Add column with the header, width and binding
        /// </summary>
        /// <param name="col1Header"></param>
        /// <param name="col1Width"></param>
        private void AddColumn(string header, int width, string binding, bool isLastColumn = false, bool isClaimStyle = false)
        {
            GridViewDataColumn column = new GridViewDataColumn();
            column.DataMemberBinding = new Binding(binding);
            column.Header = header;
            column.TabStopMode = GridViewTabStop.Skip;
            column.Width = GridViewLength.Auto;

            this.RecordsGrid.Columns.Add(column);
        }

private void RecordsGrid_SourceUpdated(object sender, DataTransferEventArgs e)
        {
            if (RecordsGrid.Columns.Count > 0)
            {
                RecordsGrid.Columns[RecordsGrid.Columns.Count - 1].Width = new GridViewLength(100.123, GridViewLengthUnitType.Star);
            }
        }



Boris
Telerik team
 answered on 13 Nov 2014
1 answer
191 views
Hi,

I need some code which can render a Scatter line plot with x and y value and both the axis are logarithmic.

Thanks & Regards,
Sandeep Kumar Vidiyala
Martin Ivanov
Telerik team
 answered on 13 Nov 2014
1 answer
246 views
I am using Rad PanelBar.I want to show all item on load the page.That means need to automatically expand the items.

Here is my code

<telerik:RadPanelBar BorderBrush="#F0F0F0" Margin="-66,57,1195,-3">
          <telerik:RadPanelBarItem  DropPosition="Inside" Header="DEVICE" Background="#FF42545E" BorderBrush="#FF42545E" FontSize="14" >
              <telerik:RadPanelBarItem  Header="Add new Device" Foreground="Black" Cursor="Hand" FontSize="14" Margin="0,10,0,0" />
              <telerik:RadPanelBarItem Header="Print" Foreground="Black" Cursor="Hand" FontSize="14" Margin="0,10,0,0" />
              <telerik:RadPanelBarItem Header="De-allocate All" Foreground="Black" Cursor="Hand" FontSize="14" Margin="0,10,0,0" />
          </telerik:RadPanelBarItem>
      </telerik:RadPanelBar>
How can we do this..Can any one help?
Martin Ivanov
Telerik team
 answered on 13 Nov 2014
1 answer
105 views
Good evening. 

i'm using a BusyIndicator in a page that contain a datagrid. When the busyIndicator start( i set isBusy property = true) if i have a selectedItem != null in the datagrid it became null.
Everytime i start the busyIndicator i lose the selectedItem in the Datagrid.

Anyone had already see this problem ?

I'm using the busyIndicator in a c# wpf enviroment with Framework 4.0

thanks for your time.

Mirko
Nasko
Telerik team
 answered on 13 Nov 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?