Telerik Forums
UI for WPF Forum
2 answers
235 views
I'm trying to create a grid that uses RadDataForm to display and to edit row details, and which also supports insert and delete of rows.

My current problem is getting insert to work using the same form layout as the edit.  By default, the insert-row drops you into editing the row in the grid, rather than editing a new record in a detail DataForm.

Browsing the forums showed me this thread - and with this I was able to override the GridViewNewRow template - but if that's only part of the solution, at best.

My grid has ShowInsertRow="False", instead I have a button that triggers RadGridViewCommands.BeginInsert.  When I click that, I still end up editing the rows of the grid, and not in a DataForm.

When I set ShowInsertRow="True", I don't see the "Click here to add new item" row, instead I see my GridViewNewRow template, but clearly bound incorrectly: "BindingExpression path error: 'CurrentItem' property not found on 'object'."

It seems to me that if most people who are displaying and editing row details in a data form, whether a RadDataForm or something custom, are also going to want to insert new rows using that same data form.

But if there's a way to do it, I've not been able to find it.

---  EDITED ---

OK, one thing I've figured out.  The GridViewNewRow template only controls the appearance of the "Click here to add new item" row - it has nothing to do with the row on which the editing is actually done.  Which still leaves me not knowing how to get the grid to use a RadDataForm for inserting new rows, when it is configured to use a RadDataForm to display and edit rows.
Jeff
Top achievements
Rank 1
 answered on 13 Feb 2012
13 answers
244 views
Greetings,
 
I keep getting the "theming resource not found" exception when trying to clear the current data series of a chart component, even though i patched up the Q3 2011 version with SP1. The code that throws the exception is the following:

Private Sub ResetDataSeries()
 Dim seriesCollection As DataSeriesCollection = chart.DefaultView.ChartArea.DataSeries
 seriesCollection.SuspendNotifications()
       
 For Each series In seriesCollection
  series.SuspendNotifications()
  series.Clear()
  series.ResumeNotifications()
 Next
 
 seriesCollection.Clear()
 seriesCollection.ResumeNotifications()
 _DataPoints.Clear()
End Sub

and the stack-trace is as follows: 

Theming: Required resource not found. Please, make sure you referenced all necessary themes and resources.
(Telerik.Windows.Controls.Charting.ChartException, Telerik.Windows.Controls.Charting)
       at Telerik.Windows.Controls.Charting.BaseSeriesConverter`1.GetThemeStyle(Object chartItem, Object parameter)
       at Telerik.Windows.Controls.Charting.BaseSeriesConverter`1.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
       at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.RefreshValue()
       at MS.Internal.Data.ClrBindingWorker.RefreshValue()
       at System.Windows.Data.BindingExpression.UpdateTarget()
       at System.Windows.Data.BindingExpressionBase.InvalidateCulture()
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty dp, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent)
       at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent)
       at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent)
       at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
       at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info)
       at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
       at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
       at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
       at System.Windows.Media.Visual.RemoveVisualChild(Visual child)
       at System.Windows.Media.VisualCollection.DisconnectChild(Int32 index)
       at System.Windows.Media.VisualCollection.Clear()
       at System.Windows.Controls.UIElementCollection.ClearInternal()
       at System.Windows.Controls.Panel.ClearChildren()
       at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
       at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.OnRefresh()
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       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 System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       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.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.RefreshOverride()
       at System.Windows.Data.CollectionView.RefreshOrDefer()
       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
       at Entersoft.Framework.Dashboard.Controls.Chart.ResetDataSeries() in D:\build\ESDev40\Framework\ESSessionServer\ESDashboard\ESDashboard.Controls\Controls\Chart.xaml.vb:line 163
       at Entersoft.Framework.Dashboard.Controls.Chart.OnDataSourceChanged() in D:\build\ESDev40\Framework\ESSessionServer\ESDashboard\ESDashboard.Controls\Controls\Chart.xaml.vb:line 658
       at Entersoft.Framework.Dashboard.Controls.Chart.set_DataSource(IEnumerable value) in D:\build\ESDev40\Framework\ESSessionServer\ESDashboard\ESDashboard.Controls\Controls\Chart.xaml.vb:line 77
       at Entersoft.Framework.Dashboard.Presentation.Xaml.XamlChartItem.PerformRefreshDataCore() in D:\build\ESDev40\Framework\ESSessionServer\ESDashboard\ESDashboard.Controls\Presentation\DashboardItems\XamlChartItem.vb:line 192

Any ideas?

Nikos
Sia
Telerik team
 answered on 13 Feb 2012
1 answer
67 views
I have set the  IsLoadOnDemandEnabled  to True at the Tree level and it makes all the node's images to show like, it has children nodes to be loaded. 

In Reality, not all of the nodes are Expandable. 

Lets for example say, I need to expand first level to dynamically load the next level. In the next level of nodes, some of them may have children nodes to be loaded when you click on them dynamically and some of the nodes are already the leaf nodes, meaning they are the last node and they don't have any child node. For these leaf nodes, I don't want the Image of the node to show as Expandable. 

Only the nodes that have children nodes to be loaded need to have the Expandable icon. 

How do I handle this situation. Its misleading when you show the Expandable icon or + icon for all the nodes irrespective of whether they are the last node or not. 

Please let me know if I am making sense. 




gans
Top achievements
Rank 1
 answered on 13 Feb 2012
2 answers
129 views
For our application we would like to save alot of the customers settings.
One of these is the width of columns and the order. So I have done the following
  Width="{Binding ProjectPartsOverview_Column_Width_Delete, Mode=TwoWay, Source={x:Static properties:Settings.Default}}"

But that width is not being loaded from the settings or updated.
Also I have no clue how to save the order of the columns
Kevin Hendriks
Top achievements
Rank 1
 answered on 13 Feb 2012
0 answers
65 views
Hi @ all,

i'm looking for a source or tutorial for Drop a RadCarouseltem to a Rad GridView. I don't want to delete the Item from the Craousel, but i want to add the selecteditem to a DataGrid.

Thank's for helping me.

Regards
ww
ITA
Top achievements
Rank 1
 asked on 13 Feb 2012
2 answers
95 views
Our users use - when sending letters - envelopes with a window where you can read name and address.
To help them to write the name and address on the right place I can show a rectangle in the background of the RadTextBox.
The question is: what is the best way to skrew this feature/style on and off?
Or... do you know a better way to show/hide such a rectangle?

<telerik:RadRichTextBox x:Name="editor" AllowDrop="True" Drop="EditorDrop" ShowComments="False" FontFamily="Calibri" FontSize="11">
            <telerik:RadDocument LayoutMode="Paged" />
            <telerik:RadRichTextBox.Resources>
                <Style TargetType="telerik:Page">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="telerik:Page">
                                <Grid Background="White">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="50"></ColumnDefinition>
                                        <ColumnDefinition Width="370"></ColumnDefinition>
                                        <ColumnDefinition Width="*"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="120"></RowDefinition>
                                        <RowDefinition Height="120"></RowDefinition>
                                        <RowDefinition Height="*"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Canvas x:Name="PageContentPresenter" Background="White" />
                                    <Border Grid.Column="1" Grid.Row="1" BorderBrush="Blue" BorderThickness="1" CornerRadius="5" Background="Aqua">
                                    </Border>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="HorizontalAlignment" Value="Center" />
                    <Setter Property="VerticalAlignment" Value="Top" />
                </Style>
            </telerik:RadRichTextBox.Resources>
        </telerik:RadRichTextBox>
Rieni De Rijke
Top achievements
Rank 1
 answered on 13 Feb 2012
0 answers
181 views
Hi,

i have a mvvm item collection wich is bounded to my radcraousel. I habe a cutom item template and i want to have
the item vertical and not horizontal. But how does that work? I can't find any working example. I need help please.

<DataTemplate x:Key="customItemTemplate">
            <Border Background="LightSlateGray" Padding="10">
                <Grid>
                    <StackPanel>
                        <TextBlock Text="{Binding TaskID}" TextWrapping="Wrap" Foreground="White" FontSize="11" TextAlignment="Center" Margin="0,0,3,0"/>
 
                    </StackPanel>
                </Grid>
            </Border>
        </DataTemplate>
 
<telerik:RadCarousel x:Name="sampleRadCarousel" ItemsSource="{Binding Task}" AutoGenerateDataPresenters="False" Background="Transparent"   ItemTemplate="{StaticResource customItemTemplate}" />                         

Thanks a lot
regrads
ww

ITA
Top achievements
Rank 1
 asked on 13 Feb 2012
2 answers
170 views
Hi

In quite a few places i am using converters with the RadGridView to convert the values in the domain model to values presented in the users. I have attached an example where a column is bound to an enum which is converted to a string by a IValueConverter (by using a ressource file for easy i18n)

As there seems to be no support for the converter notion directly in the RadGridView i have done this in the following way:

<telerik:GridViewDataColumn x:Name="sourceColumn" IsReadOnly="True"  Header="Source">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding RouteSource, Converter={StaticResource RouteSourceConverter}}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

However when i then group on these columns, the value is of course not converted. I have attached a screenshot showing this.
I could probably just define a custom group header template. But the only thing i want is to get the value passed through my converter. 


Is there an easy way to acheive this? If using a custom group header tempalte, how would i do this so it looks like the default group headers - but just with the value from the columns converted? 
Henrik
Top achievements
Rank 1
 answered on 13 Feb 2012
4 answers
217 views
Anybody can help me, i want choose default value when i search in text column header.

Example:

When i type anything into text column header and choose the filter, it will show " No filter, StartWith, Endwiths, Contains..." , now i want this default value  is "Contains".

Thank more :)
Hieu
Top achievements
Rank 1
 answered on 13 Feb 2012
1 answer
248 views
I'm using an HierarchicalDataTemplate and the FullPath is always the type of the object in the itemssource collection. Is there a way to set it to a specific property of the bound items?  My understanding is that it was supposed to be the displayed text.

<HierarchicalDataTemplate DataType="{x:Type local:Employee}" >

<TextBlock Text="{Binding Path=Name}"></TextBlock>

</HierarchicalDataTemplate>

My Employee object has a list of employees and everything is displayed correctly.  However the FullPath of the SelectedContainer is always MyNamespace.Employee.I need the FullPath to be the Text of the node or need the ability to assign a property to be used by the FullPath for example, EmployeeId or something.
Thanks,

 

 

 

Tina Stancheva
Telerik team
 answered on 13 Feb 2012
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
Security
VirtualKeyboard
HighlightTextBlock
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?