Telerik Forums
UI for WPF Forum
3 answers
280 views
Hello,

I want to implement drag n drop functionality from RadGridView to RadTreeView. I dont want to use ViewModel.

in the RadGridView i have some data pulled from Database , i.e a list of songs with their tags as columns.

In the treeview i have made some categories of songs. I want to drag a song / or multiple songs from RadGridView and drop it on a category node of treeview. internally i will get a list of all selected rows of grid which or dragged on the Drop Event of treeview and update it to my collection and later in DB. I looked in your demos but all are using MVVM. I want a pure C# code , which would implement my task ASAP.
Yana
Telerik team
 answered on 03 Sep 2014
3 answers
149 views
Hi,

I've app with default theme and I would like to know if it is possible to use Windows8Theme scrollview for my gridview. And I also  need to perform some customization for example I need to change thumb color, remove up/down repeatbuttons.  Thanks in advance for any help.
Vanya Pavlova
Telerik team
 answered on 03 Sep 2014
1 answer
150 views
I have a GridView which contains a name column - and the name may be null or " " or "" or a real name.

Ex:
Name1: null
Name2: " "
Name3: ""
Name4: "Obama"
Name5: "obama"
Name6: " obama" (should be grouped with Obama and not with "")

In the group header I would like to group by the names first letter - or "" if there String.IsNullOrWhiteSpace is true. And I would like the group header to ignore the case of the first letter.
There are other columns in the GridView which I do not want grouped like this.

I have done this:
 GroupMemberPath="Entity.Name[0]"

But that leaves an ugly square in the header if the name is null - (and " " and "" are grouped in two different groups. So is "Obama" and "obama" and " obama").

I have a quite a few of these name-columns around in my program, so I would like an elegant, reusable solution :ΓΈ) What I really need is a way to add a Converter to the group binding.

Normally I would use a converter, but there does not seem to be a way to add a converter to the groupmemberpath (?)
There is a GroupHeaderFormatString; but I have failed to find a way to get {}{0:<something>} to return the first letter.
The type of Name is String. I really do not want to change this so adding a FirstLetter-property is not a solution either.
Seems like adding a GroupHeaderTempate will only affect the text in the group header. It will not allow me to group "Obama" and "obama" in the same group.

Is there a solution to this?
Thanks


Dimitrina
Telerik team
 answered on 02 Sep 2014
7 answers
201 views
Hi,

I try to follow the thread about CustomStyle (http://www.telerik.com/help/wpf/styling-apperance-custom-styles-themes-runtime.html) by replacing the RadButton by a RadGridView.

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style TargetType="telerik:RadGridView" BasedOn="{StaticResource RadGridViewStyle}">
        <Setter Property="Background" Value="Red"/>
    </Style>
</ResourceDictionary>

When I click on Button to switch the theme, an exception is raised ('System.Windows.Markup.XamlParseException') because it's not able to resolve the RadGridViewStyle. It seems that it can not resolve staticresource presents in another files (app.xaml), i don't understand why it's work with RadButton and not RadGridView.

Thanks for feedback.
Regards
Dimitrina
Telerik team
 answered on 02 Sep 2014
1 answer
145 views
I have a GridView whose ItemsSource is bound to an ICollectionView. This GridView has a child GridView whose ItemsSource is bound to a property of currently selected item of the main GridView.

This all works fine, however, when ever ICollectionView of the main GridView is refreshed the child GridView is also refreshed so it loses it current scroll position and item selection.

Any ideas on how to prevent the child GridView from refreshing when main GridView ItemsSource is refreshed?
Boris
Telerik team
 answered on 02 Sep 2014
3 answers
92 views
By default the DataContext of a child GridView is the selected item of the parent GridView. How would I change this so that the DataContext of the child GridView is the ViewModel of the containing UserControl which is also the DataContext of the parent GridView?

It is important to note that this VM is dynamically instantiated in code and not in XAML of the UserControl because this UserControl is one of several UserContorls which are used as dynamic Content of an area of a parent Window.
Dimitrina
Telerik team
 answered on 02 Sep 2014
2 answers
174 views
Hello,
I'm using the RadRichTextRibbonUI in my application and it seems that resources are missing.
I'm not able to get a German RadRichTextRibbonUI even if I set the languages of my XAML on "de-DE".


Best regards.










Petya
Telerik team
 answered on 02 Sep 2014
1 answer
197 views
Hello

I would like to know how I could fill all empty space in a RadRibbonTab with a RadRibbonGroup.
Martin Ivanov
Telerik team
 answered on 02 Sep 2014
2 answers
119 views
hello, i am trying to replace my radchart with a radchartview,
but i stumble on this problem  : the lines connecting my values are not drawn ( using line series)
( i am using a DateTimeCategoricalAxis because i only want ticks for dates with actual records in my itemsource,
and don't need the distance between 2 values to be an indication of the time between, the production environment wil have multiple values on some day, and none on others, but i dont think is the cause of my problem   )
( screenshot to show the resulting window)
viewmodel :
public class ViewModel
{
public ViewModel()
{
List<TestItem> items = new List<TestItem>();
for (int i = 1 ; i< 20; i++){
var r = new TestItem();

r.Datum = DateTime.Now.AddDays(-1 * i * i /** 10 / 3*/);
if (( i % 2) == 0){
r.Waarde1 = DateTime.Now.Second / i;
}
if ((i % 3) == 0)
r.Waarde2 = DateTime.Now.Millisecond / i;
if ((i % 5) == 0)
r.Waarde3 = DateTime.Now.Second;
items.Add(r);
}
Items = items;
 }
public List<TestItem> Items { get; set; }
}

public class TestItem {

public DateTime Datum { get; set; }
public decimal? Waarde1 { get; set; }
public decimal? Waarde2 { get; set; }
public decimal? Waarde3 { get; set; }

public override string ToString()
{
return string.Format(" {0:d} : {1} - {2} - {3} ", Datum,Waarde1,Waarde2, Waarde3);
}
}

<Window x:Class="testChart.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Test="clr-namespace:testChart"
Title="MainWindow" Height="568" Width="828" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Window.Resources>
<Test:ViewModel x:Key="Vm"/>
<SolidColorBrush x:Key="TempColor" Color="Brown" />
<SolidColorBrush x:Key="GewichtColor" Color="#FF25A0DA" />
<SolidColorBrush x:Key="PijnColor" Color="#FFFF6900" />
</Window.Resources>
<Grid DataContext="{StaticResource Vm}" Height="517" Width="783">
<telerik:RadCartesianChart HorizontalAlignment="Left" Margin="0,12,0,0" Name="radCartesianChart1" VerticalAlignment="Top" Height="465" Width="654">
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartPanAndZoomBehavior />
</telerik:RadCartesianChart.Behaviors>
 <telerik:RadCartesianChart.Grid>
<telerik:CartesianChartGrid MajorLinesVisibility="XY" MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5">
 </telerik:CartesianChartGrid>
</telerik:RadCartesianChart.Grid>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:DateTimeCategoricalAxis LineThickness="1" MajorTickInterval="1" MajorTickLength="5" TickThickness="1" LabelFormat="ddMMyyyy" LabelFitMode="Rotate" />
</telerik:RadCartesianChart.HorizontalAxis>
 <telerik:LineSeries ItemsSource="{Binding Path=Items}" CategoryBinding="Datum" ValueBinding="Waarde1" CombineMode="Stack" StrokeThickness="1" ShowLabels="True" Stroke="Red">
<telerik:LineSeries.StrokeShapeStyle>
<Style TargetType="Path">
<Setter Property="Stroke" Value="Red"/>
<Setter Property="StrokeDashArray" Value="10 5"/>
<Setter Property="StrokeThickness" Value="3"/>
</Style>
</telerik:LineSeries.StrokeShapeStyle>
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis LineStroke="Red" Background="Red" BorderThickness="1">
  </telerik:LinearAxis>
</telerik:LineSeries.VerticalAxis>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="AliceBlue" Height="10" Width="10"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
</telerik:LineSeries>
<telerik:LineSeries ItemsSource="{Binding Path=Items}" StrokeThickness="10" ShowLabels="False" Stroke="Blue" CombineMode="Stack" BorderThickness="1">
<telerik:LineSeries.CategoryBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Datum" />
</telerik:LineSeries.CategoryBinding>
<telerik:LineSeries.ValueBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Waarde2" />
</telerik:LineSeries.ValueBinding>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="Blue" Height="10" Width="10"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis LineStroke="Green" Background="#FF001900" BorderThickness="1" />
</telerik:LineSeries.VerticalAxis>
</telerik:LineSeries>
<telerik:LineSeries ItemsSource="{Binding Path=Items}" StrokeThickness="10" ShowLabels="True" Stroke="#FF000019">
<telerik:LineSeries.CategoryBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Datum" />
</telerik:LineSeries.CategoryBinding>
<telerik:LineSeries.ValueBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Waarde3" />
</telerik:LineSeries.ValueBinding>
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis LineStroke="Red" Background="#FF001900" BorderThickness="1" />
</telerik:LineSeries.VerticalAxis>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="Red" Height="10" Width="10"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
</telerik:LineSeries>
</telerik:RadCartesianChart>
 </Grid>
</Window>
stijn Ver Eecke
Top achievements
Rank 1
 answered on 02 Sep 2014
1 answer
105 views
Can some please help me, I cannot seem execute a delete operation when one item is inside my observable collection and binds to the RadDataForm, however when I bind 2 or more items I can  then perform delete up until one item remains then β€œCurrentItem” is null. why is that ???

The offending snippet takes place here.  

private void UserDetailsRadDataForm_OnDeletedItem(object sender, ItemDeletedEventArgs e)
    {
        try
        {
            SessionManager.Bind();
            var user =  UserDetailsRadDataForm.CurrentItem as UserModel;
            _userDetailsViewModel.DeleteUser(user);
        }
        finally
        {
            SessionManager.Unbind();
        }
    }
Boris
Telerik team
 answered on 02 Sep 2014
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?