Telerik Forums
UI for WPF Forum
2 answers
131 views
We have a grid with its ItemsSource bound to a QCV (and an EF query as source). There has to be a sorted column so that Paging works properly. However, I can also completely remove a sort which means paging is no longer working. How can I prevent the user from "un-sorting" a column? What I would like to have is instead of a threestate sorting (asc, desc, unsorted) only a twostate sorting (asc, desc). Any idea?

Regards
Neils
Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 14 Dec 2014
4 answers
173 views
Hi,

In a separate thread (so I can't access RadRichTextBox object) I manipulate a RadDocument.
Now, I want to copy the TableCell "source" into the TableCell "destination"

For the style and options I use:
destination.CopyPropertiesFrom(source);

For the content I use:
foreach (Block b in source.Blocks)
destination.Blocks.Add((Block)b.CreateDeepCopy());

All work good but, then CreateDeepCopy method generates a document that is not possible to export as pdf.
Workarounds?

Thank,
marc.
Tanya
Telerik team
 answered on 13 Dec 2014
7 answers
138 views
Hello,

Could you please specify how can a button placed in the CellTemplate tag of a GridViewDataColumn (1) map the row in which the button is placed at click?
In my implementation, I need to embed buttons in each row of a specific column in order to remove those rows. The button is bound to a command which removes the CurrentItem from the ListCollectionView bound to the GridView (2).
However, clicking the embedded button doesn't mark its row as the selected one and the command removes the row which is marked as Selected in the GridView (by clicking on one of the columns which don't embed the mentioned button).
In conclusion, the button is supposed to mark its row as selected when clikcked, in order for the bound Command to remove the desired row, without having to click on the row (thus selecting it) and then click on the button.




Boris
Telerik team
 answered on 12 Dec 2014
1 answer
67 views
We are using default Telerik Spell Check in our Rad RichTextBox.

We found that Spellcheck is not checking Hyperlinks Text.

Is there any way to make spellcheck work for the hyperlinks?
Svetoslav
Telerik team
 answered on 12 Dec 2014
3 answers
154 views
Hey all.

So I'm in the middle of evaluating the RadTreeView control, and so far, it leaps ahead of other controls I've evaluated. I'm exploring the Drag/Drop functionality at the moment, but am really struggling, as I've not been able to find a consistent approach to tackle the problem in the online documentation.

I've basically got a RadTreeView and a RadListBox, each of their viewmodels have an ObservableCollection of HierachicalData. I can drag within the control, and between like controls (RadListBox to RadListBox), but can't get it working between the two.

I've attached my solution - when dragging from the TreeView, you can see the drop indicator on the ListBox, but drop is disabled.

My tree view looks like this :
<telerik:RadTreeView x:Name="TreeView" Grid.Row="1"
    ItemsSource="{Binding Items}" ItemTemplate="{StaticResource ParentTemplate}"
    SelectionMode="Multiple" SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
    IsDragDropEnabled="True" AllowDrop="False" >
    <telerik:RadTreeView.ItemContainerStyle>
        <Style TargetType="telerik:RadTreeViewItem">
            <Setter Property="IsSelected" Value="{Binding Path=Select, Mode=TwoWay}" />
            <Setter Property="IsExpanded" Value="{Binding Path=Expand, Mode=TwoWay}"></Setter>
        </Style >
    </telerik:RadTreeView.ItemContainerStyle>
</telerik:RadTreeView>
.. with the following VM ...
public class TelerikTreeViewModel : ReactiveScreen
    {
        private ObservableCollection<HierachicalData> _items;
        private HierachicalData _selectedItem;
 
        public TelerikTreeViewModel()
        {
            DisplayName = "Telerik Tree";
            Items = new ObservableCollection<HierachicalData>
            {
                new HierachicalData
                {
                    Name = "Parent", Expand = true, Select = true,
                    Children = new ObservableCollection<HierachicalData>
                    {
                        new HierachicalData {Name = "Child 1"},
                        new HierachicalData {Name = "Child 2", Select = true}
                    }
                },
                new HierachicalData
                {
                    Name = "Parent 2",Expand = true,
                    Children = new ObservableCollection<HierachicalData>
                    {
                        new HierachicalData {Name = "Child 12", Select= true},
                        new HierachicalData {Name = "Child 22"}
                    }
                }
            };
        }
 
        public ObservableCollection<HierachicalData> Items
        {
            get { return _items; }
            set { this.RaiseAndSetIfChanged(ref _items, value); }
        }
 
        public HierachicalData SelectedItem
        {
            get { return _selectedItem; }
            set { this.RaiseAndSetIfChanged(ref _selectedItem, value); }
        }
    }
 
    public class HierachicalData : ReactiveObject
    {
        private string _name;
        private ObservableCollection<HierachicalData> _children;
        private bool _isSelected;
        private bool _expand;
 
        public HierachicalData()
        {
             
        }
 
        public string Name
        {
            get { return _name; }
            set { this.RaiseAndSetIfChanged(ref _name, value); }
        }
 
        public ObservableCollection<HierachicalData> Children
        {
            get { return _children; }
            set { this.RaiseAndSetIfChanged(ref _children, value); }
        }
 
        public bool Select
        {
            get { return _isSelected; }
            set
            {
                this.RaiseAndSetIfChanged(ref _isSelected, value);
            }
        }
 
        public bool Expand
        {
            get { return _expand; }
            set { this.RaiseAndSetIfChanged(ref _expand, value); }
        }
    }

And my RadListBox looks like this
<Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"/>
            <Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
            <Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold"/>
        </Style>
 
<telerik:RadListBox x:Name="ListBox" ItemsSource="{Binding Items}"
             ItemTemplate="{StaticResource ListBoxItemDataTemplate}"
             ItemContainerStyle="{StaticResource DraggableListBoxItem}"
             >
        <telerik:RadListBox.DragDropBehavior>
            <telerik:ListBoxDragDropBehavior/>
        </telerik:RadListBox.DragDropBehavior>
        <telerik:RadListBox.DragVisualProvider>
            <telerik:ScreenshotDragVisualProvider />
        </telerik:RadListBox.DragVisualProvider>
        <telerik:RadListBox.DropVisualProvider>
            <telerik:LinearDropVisualProvider />
        </telerik:RadListBox.DropVisualProvider>
    </telerik:RadListBox>

With the following VM :
public class DataItemDropViewModel : ReactiveScreen
    {
        public DataItemDropViewModel()
        {
            Items = new ObservableCollection<HierachicalData>
            {
                new HierachicalData{Name = "Hello"},
                new HierachicalData{Name = "Hello2"},
                new HierachicalData{Name = "Hello3"},
            };
        }
 
        private ObservableCollection<HierachicalData> _items;
        public ObservableCollection<HierachicalData> Items
        {
            get { return _items; }
            set { this.RaiseAndSetIfChanged(ref _items, value); }
        }
    }


These exist in seperate user controls, with their own viewmodels. There is no code behind as I'm attempting to leverage as much of the existing framework as possiblle. I'm using the following version of the Telerik dlls 2014.2.729.45
Kalin
Telerik team
 answered on 12 Dec 2014
3 answers
127 views
Hi Telerik Team,

I'm using a RadGridView with a group descriptor to categorize items belonging to the same group:

<telerik:RadGridView.GroupDescriptors>
<telerik:GroupDescriptor Member="GroupData.Name" />
</telerik:RadGridView.GroupDescriptors>

The problem is that, in order to initialize the application, I needed to define a Dummy group that contains 0 items. The dummy group gets removed once the user makes a selection on the actual groups he wants to analyze.
I don't want the Dummy group to be shown in the grid when the application is loaded. Is there a way to hide it?

Thanks,
Valerio
Valerio
Top achievements
Rank 1
 answered on 12 Dec 2014
14 answers
587 views
Does gridview support a way to have a header over multiple columns?  For example, I have 3 columns, History Week 1, History Week 2, History Week 3.  Is it possible to have another header over these three columns (grouped together) that says History?
Dimitrina
Telerik team
 answered on 12 Dec 2014
1 answer
118 views
I've got a Nullable Datetime GridViewDataColumn, and if I follow the following steps I'm getting a validation/binding error:

1)  Start with a blank column
2)  Double-click the column to activate editing but don't type anything, or if you type anything, delete it.
3)  Click on any other part of the grid

Validation Error:  Object of type System.String cannot be converted to System.Nullable [System.DateTime]

If I start with a column that has data in it and delete it, things work fine.  But if I start to edit an empty field and try to leave it while it is still empty, I get this error.
Once the error is up, you can't seem to do anything on the grid until you hit the ESC key, which is confusing our users.

Is something I can do so that leaving the column while it is still empty will be validated properly?  This shouldn't be creating a validation problem with a Nullable DateTime.

Thanks.
​
Maya
Telerik team
 answered on 12 Dec 2014
3 answers
415 views
I am using a GridView with a CellEditTemplate to display a DatePicker with the date selection mode set to "Month".  However this then meant that the CellValidation's event argument e.NewValue didn't contain the value selected by the user; rather it contained a minimum date value (#12:00:00am#).

After sifting through numerous articles searching for a resolution to this problem - the majority in this forum which referred to creating custom validation procedures and deriving new column types and another explaining the Validation Lifecycle that gave absolutely no information on cell validating using editing templates (and none that gave any examples) - I finally came across this article http://www.telerik.com/forums/custom-template-in-grid that explained you simply had to use "e.EditingElement" to gain access to the editor used in the cell.

I am raising this thread in the hope that other users will be able to quickly locate the solution to this problem and not waste hours of their time.
Boris
Telerik team
 answered on 12 Dec 2014
1 answer
98 views
Is it possible to have the tabstrip in a separate container from the content? I'd like the tabs to be in a grid located in one area of my application. I would then like the content to show up in a separate grid in a different location.

Thanks for the help!

Pavel R. Pavlov
Telerik team
 answered on 12 Dec 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?