Telerik Forums
UI for WPF Forum
0 answers
119 views
Hello,
I need to D&D from GridView to TreeView (+ Treeview on itself).
Everything is OK, based on the examples that are in the WPF Demo (TreeViewDragDropBehavior & GridViewDragDropBehavior).
The problem is I'm not able to reproduce the standard behavior like the one in Windows  explorer :
- If the node is not expanded, I need to expand it after a delay. I tried the DropExpandDelay, but without any success
- There's no effect to show I'm over a node ("over" effect).
Any advices will be welcome
Best regards
Xavier
Top achievements
Rank 1
 asked on 06 Feb 2014
1 answer
240 views
Hello I've a RadGridView that is placed withing a RadWindow and wrapped within an UserControl.

The RadWindow will be initialized by an ContextMenu of a parent RadGridView (selected item) please see the code snippets below.

Code from the ContextMenu to open a new RadWindow:

var tmpItem = row.Item as ItemModel;
.....
case "ViewRelatedItems":
         if ( tmpItem != null )
         {
             RadWindow radWindow = new RadWindow();
             radWindow.Width = 510;
             radWindow.Height = 350;
  
             UserControlRelatedItemsEntries ucTmp = new UserControlRelatedItemsEntries(tmpItem.ID, tmpItem.Type);
               
             radWindow.Content = ucTmp;
             radWindow.Owner = Application.Current.MainWindow;
             radWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
             radWindow.ResizeMode = ResizeMode.NoResize;
             radWindow.Header = "Entries:"; //TODO
             radWindow.Show();
         }
         break;


XAML of the UserControl:
<UserControl x:Class="TEST..UserControlViewEntries"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:viewModel="clr-namespace:test.ViewModels;assembly=Test.ViewModels"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="500">
    <UserControl.DataContext>
        <viewModel:MyViewModel />
    </UserControl.DataContext>
    <Grid>
         
        <telerik:RadGridView x:Name="radGridEntries" Margin="0,30,0,0"
                             ItemsSource="{Binding Entries}"
                             AutoGenerateColumns="False" DataLoadMode="Asynchronous">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UserName}" Header="User"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Date}" Header="Date"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding XDoneAsString}" Header="XDone"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Type}" Header="Type"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>

Code of the ViewModel
public class MyViewModel : ObservableObjectBase
    {
        #region Properties
        public int SelectedItemID { get; set; }
        public int SelectedItemTypeID { get; set; }
 
        private ObservableCollection<XModel> _items;
 
        public ObservableCollection<XModel> Entries
        {
            get
            {
                if ( _items == null )
                {
                    _items = new ObservableCollection<XModel>();
 
                    var tmpResults = DataService.GetItems( this.SelectedItemID, this.SelectedItemTypeID);
                    tmpResults.ForEach( i => _items.Add( i ) );
                }
                return _items;
            }
        }
        #endregion
 
        #region Methods
         
        #endregion
 
        #region Constructors
        public MyViewModel ()
        { }
        #endregion
    }

I come here not further...

How can i put the two required values ​​SelectedItemID and SelectedItemTypeID to the ViewModel, so that they can be used when the DataBinding request the the Entries?

I'll hold this 2 values inside the ContextMenu "tmpItem" (e.g. tmpItem.ID and tmpItem.Type) but i've no idea how i could put that throuth the UserControl and ViewModel.

I think I am using the wrong approach... hopefully someone could give me an idea how to solve this issue. 

Any help on this would be very welcome!

Kind regards
Daniel


Dimitrina
Telerik team
 answered on 06 Feb 2014
3 answers
150 views
Hi!

I have a case where setting the IsHidden property to "false" expands the hidden pane, but does not draw the content.
When I then toggle the IsHidden property to true and fals again, the content is displayed correctly!

What can be the cause of this?

Regards,
Lennart
Konstantina
Telerik team
 answered on 06 Feb 2014
12 answers
978 views
I've seen a few examples -    most Silverlight  :-(     - where you bind the RadRichTextBox to an "item"-object or data from a DataBase.
But how could this be done to a RadRichTextBox.Document.
Say I get a datarow from a table and I want to create a new document with content/text from this datarow.

Missing User
 answered on 06 Feb 2014
4 answers
165 views
I am unable to get touch scrolling to work properly on my grid view.  When I scroll using the mouse everything works perfectly, but if I use a finger the scroll always jumps to either the first or last record in the list. 

Ideas/Suggestions?

D
David
Top achievements
Rank 1
 answered on 06 Feb 2014
5 answers
214 views

Hi, we're experiencing what looks like a bug in the RadDatePicker control.

I've set the culture in the App.xaml.cs file, and the DatePicker correctly displays the dates as intended:

/// <summary>
    /// The main application class.
    /// </summary>
    public partial class App
    {
        #region Constructor
        /// <summary>
        /// Initializes a new instance of <see cref="App" />.
        /// </summary>
        public App()
        {
            StyleManager.ApplicationTheme = new Windows8Theme();
            InitializeComponent();
 
            Windows8Palette.Palette.AccentColor = (Color)Resources["AccentColor"];
 
            ConfigureCulture();
        }
        #endregion
 
        #region Private Methods
        /// <summary>
        /// Configures the culture for the application.
        /// </summary>
        private static void ConfigureCulture()
        {
            // set the default culture to English (AU)
            // ReSharper disable UseObjectOrCollectionInitializer
            var culture = new CultureInfo("en-AU");
 
            // ReSharper restore UseObjectOrCollectionInitializer
            // long date format is used on date controls ("D")
            culture.DateTimeFormat.LongDatePattern = "ddd d-MMM-yyyy";
 
            // short date format is used in grids ("d")
            culture.DateTimeFormat.ShortDatePattern = "dd-MMM-yy";
 
            Thread.CurrentThread.CurrentCulture = culture;
            Thread.CurrentThread.CurrentUICulture = culture;
        }
        #endregion
    }

However when a user types in '25-9-13', as soon as they type the '9', the date is shown as  'Mon 1-9-2025' in the tooltip, ie, it suddenly flips the format to yy-mm-dd.

Note that this is not a problem in the corresponding Silverlight control - typing '25-9' correctly shows 'Wed 25-Sep-2013' in the tooltip.

Is this a bug, or something that we can resolve somehow?

Thanks

Sam
Konstantina
Telerik team
 answered on 06 Feb 2014
1 answer
133 views
Hi,
I have been working on a project with TreelistView and DragDropManager.
I have a treelistview and i want to drag and drop the items in it.
For example, my treelistview items are like that.

Main_1
- Sub 1_1
- Sub 1_2
Main_2
- Sub 2_1
- Sub 2_2
- Sub 2_3

and i want to drag (Sub 2_2) from (Main_2) to (Main_1). But i can't find the drop position of dragging item, and how can i use this drop position to find the item which dragging item is dropped on.

One more question:
var item = (args.OriginalSource as FrameworkElement).ParentOfType<???????>() -->> What is the correct type for treelistview.

a basic example could help me.
with kind regards








Nick
Telerik team
 answered on 06 Feb 2014
1 answer
243 views
Hi,

I'm having trouble with the IsHidden binding of my RadPanes. If I have 2 or more RadPanes within a RadPaneGroup and have their IsHidden properties bound to a static class boolean property, only 1 of the multiple panes within the RadPane group hides when I toggle the property from false to true.

All IsHidden bindings are working, there appears to be a bug when toggling the binding on more than one RadPane within a RadPaneGroup. 

I'm using library 2013.1.220.40.


XAML Example:
<telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
       <telerikDocking:RadPaneGroup>
 
           <!-- Modification Pane -->
            <TAS2DockingPanes:ModificationsPane x:Name="radPaneModifications" CanUserClose="False" CanDockInDocumentHost="False" IsHidden="{Binding Source={x:Static TAS2DockingPanes:VisibilitySettings.Instance}, Path=CanViewModificationsPane, Converter={StaticResource boolToReverseConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
 
            <!-- Pricing Pane -->
             <TAS2DockingPanes:ExtrasPricingPane x:Name="radPanePricingExtras" CanUserClose="False" CanDockInDocumentHost="False" IsHidden="{Binding Source={x:Static TAS2DockingPanes:VisibilitySettings.Instance}, Path=CanViewExtrasPricingPane, Converter={StaticResource boolToReverseConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
 
         </telerikDocking:RadPaneGroup>
</telerikDocking:RadSplitContainer>


Static Class
public class VisibilitySettings : INotifyPropertyChanged
{
    private static readonly VisibilitySettings instance = new VisibilitySettings();
    private VisibilitySettings() { }
 
 
    public static VisibilitySettings Instance
    {
        get
        {
            return instance;
        }
    }
 
 
    private static bool m_canViewExtrasPricingPane;
    private static bool m_canViewModificationsPane;
 
 
 
    public static void SetVisibilitySettings(bool canViewExtrasPricingPane, bool canViewModificationsPane)
    {
        Instance.CanViewExtrasPricingPane = canViewExtrasPricingPane;
        Instance.CanViewModificationsPane = canViewModificationsPane;
    }
 
    public bool CanViewExtrasPricingPane
    {
        get
        {
            return m_canViewExtrasPricingPane;
        }
        set
        {
            m_canViewExtrasPricingPane = value;
            OnPropertyChanged(new PropertyChangedEventArgs("CanViewExtrasPricingPane"));
        }
    }
 
 
    public bool CanViewModificationsPane
    {
        get
        {
            return m_canViewModificationsPane;
        }
        set
        {
            m_canViewModificationsPane = value;
            OnPropertyChanged(new PropertyChangedEventArgs("CanViewModificationsPane"));
        }
    }
 
 
    //INotifyPropertyChanged Event
    public event PropertyChangedEventHandler PropertyChanged;
    public void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
 
}


Has anyone else noticed such behaviour?


Many thanks,

Rob
George
Telerik team
 answered on 06 Feb 2014
1 answer
125 views
Hi,
I've a tree of files managed with a RadTreeView and I need to select a RadTreeViewItem and display its content on a RadDiagram with a drag and drop operation (in style of Visual studio)
How can I do this? I've already followed several tutorial on this web site without success.

Thanks
C
Tina Stancheva
Telerik team
 answered on 06 Feb 2014
2 answers
730 views
A picture is worth a thousand words, so I attach you my need.

Obvioulsy such image belong to the classical GridView incorporated by defaul on VS Studio 2012 stuff.

That's the XAML code for that:

<DataGridTemplateColumn Header="Actual" Width="80" Visibility="Visible">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <ProgressBar Value="{Binding Path=Stock_Actual, Mode=OneWay}" Minimum="0" Maximum="{Binding Stock_max}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
Thanks in advance for your help,
Enric
Top achievements
Rank 1
 answered on 06 Feb 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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?