I use the SDK sample - "Custoizing item" to change the item color
but when I try to get SelectedItem. it always be null. it seems it can not be selected
ItemTemplateSelector="{StaticResource ItemTemplateSelector}"
<local:CustomItemTemplateSelector x:Key="ItemTemplateSelector"
InstantItemTemplate="{StaticResource InstantItemTemplate}"
ItemWithDurationTemplate="{StaticResource ItemWithDurationTemplate}"/>
-Jacky
Hello!
I need to move the splitters at runtime. It's possible? How?
I'm using Telerik WPF 2015.1.
Thank you!
Hi,
I have defined custom filtering control like this. It's a custom control.
public
class
SalusGridViewCustomFilteringControl : FilteringControl
{
private
GridViewDataControl _parentGrid;
private
GridViewBoundColumnBase _parentColumn;
private
readonly
List<FilterDescriptor> _filterDescriptors =
new
List<FilterDescriptor>();
static
SalusGridViewCustomFilteringControl()
{
DefaultStyleKeyProperty.OverrideMetadata(
typeof
(SalusGridViewCustomFilteringControl),
new
FrameworkPropertyMetadata(
typeof
(SalusGridViewCustomFilteringControl)));
}
...
public
static
readonly
DependencyProperty ItemsProperty = DependencyProperty.Register(
"Items"
,
typeof
(ObservableCollection<AgendaActivityType>),
typeof
(SalusGridViewCustomFilteringControl),
new
PropertyMetadata(
default
(ObservableCollection<AgendaActivityType>)));
public
ObservableCollection<AgendaActivityType> Items
{
get
{
return
(ObservableCollection<AgendaActivityType>) GetValue(ItemsProperty); }
set
{ SetValue(ItemsProperty, value); }
}
...
But when I use it as filtering control for column like this:
<
telerik:GridViewDataColumn.FilteringControl
>
<
controls:SalusGridViewCustomFilteringControl
Items
=
"{Binding AgendaItemTypes}"
ItemContainerStyle
=
"{StaticResource AgendaFilteringItemStyle}"
/>
</
telerik:GridViewDataColumn.FilteringControl
>
Binding to AgendaItemTypes not works. Ok it is because telerik FilteringControl class, which is base class for my custom filtering control, sets DataContext to FilteringViewModel. FilteringViewModel does not contains property AgendaItemTypes.
But when I change binding of Items property to element which has right datacontext i.e. like this:
<
telerik:GridViewDataColumn.FilteringControl
>
<
controls:SalusGridViewCustomFilteringControl
Items
=
"{Binding ElementName=AgendaModule_AgendaPlannedActivityView_GridView, Path=DataContext.AgendaItemTypes}"
ItemContainerStyle
=
"{StaticResource AgendaFilteringItemStyle}"
/>
</
telerik:GridViewDataColumn.FilteringControl
>
Binding still not work. Can someone give me advice please?
Hello!
I have a question about Prism and RadWindow, In Prism's Samples of Wpf on GitHub, there is a "InteractivityQuickstart ",
in this sample, alert ,confirm and window are Window but not RadWindow,
and I find there are 3 Window Control in PrismLibrary named "DefaultConfirmationWindow","DefaultNotificationWindow" and "DefaultWindow",
I want to know is there any way to show Telerik alert ,confirm, prompt and pop window in Prism mode?
If I replace the 3 Window Control by RadWindow in PrismLibrary, there will no Icon in alert ,confirm and prompt. if I set a Icon, it can not fit for different themes.
Is there some good solution?
I am stumped on this, and I think its my way of thinking, but simply, I cannot follow how to add further timeline points during runtime. I can follow the examples given on the Telerik website easily enough, which get you to a point on initially running the example of having a selection of random points on the timeline, but to then add further ones is not working for me.
I am using VB.net, can you point me in the right direction for this - any help is appreciated, thanks (consider me at a beginner level, ta)
Hi Telerik admin,
I am trying to add reordering row functionally to my gridview, I found the example somewhere on Telerik 4rum, but the example used RadDragAndDropManager which is obsolete implementation, thus I changed to DragDropManager follow this link: here, but it does not work.
I had searched so much before created this thread, plz take a look at the attached file and wonderful if anyone modify it to work. Thanks
I found an issue in our code that was incorrectly calling chart.Series.Clear() as well as clearing the ObservableCollection we use with the SeriesProvider.
This causes the following exception when the chart tries to redraw.
System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
at Telerik.Windows.Controls.ChartView.RadChartBase.RemoveDynamicSeries(ChartSeries series, Int32 index)
at Telerik.Windows.Controls.ChartView.RadChartBase.RemoveDynamicSeries()
at Telerik.Windows.Controls.ChartView.RadChartBase.UpdateDynamicSeries(List`1 actions)
at Telerik.Windows.Controls.ChartView.RadChartBase.OnSeriesProviderStateChanged(List`1 actions)
at Telerik.Windows.Controls.ChartView.ChartSeriesProvider.NotifyListeners()
at Telerik.Windows.Controls.ChartView.ChartSeriesProvider.RefreshAttachedCharts()
at Telerik.Windows.Controls.ChartView.ChartSeriesProvider.<
ScheduleRefreshAttachedCharts
>b__22()
...
I've just switched from 2014 Q3 and this didn't cause any problems in that version.
Obviously this is quite simple once I found it and we shouldn't be manually changing the Series collection when using a SeriesProvider. But it wasn't easy to find when its built into a large application and the stack trace doesn't help much.
Would it be possible to silently cope with this, or perhaps throw an exception when accessing the Series if the graph is using a SeriesProvider, that would make it much easier to find the problem.
Heres a small project to show what happens. Just run it and click the button.
https://dl.dropboxusercontent.com/u/32945770/SeriesProviderError.zip
Thanks,
Martin
Hi *,
I use a Chart Control (see below)
Items is a collection of Objects with different properties like X, Y, Z and each item has an Id.
My question is how can I get the value of the ID Property having a selected Item (DataPoint) by SelectedValue = "X"?
All what I have is an object of type SelectionChangedEventArgs contains AddedPoints [SelectionChanged] but there I see only the values I render in the Chart.
Please help.
Thx
R
<
telerik:BarSeries
ShowLabels
=
"True"
ValueBinding
=
"{Binding ElementName=radListBox, Path=SelectedValue}"
ItemsSource
=
"{Binding ElementName=ChartDataSource1}"/
>
...
<telerik:ChartDataSource x:Name="ChartDataSource1"
ItemsSource="{Binding Items ...
I cannot seem to figure out what this column is or how to get rid of it. There is a very narrow column that appears all the way to the left in the GridView by default. It has no content, but can be moved around in between the other columns. Can anyone help?
I've attached an image to explain what I am talking about. Here's my xaml for the GridView...
<telerik:RadGridView x:Name="VariablesGridView"
ItemsSource="{Binding Sequence.Variables}"
CanUserSortColumns="False"
CanUserInsertRows="False"
AutoGenerateColumns="False"
RowDetailsVisibilityMode="VisibleWhenSelected"
ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
SelectionMode="Multiple">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" IsReadOnly="False" IsFilterable="False"/>
<telerik:GridViewDataColumn CellTemplate="{StaticResource VariableTypeTemplate}" Header="Type" IsReadOnly="False" IsFilterable="False"/>
<telerik:GridViewDataColumn DataType="system:Object" DataMemberBinding="{Binding Value}" Header="Value" IsReadOnly="False" IsFilterable="False"/>
</telerik:RadGridView.Columns>
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu x:Name="VariablesContextMenu"
ItemContainerStyle="{StaticResource RadMenuItemStyle}"
Opened="ContextMenu_Opened"
IconColumnWidth="0"
ItemClick="ContextMenu_ItemClick" />
</telerik:RadContextMenu.ContextMenu>
</telerik:RadGridView>