My project need insert chart to spreadsheet,and print all content.
I know devexpress control can add chart to spreadsheet.
when the spreadsheet can support the chart

Hi to all,
I have a simple grid, that I'm using with MVVM pattern.
<Style x:Key="ListEditableFlatStyle" TargetType="telerik:RadGridView" BasedOn="{StaticResource RadGridViewStyle}"> <Setter Property="CanUserDeleteRows" Value="True"/> <Setter Property="CanUserFreezeColumns" Value="True"/> <Setter Property="CanUserInsertRows" Value="True"/> <Setter Property="CanUserReorderColumns" Value="False"/> <Setter Property="CanUserResizeColumns" Value="True"/> <Setter Property="CanUserResizeRows" Value="False"/> <Setter Property="CanUserSelect" Value="True"/> <Setter Property="CanUserSortColumns" Value="False"/> <Setter Property="CanUserSortGroups" Value="False"/> <Setter Property="ShowGroupPanel" Value="False"/> <Setter Property="ShowSearchPanel" Value="False"/> <Setter Property="AutoGenerateColumns" Value="False"/> <Setter Property="IsReadOnly" Value="False"/> <Setter Property="SelectionMode" Value="Extended"/> <Setter Property="SelectionUnit" Value="FullRow"/> <Setter Property="IsLocalizationLanguageRespected" Value="False"/> <Setter Property="Margin" Value="2"/> <Setter Property="NewRowPosition" Value="Bottom"/> <Setter Property="GroupRenderMode" Value="Flat"/></Style><telerik:RadGridView ItemsSource="{Binding MisureModelli}" Style="{StaticResource ListEditableFlatStyle}" GroupRenderMode="Flat" Grid.Row="6" Grid.ColumnSpan="4"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding PesoLordo, StringFormat=\{0:N2\}}" Header="Peso Lordo (Kg)" HeaderTextAlignment="Right" TextAlignment="Right"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding PesoNetto, StringFormat=\{0:N2\}}" Header="Peso Netto (Kg)" HeaderTextAlignment="Right" TextAlignment="Right"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Volume, StringFormat=\{0:N3\}}" Header="Volume (m³)" HeaderTextAlignment="Right" TextAlignment="Right" IsReadOnly="True"/> </telerik:RadGridView.Columns></telerik:RadGridView>
When I click "new row", it disappears exists row, I don't undestrand why.
Dear Forum Members ,
I have a requirement to copy paste the Excel content to Radgrid view , Here few of the columns of the grid are Read only , i tried out the Below options , Any suggestions appreciated .
In Rad gridview is set the below properties
ClipboardCopyMode="Cells" ClipboardPasteMode="AllSelectedCells,Cells" SelectionMode="Extended" SelectionUnit="Cell"
and in the behaviour have the PastingCellClipboardContent event to check on the data and map it accordingly , issue here is that for read-only columns this is not fired , please do suggest
regards
Anand
Hi, I inputted a table onto my document with 1 row and 2 columns.
I then inputted a Custom Merge Field in column 2. My Custom Merge field inputs a table. Code is below
protected override DocumentFragment GetResultFragment(){ UniversalDTO universalDTO = this.Document.MailMergeDataSource.CurrentItem as UniversalDTO; if (universalDTO == null) { return null; } if (this.PropertyPath == "Collaterals") { Table table = new Table(); foreach (var coillateral in universalDTO.Collaterals) { Span span = new Span(coillateral.Type.Value); span.FontSize = 11.5; Paragraph paragraph = new Paragraph(); paragraph.Inlines.Add(span); Span span2 = new Span(coillateral.Description); span2.FontSize = 11.5; Paragraph paragraph2 = new Paragraph(); paragraph2.Inlines.Add(span2); TableCell cell = new TableCell(); cell.Blocks.Add(paragraph); cell.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent)); TableCell cell2 = new TableCell(); cell2.Blocks.Add(paragraph2); cell2.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent)); TableRow row = new TableRow(); row.Cells.Add(cell); row.Cells.Add(cell2); table.AddRow(row); } Section section = new Section(); section.Blocks.Add(table); RadDocument document = new RadDocument(); document.Sections.Add(section); document.MeasureAndArrangeInDefaultSize(); return new DocumentFragment(document); } return null;}
The issue I'm having is depicted by the image below, there's a space ontop of the nested table. If tried to delete in the document, it deletes the table. That empty line can be deleted in word though.
http://imgur.com/cf22ee44-9cdd-4840-b045-a9500c8d0569
Code View
http://imgur.com/LQirves
I have a few columns in my RadGridView, which I would like to filter - but not to allow Search as You Type.
Is there any way to do this?
In addition: I have boolean values, which I show as "Yes" and "No" in the grid - but in the filters, they are shown as "True" and "False". It there any way to change this to let the filter sow "Yes" and "No", too?
Best regards
Inger Marie
Hi,
I have a
specific behavior I want to achieve with respect to the AutoCompleteBox.
Requirements:
Tried solution:
public class MyFilteringBehavior : FilteringBehavior{ public override IEnumerable<object> FindMatchingItems(string searchText, IList items, IEnumerable<object> escapedItems, string textSearchPath, TextSearchMode textSearchMode) { if (string.IsNullOrEmpty(searchText)) return items.Cast<object>(); return base.FindMatchingItems(searchText, items, escapedItems, textSearchPath, textSearchMode); }}
private void Classes_GotFocus(object sender, RoutedEventArgs e){ var box = (RadAutoCompleteBox) sender; box.Populate(box.SearchText); //box.IsDropDownOpen = true; // Not necessary}
<telerik:RadAutoCompleteBox Grid.Row="4" Grid.Column="2" Name="Classes" ItemsSource="{Binding Classes}" AutoCompleteMode="SuggestAppend" SelectionMode="Multiple" TextSearchMode="Contains" IsHighlighted="True" FilteringBehavior="{StaticResource MyFilteringBehavior}" GotFocus="Classes_GotFocus"/>Expected behavior:
Unexpected/unwanted effects:
Is there any way to avoid the unwanted behavior while on this setup?
Hello,
I'd like to use a DesktopAlert in a WPF MVVM app.
I copy the code from the Telerik WPF app - DesktopAlert Examples - First Look app (email example).
Code:
public class AlertViewModel : BaseViewModel
{
private RadDesktopAlertManager desktopAlertManager;
public AlertViewModel()
{
this.desktopAlertManager = new RadDesktopAlertManager(AlertScreenPosition.BottomRight, 5d);
}
public Action ActivateMainWindowAction { get; set; }
private void OnAlertCommandExecuted(object param)
{
if (this.ActivateMainWindowAction != null)
{
this.ActivateMainWindowAction.Invoke();
}
}
public void TestAlert()
{
BitmapImage b = new BitmapImage();
b.BeginInit();
b.UriSource = new Uri("C:\\...\\error.png");
b.EndInit();
this.desktopAlertManager.ShowAlert(new DesktopAlertParameters
{
Header = "Header",
Content = "Content",
Icon = new Image { Source = b, Width = 48, Height = 48 },
IconColumnWidth = 48,
IconMargin = new Thickness(10, 0, 20, 0),
Command = new DelegateCommand(this.OnAlertCommandExecuted),
CommandParameter = "ABC"
});
}
}
public partial class Alert : UserControl
{
public Alert()
{
InitializeComponent();
AlertViewModel vm = ServiceLocator.Current.GetInstance<AlertViewModel>();
vm.ActivateMainWindowAction = new Action(this.ActivateMainWindow);
DataContext = vm;
}
private void ActivateMainWindow()
{
var mainWindow = Application.Current.MainWindow;
if (mainWindow != null)
{
if (mainWindow.WindowState == WindowState.Minimized)
{
mainWindow.WindowState = WindowState.Normal;
}
if (!mainWindow.IsActive)
{
mainWindow.Activate();
}
}
}
}
The DesktopAlertParameters command never execute and the alert never show.
Is there something i miss? If i try desktop alert on a new classic WPF app (no mvvm) works withuot problems.
Thanks.
Hi,
Any update on removing the white space from the menu if we are using less then 8 items?
Because it is looking very bad on the UI section.
Our clients want to remove the white space. So any option to do it?
Waiting for your quick reply.
public class ByteValidation : ValidationRule{ private byte min = 0; private byte max = byte.MaxValue; //The Minimum and Maximum values are there to restrict how low and how high the //stored value can be. public byte Minimum { get { return min; } set { min = value; } } public byte Maximum { get { return max; } set { max = value; } } public string ErrorMessage { get; set; } public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo) { if (value == null) { return new ValidationResult(true, null); } byte tmp; try { double dTmp = (double)value; tmp = (byte)dTmp; } catch (Exception) { return new ValidationResult(false, "Invalid value"); } if (tmp < min || tmp > max) { return new ValidationResult(false, ErrorMessage); } return new ValidationResult(true, null); }}<telerik:RadMaskedNumericInput Mask="##" Margin="550,0,0,0" Grid.Row="1" FontSize="16" VerticalAlignment="Bottom" FontFamily="Century Gothic"> <telerik:RadMaskedNumericInput.Value> <Binding Path="DaysPaidLast30"> <Binding.ValidationRules> <local:ByteValidation Minimum="0" Maximum="30" ErrorMessage="Value must be between 0 and 30." /> </Binding.ValidationRules> </Binding> </telerik:RadMaskedNumericInput.Value></telerik:RadMaskedNumericInput>