Telerik Forums
UI for WPF Forum
2 answers
677 views
Hi,

I have a custom control based off a standard WPF control:

Public Class SendButton
    Inherits System.Windows.Controls.Button

I have also themed standard WPF controls to adopt the current Telerik theme in the Application.Resources of the main app:

<ResourceDictionary
    <Style
        TargetType="{x:Type Button}">
        <Setter
            Property="telerik:StyleManager.Theme"
            Value="{x:Static telerik:StyleManager.ApplicationTheme}" />
    </Style>

Standard WPF controls successfully inherit the Telerik theme, however custom controls based off standard WPF controls do not inherit the Telerik theme.

How can I theme my custom controls to inherit the Telerik theme? I do not want to the change the inheritance of the custom control to a Telerik control to keep the controls as lightweight as possible (the custom controls do not require the additional features of the Telerik controls). I would like to maintain a consistent user experience over the entire solution and theme my custom controls with the Telerik theme.

Kind regards,
Dave.
David
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
162 views
Hello

I have tried to link my data model with SQLite database using configuration file and it works fine but i faced this problem.
When i tried an example of the data model (Classes) and data access layer the in same project it works fine, but when i separated the data model in a class library it always gives this error when i tried to get the Scope:

theObjectScopeProvider1.myScope = GetNewObjectScope();
// The Error  : Could not load file or assembly 'System.Data.SQLite'

I added the reference of 'System.Data.SQLite' to class library as usual and it was working when i convert the project from class library to Console application and invoke the scope.
By the way i tried to load the assembly dynamically from the AdjustForDynamicLoad function but nothing changed:
static public void AdjustForDynamicLoad()
        {
            Assembly SQLiteAssembly = Assembly.LoadFile(@"C:\Lib\System.Data.SQLite.DLL");
            if( theObjectScopeProvider1 == null )
                theObjectScopeProvider1 = new ObjectScopeProvider1();
 
            if( theObjectScopeProvider1.myDatabase == null )
            {
                string assumedInitialConfiguration =
                           "<openaccess>" +
                               "<references>" +
                                   "<reference assemblyname='PLACEHOLDER' configrequired='True'/>" +
                                   "<reference assemblyname='PLACEHOLDEZ' configrequired='False'/>" +
                               "</references>" +
                           "</openaccess>";
                System.Reflection.Assembly dll = theObjectScopeProvider1.GetType().Assembly;
                assumedInitialConfiguration = assumedInitialConfiguration.Replace("PLACEHOLDER", dll.GetName().Name);
                //assumedInitialConfiguration = assumedInitialConfiguration.Replace("PLACEHOLDEZ", SQLiteAssembly.GetName().Name);
                System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
                xmlDoc.LoadXml(assumedInitialConfiguration);
                Database db = Telerik.OpenAccess.Database.Get("SQLiteDatabaseConnection",
                                            xmlDoc.DocumentElement,
                                            new System.Reflection.Assembly[] { dll, SQLiteAssembly. } );
 
                theObjectScopeProvider1.myDatabase = db;
            }
        }
 
So, the problem is how to add reference or assembly to the scope.

Thanks in advance.
zenus
Top achievements
Rank 1
 answered on 09 Aug 2011
5 answers
263 views
As the title implies, I'm having trouble implementing a stand-alone RadClock (no TimePicker involved) control in my WPF app. Before the latest upgrade (my current version is Q1 2011), it worked smoothly (i set the Culture property to get rid of the 'AM/PM' suffixes), but now it just won't show the times from 0:00 to 23:00. My attempt:

<telerik:RadClock HorizontalAlignment="Left" Margin="1,7,0,0" Name="radTimeFrom" Culture="sl-SI"  VerticalAlignment="Top" Width="166" Height="145">
           <telerik:RadClock.Header>
               <TextBlock Text="From" Foreground="White"/>
           </telerik:RadClock.Header>
       </telerik:RadClock>

Any ideas as to why this thing doesn't work anymore? :)

EDIT: I tried reverting to an older version of the Telerik controls (ver. Q3 2009 SP2) and it works just fine.
EDIT2: But, of course, this is not a solution, because i would still like to have the latest Telerik controls installed, therefore reverting in my case is out of the question. Any info would be greatly appreciated :)



Thanks in advance,
Concerned Developer
Sandi Markon
Top achievements
Rank 1
 answered on 09 Aug 2011
1 answer
160 views
Hi, i have a project where i use your RadGridView Control, and pass an IQueryable as the ItemsSource property, but the following is happening:

When i select one of the checkboxes from a columnfilter, all works ok (only the items represented by the selected value appears), but when i unchecked it nothing appears in the gridview (the grid view shows no data [no lines]), but the sql that is passed to the database is ok! (i got it with the SqlServer Profile), the same doesn't happen if i click the clear filter button (all the data is showed in the grid).

Regards,
Miguel Freire
Rossen Hristov
Telerik team
 answered on 09 Aug 2011
3 answers
201 views
I'm having issues trying to bind IsExpanded to a bool property

<telerik:RadTreeListView.RowStyle>
    <Style TargetType="{x:Type telerik:TreeListViewRow}">
        <!--<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />-->
        <Setter Property="IsExpanded" Value="True" />
    </Style>
</telerik:RadTreeListView.RowStyle>

First I tried using first setter but I would get exceptions.
Then I tried to bind to the second to isolate the issue. This is the exception I get:


Message:
Object reference not set to an instance of an object.

Stack:
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.OnItemAdded(Object item, Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:line 2442
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:line 2411
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:line 2290
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 665
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 642
   at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 1046
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:line 33
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 677
   at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChangedWithAdjustedArgs(NotifyCollectionChangedEventArgs originalArguments, Int32 adjustedOldIndex, Int32 adjustedNewIndex) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1133
   at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1053
   at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 983
   at Telerik.Windows.Data.HierarchicalCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\HierarchicalCollectionView.cs:line 249
   at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1343
   at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1328
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:line 33
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)

The exception occurs when I'm adding a new item to the IEnumerable source that the RadTreeListView is bound to. It is bound to an observable collection (And the bottom 4 lines of the stack are from the Observable collection)




Is there a better way of binding to the IsExpanded property?

v.2011.1.315.35
Vlad
Telerik team
 answered on 09 Aug 2011
0 answers
158 views
Hello,
I want to copy multiple rows from excel and paste them to my grid. At my first copy action all off the rows are copied. but when i try to copy other rows, blank cells-rows are pasted to the grid. i have checked Clipboard.GetText(); but it is not empty.
I have a grid like below
<telerik:RadGridView AutoGenerateColumns="False" Margin="5" ShowGroupPanel="False" HorizontalAlignment="Left"
                             Name="DataGridProducts" IsFilteringAllowed="False" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
                             AncestorType={x:Type local:PageUpdateProductMainFields}},Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Path=Products}"
                             Pasting="DataGridProducts_Pasting" KeyDown="DataGridProducts_KeyDown">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Malzeme Kodu"  DataMemberBinding="{Binding ItemStockCode}" Width="150"/>
                <telerik:GridViewDataColumn Header="Malzeme Adı" DataMemberBinding="{Binding ItemName}" Width="150"/>
                <telerik:GridViewDataColumn Header="Alış Fiyatı"  DataMemberBinding="{Binding IncomePrice}" Width="100"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

the items source and the events in the grid is below
private DynaList<Product> _Products;
public DynaList<Product> Products
{
    get
    {
        if (_Products == null)
            _Products = new DynaList<Product>();
        return _Products;
    }
    set
    {
        _Products = value;
    }
}
public void AddEmptyProduct()
{
    Product tempProduct = new Product();
    Products.Insert(Products.Count, tempProduct);
}
 
private void DataGridProducts_Pasting(object sender, Telerik.Windows.Controls.GridViewClipboardEventArgs e)
{
    string nodes1 = Clipboard.GetText();
    string[] nodes2 = nodes1.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
    for (int i = 1; i < nodes2.Count(); i += 1)
    {
        AddEmptyProduct();
    }
}
 
private void DataGridProducts_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
    if (e.Key == Key.RightShift)
    {
        DataGridProducts.CommitEdit();
        AddEmptyProduct();        
        DataGridProducts.SelectedItem = DataGridProducts.Items[Products.Count - 1];
    }
}

Ahmet Özgür
Top achievements
Rank 1
 asked on 09 Aug 2011
1 answer
136 views
Hello,

just moved from R1 to R2 and we have a problem with some of the bindings in the GridView
In the UC I have a grid described like this:
<telerik:RadGridView
                            Margin="6,6,1,4"
                            CanUserReorderColumns="False"
                            CanUserDeleteRows="False"
                            CanUserInsertRows="False"
                            IsReadOnly="True"
                            AutoGenerateColumns="False"
                            IsFilteringAllowed="False"
                            SelectionMode="Extended"
                            SelectedItem="{Binding PersoanaSelectata, Mode=TwoWay}"
                            ItemsSource="{Binding Persoane, Mode=TwoWay}"
                            Name="radGridViewPersoane"
                            ShowGroupPanel="False" >
                   <telerik:RadGridView.Columns>
                       <telerik:GridViewDataColumn Header="Nume"
                                           DataMemberBinding="{Binding Nume}"  Width="4*" TextWrapping="Wrap" IsReadOnly="True"/>
                       <telerik:GridViewDataColumn Header="Prenume"
                                           DataMemberBinding="{Binding Prenume}" Width="4*" TextWrapping="Wrap" IsReadOnly="True"/>
                       
                   </telerik:RadGridView.Columns>
               </telerik:RadGridView>

in the vm I have the properties

private VerificarePersoana _verificarePersoana;
        public VerificarePersoana VerificarePersoana
        {
            get
            {
                if (_verificarePersoana == null)
                    _verificarePersoana = new VerificarePersoana();
                return _verificarePersoana;
            }
            set
            {
                _verificarePersoana = value;
                Notify("VerificarePersoana");
            }
        }
 
        private ObservableCollection<Persoana> persoane;
        public ObservableCollection<Persoanaa> Persoane
        {
            get
            {
                if (_verificarePersoana.Persoane == null)
                {
                    _verificarePersoana.Persoane = new ObservableCollection<Persoana>();
                    
                }
                return _verificarePersoana.Persoane;
            }
            set
            {
                _verificarePersoana.Persoane = value;
                Notify("Persoane");
            }
        }



and in  persoana I have something like
private string _nume;
public string Nume
{
    get { return _nume; }
    set { _nume = value; Notify("Nume"); }
}
 
private string _prenume;
public string Prenume { get { return _prenume; } set { _prenume=value; Notify("Prenume"); } }

  public void Notify(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }


My problem is that in R1 when I updated the information in a separate form for one of the entries the information got updated in the grid too. now it doesn't do that. If i sort the items by a column the information shows up correctly again.

Why is that? i would really like to move my solution to R2 but this is really a problem.

Thanks in advance.
Vlad
Telerik team
 answered on 09 Aug 2011
1 answer
104 views
I have a RadGridView with a default sort descriptor defined in xaml for my grid.
Wen i run the project, if i press return two times, an exception is trown.

Application: WpfApplication3.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
   at System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].BinarySearch(System.__Canon[], Int32, Int32, System.__Canon, System.Collections.Generic.IComparer`1<System.__Canon>)
   at System.Array.BinarySearch[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon[], Int32, Int32, System.__Canon, System.Collections.Generic.IComparer`1<System.__Canon>)
   at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].BinarySearch(Int32, Int32, System.__Canon, System.Collections.Generic.IComparer`1<System.__Canon>)
   at Telerik.Windows.Data.KeyedCollection.IndexOf(System.Object)
   at Telerik.Windows.Data.QueryableCollectionView.InternalIndexOf(System.Object)
   at Telerik.Windows.Data.QueryableCollectionView.IndexOf(System.Object)
   at Telerik.Windows.Data.QueryableCollectionView.Contains(System.Object)
   at Telerik.Windows.Data.DataItemCollection.Contains(System.Object)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CanActivateRowExecute(System.Object, System.Windows.Input.CanExecuteRoutedEventArgs)
   at System.Windows.Input.CommandBinding.OnCanExecute(System.Object, System.Windows.Input.CanExecuteRoutedEventArgs)
   at System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection, System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean)
   at System.Windows.Input.CommandManager.FindCommandBinding(System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean)
   at System.Windows.Input.CommandManager.OnCanExecute(System.Object, System.Windows.Input.CanExecuteRoutedEventArgs)
   at System.Windows.UIElement.OnCanExecuteThunk(System.Object, System.Windows.Input.CanExecuteRoutedEventArgs)
   at System.Windows.Input.CanExecuteRoutedEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.Input.RoutedCommand.CriticalCanExecuteWrapper(System.Object, System.Windows.IInputElement, Boolean, System.Windows.Input.CanExecuteRoutedEventArgs)
   at System.Windows.Input.RoutedCommand.CanExecuteImpl(System.Object, System.Windows.IInputElement, Boolean, Boolean ByRef)
   at System.Windows.Input.RoutedCommand.CriticalCanExecute(System.Object, System.Windows.IInputElement, Boolean, Boolean ByRef)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand()
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnKeyDown(System.Windows.Input.KeyEventArgs)
   at System.Windows.UIElement.OnKeyDownThunk(System.Object, System.Windows.Input.KeyEventArgs)
   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawKeyboardActions, Int32, Boolean, Boolean, Int32)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(System.Windows.Interop.MSG ByRef, Boolean ByRef)
   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(System.Windows.Interop.MSG ByRef, System.Windows.Input.ModifierKeys)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority, System.Delegate, System.Object)
   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(System.Windows.Interop.MSG ByRef, Boolean ByRef)
   at System.Windows.Interop.HwndSource+WeakEventPreprocessMessage.OnPreprocessMessage(System.Windows.Interop.MSG ByRef, Boolean ByRef)
   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at System.Windows.Application.Run()
   at WpfApplication3.App.Main()



the folowing code, reproduces my issue.

<Window x:Class="WpfApplication3.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
<telerik:RadGridView x:Name="grid" ItemsSource="{Binding Itens}">
    <telerik:RadGridView.SortDescriptors>
        <telerik:SortDescriptor Member="Id" SortDirection="Ascending" />
    </telerik:RadGridView.SortDescriptors>
</telerik:RadGridView>
    </Grid>
</Window>

public class Item
{
    public int Id { get; set; }
    public string Name { get; set; }
}
 
public class ViewModel
{
    public ObservableCollection<Item> Itens { get; set; }
 
    public ViewModel()
    {
        this.Itens = new ObservableCollection<Item>();
 
        Itens.Add(new Item() { Name = "teste", Id = 0 });
        Itens.Add(new Item() { Name = "teste 1", Id = 1 });
        Itens.Add(new Item() { Name = "teste 2", Id = 2 });
    }
}
 
public partial class MainWindow : Window
{
    public MainWindow()
    {
        this.DataContext = new ViewModel();
        InitializeComponent();
    }
}
Yordanka
Telerik team
 answered on 09 Aug 2011
2 answers
147 views
User would like to be avoid stopping at a date since it isn't always required.  Setting the IsTabStop to False doesn't work.  Even after setting the IsTabStop property to false, the cursor continues to stop for each part of the date (mm/dd/yyyy).
Bhavesh
Top achievements
Rank 1
 answered on 08 Aug 2011
2 answers
169 views
hi there,

I'm fairly new to Telerik and WPF so I was wondering if someone could help me with a few questions.
My questions are related mainly to RadScheduleView Drag and Drop behavior and also the ability to show a RadContextMenu in a specific area of the radscheduleview control. I have included a sample project and the screenshot below.

1. If I drag a GridViewRow to a schedule view, is it possible to delete that row from my grid after it is dragged to the RadScheduleView ?
2. Is it possible to drag a GridViewRow and drag that row to the GroupHeader and then add a new resource ?
How can I do that?
3. Why does my custom ScheduleViewDragDropBehavior keep calling ConvertDraggedData
even if DragComplete is not actually reached in the OnDragInfo draghandler of my RadGridView ?
4. How can I setup my RadContextMenu to only show up in the GroupHeader to the left (I'm using Timeline View)?
Is it possible to hide ContextMenu when I right click the TimeViewDefinition area ?

SampleProject
AppScreenshot
Elneilo
Top achievements
Rank 1
 answered on 08 Aug 2011
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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?