Telerik Forums
UI for WPF Forum
1 answer
102 views
Hello, is there a possibility to place a custom text defined in EventContainerTemplate
outside from gantbar i.e. startdate and enddate at upper left or upper right corner? 

Greetings, Robert
Polya
Telerik team
 answered on 18 Jul 2014
4 answers
98 views
Hi

I need to give to the user the possibility to build filter not only between a Member and a value (like Column1 = 10) but also between two members (like Column1 >= Column2).

How could I do?

Dimitrina
Telerik team
 answered on 18 Jul 2014
1 answer
158 views
how to get current selected row without select row. only when change combobox item.
how to get current grid row according selected combobox?

I want when I select only last combobox to get last grid row item? Hot to do that?

See attached image for more info.

<telerik:GridViewDataColumn Header="NASA - NSSDC ID: ASTRO-1 " Width="350" IsReadOnly="True">
                            <telerik:GridViewDataColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal"  >                                      
                                        <telerikInput:RadComboBox Width="342" ItemTemplate="{StaticResource dtE}" x:Name="rcbEvent"
                                                    ItemsSource="{Binding Path=DataContext.EvCollection, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}} }"                                                                                                      
                                                    SelectedValuePath="ID"
                                                    SelectedValue="{Binding Path=EvField.ID, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay }"
                                                    SelectedItem="{Binding Path=EvField, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay }" SelectionChanged="rcbSo_SelectionChanged" />
                                    </StackPanel>
                                </DataTemplate>
                            </telerik:GridViewDataColumn.CellTemplate>
                        </telerik:GridViewDataColumn>
kity
Top achievements
Rank 2
 answered on 18 Jul 2014
11 answers
315 views
Hi everyone,

I'm creating RadWindow in separate thread, but when I reopen window after closing it , I'm getting System.Threading.Tasks.TaskCanceledException and don't know why. Here is my code

private void OnCreateNewWindow( object sender,  RoutedEventArgs e)
{
 
Thread thread = new Thread(() =>
                    {
 RadWindow win = new RadWindow();
 
 win.Show();
 
                            win.Closed += (sender2, e2) =>
                                {
                                    win.Dispatcher.InvokeShutdown();
                                };  
 
System.Windows.Threading.Dispatcher.Run();
});
 
thread.SetApartmentState(ApartmentState.STA);
                thread.IsBackground = true;
                thread.Start();
}
Tigran
Top achievements
Rank 1
 answered on 18 Jul 2014
4 answers
152 views
Hi,

my approach is to make sure that an appointment has a TimeMarker and a Category.

The TimeMarker is set by code - so I want to remove the TimeMarker Combobox from the edit / create dialog.

The Category on the other hand MUST selected in the "create dialog"...
BUT:
a.) The "Clear" Button in the category combobox should be removed
--NO clear - just mandatory select
b.) The category Combobox should be disabled if the appointment is edited (not newly created)

How can this be done? (Pleas no "Code behind event handlers" if possible)

Manfred
Kalin
Telerik team
 answered on 18 Jul 2014
1 answer
169 views
I have a grid view
<telerik:RadGridView x:Name="SizingGridView" 
                ItemsSource="{Binding Model.SizingUpchargeModels}"
                Style="{StaticResource BaseGrid}"
                ValidatesOnDataErrors="InViewMode"
                IsSynchronizedWithCurrentItem="True"
                ColumnWidth="*" >
                <telerik:RadGridView.Columns>
                    <telerik:GridViewCheckBoxColumn IsSortable="False" Header="Selected" DataMemberBinding="{Binding Selected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" EditTriggers="CellClick" AutoSelectOnEdit="True"/><telerik:GridViewDataColumn Header="Size" IsReadOnly="True" DataMemberBinding="{Binding Size}" IsSortable="False" />
                    <telerik:GridViewDataColumn Header="Upcharge" DataFormatString="C3" 
                                            DataMemberBinding="{Binding UpchargeAmount, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=False, TargetNullValue={x:Static sys:String.Empty}}"
                                            Style="{StaticResource GridErrorDisplay}" EditTriggers="CellClick" IsSortable="False" >
                        <telerik:GridViewDataColumn.CellEditTemplate>
                            <DataTemplate>
                                <commonControls:RadGridMaskedNumericInput Style="{StaticResource GridThreeDecimalAmountTwoDigitsNumericTextEntry}"  IsReadOnly="{Binding Selected,Converter={StaticResource InverseBooleanConverter}}"
                                Value="{Binding Path=UpchargeAmount, TargetNullValue={x:Static sys:String.Empty}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=False}"/>
                            </DataTemplate>
                        </telerik:GridViewDataColumn.CellEditTemplate>
                    </telerik:GridViewDataColumn>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
I need to display only show rows Selected = true on initial load. When I click the filter option it should have the checkbox next to true selected. Now the user can unselect true/ select false or clear filter etc.
How can I achieve this? 


Dimitrina
Telerik team
 answered on 18 Jul 2014
3 answers
211 views
Hi,
I'm using Telerik version 2014.2.617.40. The MaskedtextInput control in Masked Input Text Input Demo has an unexpected behavior.
Here is the configuration I have.
  Mask: (empty)
  Text Mode: MaskedText.
  Input Behavior: Replace
  Selection On Focus: SelectAll
  Update Value Event: PropertyChanged.

Replication Steps:
  1. Type ABC in text input.
  2. Select A. Copy A using Ctrl + C.
  3. Select B. Paste using Ctrl + V.
What I expect: ABC becomes AAC.
Actual result: ABA.

Is it a bug? or should I modify the control properties?
Thanks.

Regards,
Gong
Martin Ivanov
Telerik team
 answered on 18 Jul 2014
2 answers
127 views
hello All,
In my project I've a Module in which I want to Display my 1 Table Data user. So I created a RadGridView. At designer it shows. and Control., Data, Input dlls are also in reference.
When I Run my application I'm getting

 
  Microsoft.Practices.Prism.Modularity.ModuleInitializeException was unhandled by user code
  Message=An exception occurred while initializing module 'AdminModule'.
    - The exception message was: Resolution of the dependency failed, type = "Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab", name = "(none)".
Exception occurred while: Calling constructor Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab(Delasoft.Hpms.Module.Admin.UserTab.ViewModel.IUsersTabViewModel viewModel).
Exception is: XamlParseException - The type 'RadGridView' was not found. [Line: 13 Position: 96]
-----------------------------------------------
At the time of the exception, the container was:
 
  Resolving Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab,(none)
  Calling constructor Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab(Delasoft.Hpms.Module.Admin.UserTab.ViewModel.IUsersTabViewModel viewModel)
 
    - The Assembly that the module was trying to be loaded from was:Delasoft.Hpms.Module.Admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
   
  ModuleName=AdminModule
  StackTrace:
       at Microsoft.Practices.Prism.Modularity.ModuleInitializer.HandleModuleInitializationError(ModuleInfo moduleInfo, String assemblyName, Exception exception)
       at Microsoft.Practices.Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)
       at Microsoft.Practices.Prism.Modularity.ModuleManager.InitializeModule(ModuleInfo moduleInfo)
       at Microsoft.Practices.Prism.Modularity.ModuleManager.LoadModulesThatAreReadyForLoad()
       at Microsoft.Practices.Prism.Modularity.ModuleManager.LoadModuleTypes(IEnumerable`1 moduleInfos)
       at Microsoft.Practices.Prism.Modularity.ModuleManager.LoadModulesWhenAvailable()
       at Microsoft.Practices.Prism.Modularity.ModuleManager.Run()
       at Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.InitializeModules()
       at Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.Run(Boolean runWithDefaultConfiguration)
       at Microsoft.Practices.Prism.Bootstrapper.Run()
       at Delasoft.Hpms.App.Application_Startup(Object sender, StartupEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
  InnerException: Microsoft.Practices.Unity.ResolutionFailedException
       Message=Resolution of the dependency failed, type = "Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab", name = "(none)".
Exception occurred while: Calling constructor Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab(Delasoft.Hpms.Module.Admin.UserTab.ViewModel.IUsersTabViewModel viewModel).
Exception is: XamlParseException - The type 'RadGridView' was not found. [Line: 13 Position: 96]
-----------------------------------------------
At the time of the exception, the container was:
 
  Resolving Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab,(none)
  Calling constructor Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab(Delasoft.Hpms.Module.Admin.UserTab.ViewModel.IUsersTabViewModel viewModel)
 
       TypeRequested=UsersTab
       StackTrace:
            at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
            at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)
            at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
            at Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
            at Delasoft.Hpms.Module.Admin.AdminModule.Initialize()
            at Microsoft.Practices.Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)
       InnerException: System.Windows.Markup.XamlParseException
            Message=The type 'RadGridView' was not found. [Line: 13 Position: 96]
            LineNumber=13
            LinePosition=96
            StackTrace:
                 at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
                 at Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab.InitializeComponent()
                 at Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab..ctor(IUsersTabViewModel viewModel)
                 at BuildUp_Delasoft.Hpms.Module.Admin.UserTab.View.UsersTab(IBuilderContext )
                 at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
                 at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
                 at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
                 at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
            InnerException:

What is Going wrong? Si my Prim  not recognizing or some thing else ? How to resolve this.

Please help.

Greetings
Dimitrina
Telerik team
 answered on 18 Jul 2014
3 answers
287 views
Hello,

I'm trying to implement some Drag and Drop functionality on an inhomogenious RadTreeView. I started from the "Tree to Grid Drag" Demo project.
There you define some DropIndicationDetails to display the input location. However I don't like this style (and the fact that I have to create a datatemplate for drag and drop) - which is why I want to use the default drag/drop appearance with the Windows 8 style (see attached image).

I therefore created a simplified version of the TreeViewDragDopBehavior:

public class TreeViewDragDropBehavior
{
    public static bool GetIsEnabled(DependencyObject obj)
    {
        return (bool)obj.GetValue(IsEnabledProperty);
    }
 
    public static void SetIsEnabled(DependencyObject obj, bool value)
    {
        obj.SetValue(IsEnabledProperty, value);
    }
 
    public static readonly DependencyProperty IsEnabledProperty =
        DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(TreeViewDragDropBehavior),
            new PropertyMetadata(OnIsEnabledPropertyChanged));
 
    public static void OnIsEnabledPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
    {
        if (true.Equals(e.NewValue))
        {
            Initialize(dependencyObject as RadTreeView);
        }
        else
        {
            CleanUp(dependencyObject as RadTreeView);
        }
    }
 
    protected static void Initialize(RadTreeView treeView)
    {
        DragDropManager.AddDragInitializeHandler(treeView, OnDragInitialize, true);
        DragDropManager.AddGiveFeedbackHandler(treeView, OnGiveFeedback, true);
        DragDropManager.AddDragDropCompletedHandler(treeView, OnDragDropCompleted, true);
        DragDropManager.AddDropHandler(treeView, OnDrop, true);
 
        treeView.ItemPrepared += AssociatedObject_ItemPrepared;
    }
 
    protected static void CleanUp(RadTreeView treeView)
    {
        DragDropManager.RemoveDragInitializeHandler(treeView, OnDragInitialize);
        DragDropManager.RemoveGiveFeedbackHandler(treeView, OnGiveFeedback);
        DragDropManager.RemoveDragDropCompletedHandler(treeView, OnDragDropCompleted);
        DragDropManager.RemoveDropHandler(treeView, OnDrop);
    }
 
    static void AssociatedObject_ItemPrepared(object sender, RadTreeViewItemPreparedEventArgs e)
    {
        DragDropManager.RemoveDragOverHandler(e.PreparedItem, OnItemDragOver);
        DragDropManager.AddDragOverHandler(e.PreparedItem, OnItemDragOver);
    }
 
    private static void OnDragInitialize(object sender, DragInitializeEventArgs e)
    {
        var treeViewItem = e.OriginalSource as RadTreeViewItem ?? (e.OriginalSource as FrameworkElement).ParentOfType<RadTreeViewItem>();
        var data = treeViewItem != null ? treeViewItem.Item : (sender as RadTreeView).SelectedItem;
 
        var payload = DragDropPayloadManager.GeneratePayload(null);
        payload.SetData("DraggedData", data);
 
        e.Data = payload;
        e.DragVisualOffset = e.RelativeStartPoint;
        e.AllowedEffects = DragDropEffects.All;
    }
 
    private static void OnGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs e)
    {
        e.SetCursor(Cursors.Arrow);
        e.Handled = true;
    }
 
    private static void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
    {
        e.Handled = true;
    }
 
    private static void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
    {
    }
 
    private static void OnItemDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
    {
        e.Effects = DragDropEffects.All;
        e.Handled = true;
    }
}

However, although I set 'e.Effects = DragDropEffects.All' in the OnItemDragOver method, it always shows the forbidden icon (in the OnDrop method, the Effects are correct). If I do not set the payload (by simply commenting out this line in the OnDragInitialize method), I get the expected appearance as in the screen shot. However - the OnItemDragOver method is never called. Therefore, I don't have any possibility to manually override the e.Effects settings.

Is there any way to influence the effects if I dont set the payload manually? Or alternatively to show the correect drop position without having handle it manually?

By the way - there is a very severy memory leak in your original example! You store the TreeViewDragDropBehavior in a static dictionary, together with the RadTreeView. This keeps the TreeViewDragDropBehavior, its associated RadTreeView, it's TreeViewItems and the corresponding data alive forever.

Alexander Müller
Petar Mladenov
Telerik team
 answered on 18 Jul 2014
1 answer
140 views
Hi,
I'm using RadTabControl and i have a problem with reloading. If add two tabs and edit first tab content and go to second tab and come back it lost the content. If I edit any tab content and click to this tab title and go to another tab and come back it binds and chenges context. I have a lost focus event for textbox(content) if i set break point  to lost focus event and after running i test all situation it's good working but i need to change Note.Content property in lost focus by binding Content textbox with content property. Content property is in Note class.
Can anybody help me?
Please advice as soon as possible
Thanx Jamshed
Jamshed
Top achievements
Rank 1
 answered on 18 Jul 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
PersistenceFramework
DataPager
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
ProgressBar
Sparkline
LayoutControl
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
Rating
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?