Telerik Forums
UI for WPF Forum
2 answers
171 views
Hello! 

I am getting the following exception when I delete all items from a grid with the delete key and then press the insert key:

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in Telerik.Windows.Data.dll

   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPosition(Int32 position) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Currency.cs:line 82
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentTo(Object item) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Currency.cs:line 46
   at Telerik.Windows.Data.QueryableCollectionView.AddNewInternal(Object newItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Editing.cs:line 430
   at Telerik.Windows.Data.QueryableCollectionView.AddNew(Object newItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Editing.cs:line 251
   at Telerik.Windows.Data.DataItemCollection.AddNew(Object newItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.Editing.cs:line 33
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CreateNewItem() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 5421
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ShowInsertRowIfNeeded() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 5368
   at Telerik.Windows.Controls.GridView.GridViewDataControl.BeginInsert() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 4997
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnBeginInsertCommand(Object sender, ExecutedRoutedEventArgs e) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 342
   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.RoutedCommand.Execute(Object parameter, IInputElement target)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 65
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnKeyDown(KeyEventArgs e) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3926
   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)


Just to let you know!

Franziska
Top achievements
Rank 1
 answered on 31 Aug 2011
1 answer
203 views
Hi.
In evaluating the Panebar i want to make the panel bar not selectable, i.e. when the user click on the group or on the item only is pusched but not remain selected.

How can do i this?
thanks.
Petar Mladenov
Telerik team
 answered on 31 Aug 2011
1 answer
169 views
Hello,

I am having a little issue with the Live Data Chart Example. I'm using the same source code as the "Live Data WPF example". Except changed my queue object with my own.

Every time my timer ticks. The Chart redraws itself completely and for a few milliseconds the chart is blank. 

I could provide more information but my code is exactly the example. Except I am loading the UserControl in a Stack Panel. 

Has anyone come across this?

Luc



Evgenia
Telerik team
 answered on 31 Aug 2011
6 answers
141 views
Hello,
I need to create a project planning tool which allows to manage project lenght (in days) and responsibility with drag and drop functionality;
I thought that the timeline view may be what I'm looking for but there are always times (hour, minute, second) in between which are not interesting for me.
Substantially I would need the timeline view with 4 employees as rows and the days as columns; the user should then be able to create a new project which can be 1 to n days and drag and drop it between the employees.

Could You please give me some advise or small sample project on how I could do this?

Regards
Yana
Telerik team
 answered on 31 Aug 2011
1 answer
94 views
<telerik:RadColorPaletteView HorizontalAlignment="Left"  Width="150" 
                             PaletteOrientation="Horizontal" PaletteColumnsCount="8"
                             ItemsSource="{Binding AvailableColors}" 
                             SelectedItem="{Binding TagColor, Mode=TwoWay}"
                             SelectionChanged="RadColorPaletteView_SelectionChanged"
                             />
Hi,

We are using the ColorPaletteView with a defined set of 13 colors in two rows. There is sufficient spacing between the columns but vertically the color items seem to not have any spacing between them.

How do I specify the spacing between the rows of color items?

Petar Mladenov
Telerik team
 answered on 31 Aug 2011
2 answers
87 views
I am trying to apply a Control Template to RadDataForm to round its corners but no luck so far. Any suggestions?
Marcelo
Top achievements
Rank 1
 answered on 31 Aug 2011
7 answers
147 views
Hello

Can i get all the latest res files in english just for translation purposes?

Thanks

Matthias
Top achievements
Rank 1
 answered on 31 Aug 2011
1 answer
181 views
Hi,

I have a method that use asynchronous way.

I want to update the PaletteBrushes when some data has already been prepared.

But the PaletteBrushes doesn't updated after i invoke the  asynchronous method.

Is there any way to meet my requirement?

Thanks
Yavor
Telerik team
 answered on 31 Aug 2011
1 answer
114 views
I have created the following RadTreeView:


<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
    <Setter Property="CheckState" Value="{Binding Path=CheckState, Mode=TwoWay, Converter={StaticResource ToggleStateToBoolean}}" />
    <Setter Property="DefaultImageSrc" Value="{Binding ListImage}" />
    <Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
</Style>
<HierarchicalDataTemplate x:Key="TreeViewItemTemplate" ItemsSource="{Binding DirectoryList}" ItemContainerStyle="{StaticResource RadTreeViewItemStyle}">
    <TextBlock Text="{Binding DisplayName}"  Margin="0,0,5,0"/>
</HierarchicalDataTemplate>
  
        <telerik:RadTreeView Grid.Column="0" IsLineEnabled="True" ItemsOptionListType="CheckList" IsOptionElementsEnabled="True" IsTriStateMode="True"
                             BorderBrush="Black" BorderThickness="1" ItemsSource="{Binding RootItems}" ItemTemplate="{StaticResource TreeViewItemTemplate}"
                             IsLoadOnDemandEnabled="True" LoadOnDemand="RadTreeView_LoadOnDemand" ItemContainerStyle="{StaticResource RadTreeViewItemStyle}"
                             Background="White" Name="ExplorerTree">
        </telerik:RadTreeView>

In the codebehind, I am passing the LoadOnDemand back to my viewmodel for processing.  Everything is working exactly as it should except for when I attempt to load a node that has been selected.  If I select the node and then fire the LoadOnDemand event, it loads properly and displays all the child nodes, but then deselects the node itself.  How can I get it to stop doing this?






Petar Mladenov
Telerik team
 answered on 31 Aug 2011
1 answer
364 views
Hi All,
I am using MVVM pattern in my WPF application. I am using the Modal created by Entity Framework and my ViewModel class have public properties for binding. I have a specific requirements that my GridView should have two checkboxes columns and one TextBox column (all time in Edit mode) and all other remaining columns will be in ReadOnly mode. When user either Check/Uncheck these checkboxes OR change value in TextBox, I will have to do custom calculation on it (Note that for firing these calculation, I should have separate property in ViewModel so that I can fire in its SET clause....Am I right?)
I created the Grid in XAML like this.
<telerik:RadGridView Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="0" Name="radGridView1" AutoGenerateColumns="False" ShowGroupPanel="False"
                             ItemsSource="{Binding IndicatorsList}">
            <telerik:RadGridView.Columns>
                <col:MyColumn Header="#" Width="35"/>
                <telerik:GridViewColumn IsReadOnly="False" Header="Inc." Width="35">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IncludeIt, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
                <telerik:GridViewDataColumn Header="Indicator" DataMemberBinding="{Binding DisplayName}" IsReadOnly="True" Width="250" />
                <telerik:GridViewColumn IsReadOnly="False" Header="Log" Width="35">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding LOG, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
                <telerik:GridViewColumn IsReadOnly="False" Header="Lag" Width="75">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding LAG, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Del." Width="35">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadButton Command="{Binding Delete}" CommandParameter="{Binding}" Width="27" Height="20">
                                <Image Source="/finStat.MacroVal.UI;component/Images/del_small.png"></Image>
                            </telerik:RadButton>
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

Here is my ViewModel
public List<Indicator> IndicatorsList
        {
            get { return Indicators.ToList(); }
        }
public bool IncludeIt
{
       get { /******Here How I get current object item (i.e. Indicator) of the row so that I can return its value *********/ }
       set {  /******Here How I get current object item (i.e. Indicator) of the row so that I set its value *********/ }
}
I am really stuck that how can I create properties for these check boxes and TextBox. Basically how can I get specific row DataItem in checkbox property so that I can return specific field from that DataItem.
Although my actual Model object is Entity Framework Model, but here is sample model for this example.
public class Indicator
{
    public bool IncludeIndicator { get; set; }
    public string Name { get; set; }
    public bool Log { get; set; }
    public double Lag { get; set; }
}

Any help please?
Maya
Telerik team
 answered on 31 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?