Hello,
I would like to know how to change the RadDesktopAlert appearance so that it will have rounded corners.
If I import an existing xlsx-file (Excel 2013) with a special Formatting and export it afterwards, the formatting is destroyed.
The file has its rows colored in different kinds of grey. After processing it, the colors are from dark blue to dark green. Seems like this depends on the brightness of the grey color of the original file.
If I use a standard Excel-Formatting, it is removed while processing.
What can be the reason for this behaviour?

| <ToolBarTray DockPanel.Dock="Top" |
| IsLocked="False"> |
| <ToolBar BandIndex="0" |
| ToolBarTray.IsLocked="False"> |
| <Button Click="Button_Click">foo</Button> |
| </ToolBar> |
| <ToolBar BandIndex="0" |
| ToolBarTray.IsLocked="False"> |
| <Button Command="ApplicationCommands.Cut" |
| Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
| HorizontalAlignment="Center" |
| VerticalAlignment="Center" /> |
| <Button Command="ApplicationCommands.Copy" |
| Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
| HorizontalAlignment="Center" |
| VerticalAlignment="Center" /> |
| <Button Command="ApplicationCommands.Paste" |
| Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
| HorizontalAlignment="Center" |
| VerticalAlignment="Center" /> |
| </ToolBar> |
| </ToolBarTray> |
| <telerik:RadToolBarTray DockPanel.Dock="Top" |
| IsLocked="False"> |
| <telerik:RadToolBar BandIndex="0" |
| telerik:RadToolBarTray.IsLocked="False"> |
| <Button Click="Button_Click">foo</Button> |
| </telerik:RadToolBar> |
| <telerik:RadToolBar BandIndex="0" |
| telerik:RadToolBarTray.IsLocked="False"> |
| <Button Command="ApplicationCommands.Cut" |
| Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
| HorizontalAlignment="Center" |
| VerticalAlignment="Center" /> |
| <Button Command="ApplicationCommands.Copy" |
| Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
| HorizontalAlignment="Center" |
| VerticalAlignment="Center" /> |
| <Button Command="ApplicationCommands.Paste" |
| Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
| HorizontalAlignment="Center" |
| VerticalAlignment="Center" /> |
| </telerik:RadToolBar> |
| </telerik:RadToolBarTray> |
Hi,
I'm trying to create a telerik rad menu with all the items with icons. The xaml code I´m using is:
01.<UserControl.Resources>02. <ResourceDictionary>03. <ResourceDictionary.MergedDictionaries>04. <ResourceDictionary Source="pack://application:,,,/Resources;component/Themes/Generic.xaml"/>05. </ResourceDictionary.MergedDictionaries>06. 07. 08. 09. <Style x:Key="MultiColumnMenuItemStyle" TargetType="telerik:RadMenuGroupItem">10. <Setter Property="ItemsPanel">11. <Setter.Value>12. <ItemsPanelTemplate>13. 14. <telerik:RadWrapPanel Orientation="Vertical" MaxHeight="300" />15. </ItemsPanelTemplate>16. </Setter.Value>17. </Setter> 18. </Style>19. 20. 21. <HierarchicalDataTemplate x:Key="MenuItemTemplate" ItemsSource="{Binding Items}"> 22. <TextBlock Text="{Binding Text}" />23. <HierarchicalDataTemplate.ItemContainerStyle>24. <Style TargetType="telerik:RadMenuItem">25. <Setter Property="IconTemplate">26. <Setter.Value>27. <DataTemplate>28. <Image Source="{Binding}"29. MaxWidth="16"30. MaxHeight="16"31. MinWidth="16"32. MinHeight="16"33. Stretch="Fill"34. Opacity="0.8"35. HorizontalAlignment="Center"36. Margin="0 0 5 0" />37. </DataTemplate>38. </Setter.Value>39. </Setter>40. <Setter Property="Icon" Value="{StaticResource Icon48MultiFolder}"></Setter>41. </Style>42. </HierarchicalDataTemplate.ItemContainerStyle>43. </HierarchicalDataTemplate>44. </ResourceDictionary>45. </UserControl.Resources>46. <Grid>47. <telerik:RadMenu 48. VerticalAlignment="Top"49. telerik:StyleManager.Theme="Windows8Touch">50. 51. 52. <telerik:RadMenuItem ItemContainerStyle="{StaticResource MultiColumnMenuItemStyle}" >53. <telerik:RadMenuItem.Icon>54. <StackPanel Orientation="Horizontal">55. <Image Source="{StaticResource Icon48Menu}" Opacity="0.8" Stretch="None" />56. </StackPanel>57. </telerik:RadMenuItem.Icon>58. 59. <telerik:RadMenuGroupItem ItemsSource="{Binding Items}"60. ItemTemplate="{StaticResource MenuItemTemplate}">61. 62. </telerik:RadMenuGroupItem>63. </telerik:RadMenuItem>64.</telerik:RadMenu>65. </Grid>66.</UserControl>But in the menu result, the first level has not any icons. (You can see the image attached)
Any idea?
Hi,
I have been unable to right align the contents of a merged cell in my RadGridView using the VS2013 dark theme.
With a little digging following the default cell template, it doesn't have the horizontal alignment bound.
I have therefor altered the control templates ContentControl as follows to fix the problem.
<ContentControl x:Name="PART_ContentPresenter" IsTabStop="{TemplateBinding IsTabStop}" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="Stretch" <!-- Added below--> HorizontalAlignment="{TemplateBinding HorizontalAlignment}" <!-- Added above--> HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>I am not sure whether this needs updating in the default theme Telerik.Windows.Controls.GridView.xaml but it would seem to make sense to me.
Regards,
Shaun Criten
How I can export a table to a specific Excel sheet ?
<p>string file = this.radGridView.ToExcelML(objects, true);</p><p>File.WriteAllText("F:\\test.xls", file);</p>
The export works correctly. But I generates a file in a default sheet "WorkSheet" I would like to indicate the name of the sheet in the export.
Hello,
I try to set a dependency property in a gridviews custom column, based on GridViewBoundColumnBase, with binding to another field of my datasource. The problem is, that then the Int32 dependency property always is set with the int default value of 0 and not the actual value in my data. If I also show this field as additional column, I can see, that it is filled correct in the datasource.
When I set the dependency property with a fixed value (e.G. 2), this value is properly transferred to the custom column implementation. When I try binding, nothing is set in the custom column implementation. I also tried a nullable type for my property, than always the null value is set, if I try binding.
After intense internet research, studding examples and other people problems and resolutions, my implementation should work, but unfortunately it don't.
Here my code:
01.public class ActualValueInputColumn : GridViewBoundColumnBase02.{03. public Int32 TestStepType04. {05. get { return (Int32) GetValue (TestStepTypeProperty); }06. set { SetValue (TestStepTypeProperty, value); }07. }08.09. public static readonly DependencyProperty TestStepTypeProperty =10. DependencyProperty.Register ("TestStepType", typeof (Int32), typeof (ActualValueInputColumn), new PropertyMetadata (null));11.12. public override FrameworkElement CreateCellEditElement (GridViewCell cell, object dataItem)13. {14. FrameworkElement picker = null;15. if (TestStepType == 0)16. {17. RadMaskedNumericInput numberPicker = new RadMaskedNumericInput ();18. numberPicker.SetBinding (RadMaskedNumericInput.ValueProperty, this.CreateValueBinding ());19. picker = numberPicker;20. }21....22. else if (TestStepType == 2)23. {24. RadMaskedTextInput textPicker = new RadMaskedTextInput ();25. textPicker.SetBinding (RadMaskedTextInput.ValueProperty, this.CreateValueBinding ());26. picker = textPicker;27. }28.29. return picker;30. }31.32. public override object GetNewValueFromEditor (object editor)33. {34. ...35. }36.37. private Binding CreateValueBinding ()38. {39. Binding valueBinding = new Binding ();40. valueBinding.Mode = BindingMode.TwoWay;41. valueBinding.NotifyOnValidationError = true;42. valueBinding.ValidatesOnExceptions = true;43. valueBinding.UpdateSourceTrigger = UpdateSourceTrigger.Explicit;44. valueBinding.Path = new PropertyPath (this.DataMemberBinding.Path.Path);45.46. return valueBinding;47. }48.}And by XAML (shortened):
01.<telerik:RadGridView x:Name="RadGridView1"02. telerik:StyleManager.Theme="Windows8Touch"03. ItemsSource="{Binding MeasuringMachineValues}"04. AutoGenerateColumns="False"05. ShowGroupPanel="False"06. IsFilteringAllowed="False"07. FontSize="18"08. CanUserDeleteRows="False"09. CanUserInsertRows="False">10. <telerik:RadGridView.Columns>11. <telerik:GridViewDataColumn Header="TestStepType"12. DataMemberBinding="{Binding TestStepType}"13. IsReadOnly="True"14. <qw:ActualValueInputColumn Header="Actual Value custom column"15. DataMemberBinding="{Binding ActualValueAsString, Mode=TwoWay}"16. TestStepType="{Binding TestStepType}"/>17. <telerik:GridViewDataColumn Header="Actual value standard"18. DataMemberBinding="{Binding ActualValueAsString}" />19. </telerik:RadGridView.Columns>20.</telerik:RadGridView>
Please can anybody tell me, what is wrong with my implementation or even give me a hint, how to debug this binding to get a clue, where the problem is?
Greetings
Thomas
Hi. I write C# WPF MVVM Prism 6 application. I'm interested in RadTreeListView with buttons-column there. I defined the folowing XAML for buttons-column in RadTreeListView:
<telerik:RadTreeListView x:Name="Hierarchical" Grid.Row="2" Grid.Column="0" AutoGenerateColumns="False" AutoExpandItems="True" IsSynchronizedWithCurrentItem="True" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserSortGroups="False" CanUserDeleteRows="False" CanUserInsertRows="False" IsFilteringAllowed="False" EnableLostFocusSelectedState="False" RowIndicatorVisibility="Collapsed" SelectionUnit="FullRow" ItemsSource="{Binding DeviceProfile}" Visibility="{Binding AreRegistersInHierarchyVisible}" SelectedItem="{Binding SelectedProfileElement}" >. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <!--Button-column "Read current value from outer device selected register"--> <telerik:GridViewDataColumn IsVisible="{Binding IsReadColumnButtonVisible}"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <telerik:RadButton Margin="5" Content="Read Register Current Value" Visibility="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type telerik:GridViewRow}}, Converter={StaticResource booleanToVisibilityConverter}}" Command="{Binding InitializeRegisterCurrentValueReadingCommand}"/> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .</telerik:RadTreeListView>I use your BooleanToVisibilityConverter in Prism UserControl where the RadTreeListView is:
<UserControl.Resources> <telerik:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter"/></UserControl.Resources>Below is the source code of 'InitializeRegisterCurrentValueReadingCommand' command that is in View Model to which the Prism UserControl binds to:
// The command definition.public DelegateCommand<object> InitializeRegisterCurrentValueReadingCommand { get; private set; }// The command logic method.private void initializeRegisterValueReading(object parameter){ // My custom C# code}// The command CanExecute method.private bool initializeRegisterValueReadingCanExecute(object parameter){ // Some bolean condition is.}// Here is creating of command inside View Model constructor.this.InitializeRegisterCurrentValueReadingCommand = new DelegateCommand<object>(this.initializeRegisterValueReading, this.initializeRegisterValueReadingCanExecute);Please see the screnshot in 'RadTreeListView_with_buttons.PNG' file attached. Where "Прочитать значение из регистра" button is "Read Register Value" button and "Записать значение в регистр" button is "Write Value To Register" button. "InitializeRegisterCurrentValueReadingCommand' command is bound to "Read Register Value" button. But when I pess (click) this button the command doesn't fire! I also tryed the following notation in XAML:
<telerik:EventToCommandBehavior.EventBindings> <telerik:EventBinding Command="{Binding InitializeRegisterCurrentValueReadingCommand}" EventName="Click" PassEventArgsToCommand="True"/></telerik:EventToCommandBehavior.EventBindings>But the result was the same pitiable-bad. But interestingly, when I create the handler of ButtonClick event (for button-cell) in code-behind, the the handler fires when the button is clicked! But my application is pure MVVM application! So how do I make the command fire when user clicks the button? Either with such markup:
<telerik:GridViewDataColumn IsVisible="{Binding IsReadColumnButtonVisible}"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <telerik:RadButton Margin="5" Content="Прочитать значение из регистра" Visibility="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type telerik:GridViewRow}}, Converter={StaticResource booleanToVisibilityConverter}}" Command="{Binding InitializeRegisterCurrentValueReadingCommand}"/> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn>or with such markup:
<telerik:GridViewDataColumn IsVisible="{Binding IsReadColumnButtonVisible}"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <telerik:RadButton Margin="5" Content="Прочитать значение из регистра" Visibility="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type telerik:GridViewRow}}, Converter={StaticResource booleanToVisibilityConverter}}"> <telerik:EventToCommandBehavior.EventBindings> <telerik:EventBinding Command="{Binding InitializeRegisterCurrentValueReadingCommand}" EventName="Click" PassEventArgsToCommand="True"/> </telerik:EventToCommandBehavior.EventBindings> </telerik:RadButton> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn>How do I make the command fire when user clicks the button? Please help solve the problem. Thank you very much in advance.
Hi,
I have following code:
<telerik:RadScheduleView > <telerik:RadScheduleView.ViewDefinitions > <telerik:DayViewDefinition /> <telerik:WeekViewDefinition /> </telerik:RadScheduleView.ViewDefinitions> <telerik:RadScheduleView.GroupDescriptionsSource> <telerik:GroupDescriptionCollection> <telerik:DateGroupDescription /> <telerik:ResourceGroupDescription ResourceType="_StaffWorkplace" /> </telerik:GroupDescriptionCollection> </telerik:RadScheduleView.GroupDescriptionsSource></telerik:RadScheduleView>How I can hide some resource on certain date? I tried to use GroupFilter, but it's work fine for me only for DayViewDefinition.
Regards,
Vladimir