Hi,
I'm binding a custom ObservableCollection to the AppointmentsSource of radScheduleView. This doesn't specialize ObservableCollection but still implements INotifyPropertyChanged, INotifyCollectionChanged and ICollection.
The fact is : DisplayedElements are not refreshed when I add an element (either with UI or code) and I need to refresh the ScheduleView (for example : changing ViewDefinition) for them to appear. A bigger problem is in inlining editing since CreateInlineAppointment does Remove immediately after CreateNew (because the new element isn't in the displayed element).
Then I wonder what is the "ObservableCollection" expected behaviour for the DisplayedElements to be refreshed ?
Same question may apply to "Appointment" (ours is implementing IAppointment, INotifyPropertyChanged).
Thanks for your help.
I am trying to set the Foreground color of selected RadTreeViewItem but it cannot be set, though, other elements like Background is working.
<UserControl><UserControl.Resources><DataTemplate x:Key="AdvancedVariableTemplate"> <RadioButton Checked="itemCont
<ResourceDictionary>
<!-- ItemContainerStyleSelector -->
<Style x:Key="AdvancedVariableItemContainerStyle" TargetType="telerik:RadTreeViewItem" BasedOn="{StaticResource RadTreeViewItemStyle}">
<Setter Property="Background" Value="Red"/>
<Setter Property="Foreground" Value="Green"/>
</Style>
</ResourceDictionary>
class AdvVariableContainerStyleSelector : StyleSelector
{
private Style darkThemeStyle;
private Style lightThemeStyle;
public override Style SelectStyle(object item, DependencyObject container)
{
Configuration config = UserConfigurations.getConfig();
if (config.AppSettings.Settings["CurrentTheme"] != null)
{
switch (config.AppSettings.Settings["CurrentTheme"].Value.ToString().ToUpper())
{
case "LIGHT":
return lightThemeStyle;
case "STANDARD":
return lightThemeStyle;
case "DARK":
return darkThemeStyle;
default:
return null;
}
}
else
return null;
}
public Style DarkThemeStyle
{
get
{
return this.darkThemeStyle;
}
set
{
this.darkThemeStyle = value;
}
}
public Style LightThemeStyle
{
get
{
return this.lightThemeStyle;
}
set
{
this.lightThemeStyle = value;
}
}
}
ainerRadio_Checked" Content="{Binding CustomName}" ToolTip="{Binding TooltipString}"/> </DataTemplate> <HierarchicalDataTemplate x:Key="AdvancedGroupSeriesRadioTemplate" ItemsSource="{Binding LstAppDataSeries}"> <TextBlock Text="{Binding CustomName}" FontWeight="Bold" /> </HierarchicalDataTemplate> <HierarchicalDataTemplate x:Key="AdvancedGroupSideTemplate" ItemsSource="{Binding LstAppDataSeriesSides}"> <TextBlock Text="{Binding CustomName}" FontWeight="Bold"/> </HierarchicalDataTemplate> <VariablesGroup:VariablesHierarchicalTemplate x:Key="AdvancedVariableItemTemplate" VariablesGroupsTemplate="{StaticResource AdvancedGroupSideTemplate}" VariableSideTemplate="{StaticResource AdvancedGroupSeriesRadioTemplate}" VariableTemplate="{StaticResource AdvancedVariableTemplate}"/> <VariablesGroup:AdvVariableContainerStyleSelector x:Key="AdvancedVariableStyleSelector" DarkThemeStyle="{StaticResource AdvancedVariableItemContainerStyle}" LightThemeStyle="{StaticResource AdvancedVariableItemContainerStyle}"/> </UserControl.Resources><Grid><telerik:RadTreeView x:Name="lstVariablesAdvanced" SelectedItem="{DynamicResource AdvancedVariableItemContainerStyle}" VerticalAlignment="Stretch" Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0,0,0,0" ScrollViewer.CanContentScroll="False"IsEditable="True" SelectionMode="Extended" ItemsSource="{Binding LstAppDataSeriesGrouping}" IsDropPreviewLineEnabled="False" IsDragPreviewEnabled="True"IsDragTooltipEnabled="False" MouseDown="lstVariablesAdvanced_MouseDown"IsSingleExpandPath="True" IsExpandOnSingleClickEnabled="False" IsDragDropEnabled="False"PreviewKeyDown="lstVariables_PreviewKeyDown" IsLineEnabled="True"ItemTemplateSelector="{StaticResource AdvancedVariableItemTemplate}"ItemContainerStyleSelector="{StaticResource AdvancedVariableStyleSelector}" Margin="10,0,6,0"></telerik:RadTreeView></Grid></UserControl>
Hello,
When I have NewRowPosition set to Bottom, I see the "Click here to add new item" button at the bottom of the GridView, as expected.
My issue is that when I click the NewRow button, the button disappears as I am adding the new row. Note that this only happens when adding a new row - when editing an existing row, the NewRow button appears as expected.
Is there a way to always have the NewRow button shown when adding new rows?
Thanks,
-Thanos
<StackPanel x:Name="PART_FooterPanel" HorizontalAlignment="Right" Orientation="Horizontal"> <telerik:RadButton x:Name="PART_CommitButton" Content="{TemplateBinding CommitButtonContent}" Command="{Binding Source={StaticResource DataContextProxy}, Path=Data.UpdateItem}" InnerCornerRadius="0" Margin="2,4,4,4" MinWidth="48" MinHeight="20"> <telerik:StyleManager.Theme> <telerik:Office_BlackTheme/> </telerik:StyleManager.Theme> </telerik:RadButton> <telerik:RadButton x:Name="PART_CancelButton" Content="{TemplateBinding CancelButtonContent}" Command="{Binding Source={StaticResource DataContextProxy},Path=Data.CancelItemUpdate}" InnerCornerRadius="0" Margin="2,4,4,4" MinWidth="48" MinHeight="20"> <telerik:StyleManager.Theme> <telerik:Office_BlackTheme/> </telerik:StyleManager.Theme> </telerik:RadButton> </StackPanel><telerik:RadDataForm x:Name="DataForm1" CurrentItem="{Binding CurrentLevelItem,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource RadDataFormStyle1}" DataFieldStyle="{StaticResource DataFormDataFieldStyle1}" AutoEdit="True" CommandButtonsVisibility="None" />Hello,
I am trying to create a email message viewer like Outlook using the RichTextbox.
Is this the right control to use for this scenario?
The viewer should be able to display plain-text emails and HTML emails.
I implemented it partially but I cant get the scrollbar visiblewhen the message is longer then what can be contained in the richtextbox.
<ContentControl Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3"> <Grid> <telerikHtml:HtmlDataProvider Html="{Binding BodyText, Mode=TwoWay}" RichTextBox="{Binding ElementName=rtbHtmlEmail}" x:Name="htmlDataProvider" /> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <telerik:RadRichTextBox x:Name="rtbHtmlEmail" Padding="15" MinWidth="800" MinHeight="650" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" IsReadOnly="True" LayoutMode="Flow"/> </ScrollViewer> </Grid></ContentControl>
Hello,
I am using VS Professional 2015, DevCraft Ultimate version 2016.2.613, UI for WPF RadListBox. Using Office2013 Theme, I wish to override the color of a RadListBox's selected RadListBoxItem. I also want to override this background color for mouseover. Currently these are an orange color and I want to change that. My understanding is that the RadListBoxItem control template has a border named "SelectedVisual" and I need to override its background color. Maybe something similar for mouseover? (haven't got there yet). My problem is that I can't figure out how to do any of this using Expression Blend 2015. I'm on the Objects and Timeline pane and when I right click on my RadListBox I don't see an option for "Edit Additional Styles" which I think would get me to the RadListBoxItem's style. I do see "Edit Additional Templates" but nothing I try around that option is getting me to the "SelectedVisual" border. I would welcome any info on 1) how to do this in Blend or 2) any recommended alternative method to override RadListBoxItem's selected and mouseover background colors. Please see attached imagesto better visualize what I'm trying to do.
Thanks,
Chris
I am using WPF. I want to Export the selected Rows from the RadGridView to Excel. I have managed to export all the rows to Excel, but if the user makes a selection I want to export only the selected rows to Excel. Here is my code below, I just need ti implement the TODO section. Can someone help ?
01.public void Execute_OpenExportView(RadGridView gridViewExport)02. {03. if (gridViewExport==null)04. {05. return;06. }07. 08. string extension = "xlsx";09. SaveFileDialog dialog = new SaveFileDialog()10. {11. DefaultExt = extension,12. Filter = String.Format("{1} files (*.{0})|*.{0}|All files(*.*)|*.*", extension, "Excel"),13. FilterIndex = 1,14. AddExtension = true,15. Title = "Export to Excel",16. //FileName = 17. };18. 19. 20. //TODO export the selected rows from RadGRidView21. if (gridViewExport.SelectedItems.Count!=0)22. {23. 24. 25. }26. 27. if (dialog.ShowDialog()==true)28. {29. using (Stream stream = dialog.OpenFile())30. {31. gridViewExport.ExportToXlsx(stream,32. new GridViewDocumentExportOptions()33. {34. ShowColumnFooters = true,35. ShowColumnHeaders = true,36. ShowGroupFooters = true,37. AutoFitColumnsWidth = true,38. });39. }40. }41. 42. }hi dear supporters,
i have used the connection content and connection points to route the connection.
now, the connection content is positioned in the middle of the connection but i need to position it in other positions.
the image is attached.
my code is also here.
how can i get the needed position of the connection content.
private void diagram1_ConnectionManipulationCompleted(object sender, ManipulationRoutedEventArgs e)
{
var image = new System.Windows.Controls.Image() { Source = new BitmapImage(new Uri("components/" + "conn"+ ".png",UriKind.Relative)) };
System.Windows.Point startPoint= e.Connection.StartPoint;
System.Windows.Point endPoint= e.Connection.EndPoint;
double deltaX = Math.Abs(endPoint.X - startPoint.X);
double deltaY = Math.Abs(endPoint.Y - startPoint.Y);
image.Stretch=Stretch.Fill;
image.Width = 0.8*Math.Max(deltaX,deltaY);
image.Height = 5;
TextBlock txt = new TextBlock();
txt.Text = strSelectedComponent;
StackPanel stpanel = new StackPanel();
stpanel.Children.Add(txt);
stpanel.Children.Add(image);
Viewbox viewBox = new Viewbox() { Stretch = Stretch.None, Margin = new Thickness(-4) };
viewBox.Child = stpanel;
e.Connection.ConnectionPoints.Add(new System.Windows.Point(endPoint.X,startPoint.Y));
e.Connection.Content = viewBox;
}

Hi, I tried to follow the examples in this thead but I can't get it working. Can someone show me ho to set the backgroud of the rows where the columns Quantità and QtaPrelevata have the same value?
VB.net please.
<telerik:RadDataPager x:Name="rDataPager" PageSize="10" Source="{Binding Items, ElementName=gridOrdini}" ></telerik:RadDataPager>
<telerik:RadGridView x:Name="gridOrdini" SelectionUnit="FullRow" AutoGenerateColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" RowIndicatorVisibility="Collapsed"
ShowGroupPanel="False" IsReadOnly="False" Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" SelectionMode="Single" CanUserReorderColumns="False"
FontFamily="Source Sans Pro Semibold" FontSize="14" GridLinesVisibility="Horizontal" IsFilteringAllowed="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn x:Name="Vettore1" UniqueName="Vettore1" Header="Vettore" IsReadOnly="True" IsVisible="False" Width="60" DataMemberBinding="{Binding Vettore1}"/>
<telerik:GridViewDataColumn x:Name="Articolo" Header="Articolo" IsReadOnly="True" DataMemberBinding="{Binding Articolo}" Width="100"/>
<telerik:GridViewDataColumn x:Name="Descri" Header="Descri" IsReadOnly="True" DataMemberBinding="{Binding Descri}" Width="*"/>
<telerik:GridViewDataColumn x:Name="Quantita" Header="Quantità" IsReadOnly="True" DataMemberBinding="{Binding Quantita}" Width="80"/>
<telerik:GridViewDataColumn x:Name="QtaPrelevata" Header="Qta Prelevata" IsReadOnly="True" DataMemberBinding="{Binding QtaPrelevata}" Width="80"/>
<telerik:GridViewDataColumn x:Name="Reparto" Header="Reparto" IsReadOnly="True" DataMemberBinding="{Binding Reparto}" Width="80"/>
<telerik:GridViewDataColumn x:Name="UnMis" Header="UnMis" IsReadOnly="True" DataMemberBinding="{Binding UnMis}" Width="60"/>
<telerik:GridViewDataColumn x:Name="Cella" Header="Cella" IsReadOnly="True" DataMemberBinding="{Binding Cella}" Width="60"/>
<telerik:GridViewDataColumn x:Name="GruppoCella" Header="GruppoCella" IsReadOnly="True" DataMemberBinding="{Binding GruppoCella}" Width="80"/>
<telerik:GridViewDataColumn x:Name="CatMerc" Header="CatMerc" IsReadOnly="True" DataMemberBinding="{Binding CatMerc}" Width="80"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Thank you very mutch
Hi all,
I am working on a WPF application using Telerik and coded in C# .NET.
My following question is over a WPF page using the “Code behind” model to implement the logic of the page.
Currently, I have a <telerik:RadGridView> for which the source is the DefaultView of a DataTable containing 365 columns (or 366, it depends on the number of days in a year).
But I am facing an issue :
The source of the RadGridView is a 365/6 columns DataTable (DefaultView).
It does not seem that all the columns are loaded at the begining.
I mean that I have to scroll 3 times to the end of the scrollbar to make all the 365/6 columns appear . => This could be another issue, but it is my opinion.
I would like to know how to load all that columns at once ?
Any help or tip will be much appreciated :)