Telerik Forums
UI for WPF Forum
1 answer
83 views

Greetings,

I need to slightly change the GridViewGroupPanel of the WPF GridView to include a close button. After creating a copy of the GridViewGroupPanel Style via Visual Studio, it seems that the visual state changes are no longer firing. I've made no changes to the style after the copy was created, and I can see that the copy contains the visual states for changing the panel text after groups are added, but it doesn't change after dragging a column to the group bar.

Was wondering if perhaps I was missing something? I wouldn't think creating a copy of the control style (no modifications) would disable the visual states..

Vladimir Stoyanov
Telerik team
 answered on 25 Apr 2018
1 answer
156 views

hello,

i am new to the telerik controls and i have a question to the radtreeview.

I have two normal classes and a hierarichal template. Everything works fine and the data is shown in tree.

Instead of the normal class i want to use the radtreeviewitem. I try to inherit wich works for the nodes but

not for the childs. Can you please give me a advice how to do this. Here is my code and my problem is

the Children property in the class recursiveObject. Thank you and greetings ....

public static ObservableCollection<RecursiveObject> FillRecursive(List<FlatObject> flatObjects, int parentId)
{
    ObservableCollection<RecursiveObject> recursiveObjects = new ObservableCollection<RecursiveObject>();
    foreach (var item in flatObjects.Where(x => x.ParentId.Equals(parentId)))
    {
        recursiveObjects.Add(new RecursiveObject
        {
            Data = item.Data,
            NodeId = item.Id,
            Menge = item.Menge,
            Selected = false,
            ParentKey = item.ParentId,
            Children = FillRecursive(flatObjects, item.Id)
        });
    }
    return recursiveObjects;
}
 
public class FlatObject
{
    public int Id { get; set; }
    public int ParentId { get; set; }
    public string Data { get; set; }
    public int Menge { get; set; }
 
    public FlatObject(string name, int id, int parentId, int menge)
    {
        Data = name;
        Id = id;
        ParentId = parentId;
        Menge = menge;
    }
}
 
public class RecursiveObject : RadTreeViewItem
{
    public bool Selected { get; set; }
    public int NodeId { get; set; }
    public int ParentKey { get; set; }
    public string Data { get; set; }
    public int Menge { get; set; }
    public ObservableCollection<RecursiveObject> Children { get; set; }
}
Martin Ivanov
Telerik team
 answered on 25 Apr 2018
4 answers
96 views

Hi, Is there a way to change the ResourceType orientation to vertical, but mantaining the days  in horizontal?

We want to make something like in the attached file.

Greetings.

 

Carlos
Top achievements
Rank 1
 answered on 25 Apr 2018
4 answers
286 views

Hi,

I have a relatively simple RadGridView with a datapager. On one machine everything works fine. However, when I check out the sources to another machine everything works, but the datapager does not display, and there is no indication of an error. Any ideas how I could track this down?

Thanks ... Ed

 

Dilyan Traykov
Telerik team
 answered on 25 Apr 2018
2 answers
235 views

Hi ,

i using MVVM and the problem i have is i capture RowValidating  Event which is routedto a Method OnValidatingRow(arg)

 

DoValidatingRow = new DelegateCommand<object>(OnValidatingRow);

there i checkif valid or not and setting in some cases evnt.IsValid = false;

public override void OnValidatingRow(object arg)
        {
            var evnt = (GridViewRowValidatingEventArgs)arg;

    evnt.IsValid = false;

 

 

 

 

 

<telerik:RadGridView x:Name="LookupListGridCtrl" ItemsSource="{Binding Nodes, Mode=TwoWay}" SelectedItem="{Binding Nodes.SelectedUiDataItem,Mode=TwoWay}"  Grid.Row="1"
                             AutoGenerateColumns="false" GroupRenderMode="Flat" NewRowPosition="Top"  SelectionMode="Single" SelectionUnit="FullRow"
                             CanUserDeleteRows="True" ScrollMode="Deferred" IsSynchronizedWithCurrentItem="True" CanUserResizeColumns="True" CanUserSearch="True"
                             RowIndicatorVisibility="Visible" Margin="0,0,0,1" ValidationType="Default">

            <telerik:EventToCommandBehavior.EventBindings>
                <telerik:EventBinding Command="{Binding CommandProvider.DoDeleteRow}" EventName="Deleted" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoInsertRow}" EventName="RowEditEnded" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoAddNew}" EventName="AddingNewDataItem" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoValidatingCell}" EventName="CellValidating" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoValidatingRow}" EventName="RowValidating" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
            </telerik:EventToCommandBehavior.EventBindings>

Dilyan Traykov
Telerik team
 answered on 25 Apr 2018
9 answers
82 views
I recently had to switch to a new computer, from win 7 to win 10, and after I installed everything, I loaded my project, rebuilt it, and it all works fine(so far) except the RadDiagram control will not display.  What could I be doing/not doing that would cause this.
Dinko | Tech Support Engineer
Telerik team
 answered on 25 Apr 2018
7 answers
168 views

Hi,

 

Sorry if my question has been asked already in this forum.

I'm using a RadMaskedTextInput with a dynamic MASK set in code behind. My current mask is d4Sd3. Therefore, I am expecting 4 digits followed with a capital S and then another 3 digits.

It works well except that in my code behind I would like to get the full content of the input. If I type in 1234567 it displays 1234S567 which is perfect, but then in my code behind I only get 1234567 and the "S" is gone. I need this S to remain in this string. How can I achieve such thing ? This is just an example, it could be any sort of mask.

 

Cheers,

 

Chris

Claire
Top achievements
Rank 1
 answered on 24 Apr 2018
1 answer
131 views

I'm starting to play around with the Telerik RTB and I was wondering if there was a way to get the word under the mouse cursor?

Tanya
Telerik team
 answered on 24 Apr 2018
1 answer
539 views

Hello,

I'm binding to multiple items using PropertySetMode="Intersection" and CurrentPropertySet.  Changes to the properties from the PropertyGrid combobox work as expected, but changes to the objects from anywhere else in the application do not cause the PropertyGrid to update until the item selection is refreshed.  The objects implement INotifyPropertyChanged.  Is there something else I'm missing to get the changes to be shown in the PropertyGrid?

Here is some of the relevant XAML and my view model:

<DataTemplate x:Key="TemplateComboBoxTemplate">
    <telerik:RadComboBox ItemsSource="{Binding Clubs, Source={StaticResource MyViewModel}}"
                         SelectedValue="{Binding CurrentPropertySet[ClubID], Mode=TwoWay}"
                         SelectedValuePath="ID"
                         DisplayMemberPath="Name"
                         Margin="0">
    </telerik:RadComboBox>
</DataTemplate>
 
<telerik:RadPropertyGrid
    Item="{Binding Players}" 
    PropertySetMode="Intersection"
AutoGeneratePropertyDefinitions="True"
    AutoGeneratingPropertyDefinition="RadPropertyGrid_AutoGeneratingPropertyDefinition"/>

 

public class MyViewModel : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;
 
    private ObservableCollection<Club> clubs;
    private ObservableCollection<Player> players;
    private List<Player> playersTemp = new List<Player>();
 
    public MyViewModel()
    {
        clubs = new ObservableCollection<Club>();
        Club club;
 
        // Liverpool
        club = new Club("Liverpool", new DateTime(1892, 1, 1), 45362, 1);
        club.Players.Add(new Player("Pepe Reina", 25, Position.GK, "Spain", 1, true));
        clubs.Add(club);
 
        // Manchester Utd.
        club = new Club("Manchester Utd.", new DateTime(1878, 1, 1), 76212, 2);
        club.Players.Add(new Player("Edwin van der Sar", 1, Position.GK, "Netherlands", 2, false));
        clubs.Add(club);
 
        // Chelsea
        club = new Club("Chelsea", new DateTime(1905, 1, 1), 42055, 3);
        club.Players.Add(new Player("Petr ÄŒech", 1, Position.GK, "Czech Republic", 3, true));
        clubs.Add(club);
 
        // Arsenal
        club = new Club("Arsenal", new DateTime(1886, 1, 1), 60355, 4);
        club.Players.Add(new Player("Manuel Almunia", 1, Position.GK, "Spain", 4, false));
        clubs.Add(club);
 
        players = new ObservableCollection<Player>(clubs.SelectMany(c => c.Players));
    }
 
    public ObservableCollection<Club> Clubs
    {
        get
        {
            return this.clubs;
        }
    }
 
    public ObservableCollection<Player> Players
    {
        get
        {
            return this.players;
        }
    }
 
    internal void ClearPlayers()
    {
        playersTemp.AddRange(players);
        players.Clear();
        OnPropertyChanged(nameof(Players));
    }
 
    internal void SelectPlayers()
    {
        foreach (var player in playersTemp)
        {
            players.Add(player);
        }
        playersTemp.Clear();
        OnPropertyChanged(nameof(Players));
    }
 
    protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
    {
        PropertyChangedEventHandler handler = this.PropertyChanged;
        if (handler != null)
        {
            handler(this, args);
        }
    }
 
    private void OnPropertyChanged(string propertyName)
    {
        this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
    }
}

I prepared a sample project starting from another sample I found on this forum but I was unable to upload. I can provide this if it helps.

Thanks for any help you can offer!

Vladimir Stoyanov
Telerik team
 answered on 24 Apr 2018
1 answer
120 views

Can diagram be painted on intitialization based on input data ?

if i have list of objects and then for each object will be created shape

thank you

Vladimir Stoyanov
Telerik team
 answered on 24 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?