Telerik Forums
UI for WPF Forum
2 answers
401 views
I have a RadDateTimePicker control in a view that is bound to a datetime property in the associated viewmodel using the SelectedValue of the RadDateTimePicker. When the user selects a date and / or time, the datetime property in the viewmodel is set accordingly. However, if the user subsequently clears the input and the default 'Enter date' text is displayed in the control, the datetime property in the viewmodel is not set to null / mindatetime.

How can I implement the RadDateTimePicker so that if a user clears the datetime from the control the SelectedValue becomes null or mindatetime?
Yana
Telerik team
 answered on 14 Jun 2011
3 answers
348 views

The following was my code.

<telerik:RadGridView.Columns>
	<telerik:GridViewDataColumn Header="ID" UniqueName="colID" DataMemberBinding="{Binding Id}" IsVisible="False"  />
<telerik:GridViewImageColumn Header="Photo"  UniqueName="colImage" DataMemberBinding="{Binding ProductImage}" ImageHeight="20" ImageWidth="20"/>
<telerik:GridViewDataColumn  Header="Product Name" UniqueName="colDisplayName" DataMemberBinding="{Binding ProductName}"/>
</telerik:RadGridView.Columns> I have some requirement i.e Instead of showing "Product Image" and "Product Name" in two different columns i want show both in one column. like photo +"space" + its name. Regards Naresh Mesineni


naresh
Top achievements
Rank 1
 answered on 14 Jun 2011
0 answers
129 views
I have some problem.I am showing data in Nested Gridview .i.e when I select gridview row again I am showing nested grid with some details.
But I have some problem.when I click on + symbol data is not loading.when I click on row data is loading.
please help me in this matter.

Regards
Naresh Mesineni
naresh
Top achievements
Rank 1
 asked on 14 Jun 2011
2 answers
129 views
Got a little issue, installing the latest version, not to mention, the tool box is a bit of a mess, as the items repeats it self, also another issue i have notice, when i create a new project base on telerik i don't see the theme tab, is that normal?
i am ruining vs 2010 ultimate, any help would be great

cheers

Jason
Jason
Top achievements
Rank 2
 answered on 14 Jun 2011
1 answer
98 views
Hi,

I would like to know if it's possible to display pdf document into a Carousel?

1. Having each pdf pages as a CarouselItem

or

2. Having a pdf document and all of it's content into a CarouselItem

Actually, it's possible in my situation to have multiple pdf documents, that's why I'm planning to use a Carousel

Thank's
Milan
Telerik team
 answered on 14 Jun 2011
7 answers
133 views
This sample raises NullReferenceException in tha AxisX.CalculateItemRange method

View:
<Window.Resources>

        <DataTemplate x:Key="measTemplate">
            <telerik:RadChart ItemsSource="{Binding ChartData, Mode=OneWay}" >
                <telerik:RadChart.DefaultView>
                    <telerik:ChartDefaultView>
                        <telerik:ChartDefaultView.ChartLegend>
                            <telerik:ChartLegend UseAutoGeneratedItems="True" Header=" " x:Name="chartLegend">
                            </telerik:ChartLegend>
                        </telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartDefaultView.ChartArea>
                            <telerik:ChartArea LegendName="chartLegend" EnableAnimations="True">
                                <telerik:ChartArea.AxisX>
                                    <telerik:AxisX />
                                </telerik:ChartArea.AxisX>
                                <telerik:ChartArea.AxisY>
                                    <telerik:AxisY DefaultLabelFormat="F2"/>
                                </telerik:ChartArea.AxisY>
                                <telerik:ChartArea.AdditionalYAxes>
                                    <telerik:AxisY AxisName="Secondary" DefaultLabelFormat="F2"/>
                                </telerik:ChartArea.AdditionalYAxes>
                            </telerik:ChartArea>
                        </telerik:ChartDefaultView.ChartArea>
                    </telerik:ChartDefaultView>
                </telerik:RadChart.DefaultView>
                <telerik:RadChart.SeriesMappings>
                    <telerik:SeriesMapping LegendLabel="R">
                        <telerik:SeriesMapping.SeriesDefinition>
                            <telerik:LineSeriesDefinition ShowItemLabels="False" AxisName="Secondary"/>
                        </telerik:SeriesMapping.SeriesDefinition>
                        <telerik:ItemMapping FieldName="ValueY" DataPointMember="YValue"/>
                        <telerik:ItemMapping FieldName="ValueX" DataPointMember="XValue"/>
                    </telerik:SeriesMapping>
                    <telerik:SeriesMapping LegendLabel="C">
                        <telerik:SeriesMapping.SeriesDefinition>
                            <telerik:LineSeriesDefinition ShowItemLabels="False"/>
                        </telerik:SeriesMapping.SeriesDefinition>
                        <telerik:ItemMapping FieldName="ValueY1" DataPointMember="YValue"/>
                        <telerik:ItemMapping FieldName="ValueX" DataPointMember="XValue"/>
                    </telerik:SeriesMapping>
                </telerik:RadChart.SeriesMappings>
            </telerik:RadChart>
        </DataTemplate>
    </Window.Resources>
    <DockPanel>
        <ItemsControl ItemsSource="{Binding Context.Charts}" ItemTemplate="{StaticResource measTemplate}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <UniformGrid Columns="1" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </DockPanel>

View CodeBehind 
public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.Context = new Context();
            this.DataContext = this;
        }
 
 
        public Context Context { get; set; }
    }
 
 
    public class Context
    {
        public Context()
        {
            this.Charts = new ObservableCollection<ChartDataHolder>();
            for (int i = 0; i < 2; i++)
            {
                this.Charts.Add(new ChartDataHolder());
            }
        }
 
 
        public ObservableCollection<ChartDataHolder> Charts { get; private set; }
    }


ViewModel:
public class ChartDataHolder
    {
        private readonly BackgroundWorker worker = new BackgroundWorker();
 
        public ChartDataHolder()
        {
this.ChartData = new ObservableCollection<ChartDataItem>();
            worker.DoWork += this.worker_DoWork;
            this.worker.RunWorkerAsync();
 
        }
 
        void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            Thread.Sleep(TimeSpan.FromSeconds(1)); //!! Without it it works fine
            while (true)
            {
                for (int i = 0; i < 2; i++)
                {
                    Application.Current.Dispatcher.BeginInvoke(new Action(this.ProcessResult), null);
                }
                Thread.Sleep(TimeSpan.FromSeconds(5));
            }
        }
 
        private void ProcessResult()
        {
            this.ChartData.Clear();
            for (int i = 0; i < 20; i++)
            {
                this.ChartData.Add(new ChartDataItem() { ValueX = DateTime.Now.Second + i, ValueY = DateTime.Now.Second + i });
            }
        }
 
        public ObservableCollection<ChartDataItem> ChartData { get; private set; }
    }
Ves
Telerik team
 answered on 14 Jun 2011
3 answers
190 views
I have created a custom control derived from RadCombobox. It compiles and runs fine in Visual Studio. But if I use Expression Blend to view a screen containing my custon control, I receive a design time error stating "Object reference not set to an instance of an object". This happens even if the derived class contains an insignificant amount of code. If I place RadCombobox directly on the screen (e.g. without wrapping it in a custom control), it shows up fine.

Here is my custom control:
    public class ccComboBox : RadComboBox
    {
        public int i;
    }

Here is my xaml:
    <Grid>
        <StackPanel>
            <telerik:RadComboBox Height="30" Width="200" Background="LightBlue"/>
            <cc:ccComboBox Height="30" Width="200" Background="LightBlue"/>
            <cc:ccDatePicker />
        </StackPanel>
    </Grid>

Only the ccComboBox xaml causes the error. ccDatePicker is derived from RadDatePicker and works fine.

Any help is greatly appreciated.

Doug

										
Valeri Hristov
Telerik team
 answered on 14 Jun 2011
1 answer
257 views
Is it possible to change the localization dynamically, while the application is running ?
I tried this:

public CultureInfo UICulture
        {
            get
            {
                return Thread.CurrentThread.CurrentUICulture;
            }
            set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("value");
                }

                Thread.CurrentThread.CurrentUICulture = value;

                if ( Telerik.Windows.Controls.LocalizationManager.Manager != null )
                {
                    Telerik.Windows.Controls.LocalizationManager.Manager.Culture = value;
                }


                UpdateLocalizations();
            }
        }

This doesn't seem to work. The culture that I'm passing is fr-FR, and it seems you support the French language. What am I missing ?

Thanks,
Sebastien
Yana
Telerik team
 answered on 14 Jun 2011
1 answer
94 views
In our database, we have a huge list of files in a table that we would like to show on a treeview. The thing is that the field that contains the info is saved in a string in the following format:

c:\rootfolder\2011\03\10\folder\file.docx
c:\rootfolder\2011\02\11\folder\another.docx
c:\rootfolder\2011\03\10\folder\thisfile.docx

They are all saved in an object List<Item> that contains a property whose name is Object.FullPath

I was wondering if the wpf radtreeview has already built-in on the control where you pass the info and automatically parses the content.

Any thoughts?
Petar Mladenov
Telerik team
 answered on 14 Jun 2011
1 answer
190 views
How to change default filter in radgridview for datetime from raddatepicker to raddatetimepicker?
Ivan Ivanov
Telerik team
 answered on 14 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?