Hey,
is there a way to bring the labels of the x-axis to the front of a
i know i can work with the opacity of the bars but that doesn't seem to be a nice way to do this.
Hey,
is there a way to bring the labels of the x-axis to the front of a
i know i can work with the opacity of the bars but that doesn't seem to be a nice way to do this.
sorry i forgot to mention it is a wijmo C1BarChart
The C1 InputNumber control aligns with the label fine but the C1 InputMask does not.
See example attached picture. Any ideasÉ
Original HTML did not show correctly in initial post. Here it is
[html]
[/html]
Hi Prabhakar,
Thank you for your time in answering my question.
I attached two files which contains the sample codes. The flexgrid_ModelBinding.txt shows the modelBinding method which I followed in the link below but does not work:
http://demos.componentone.com/ASPNET/MVCExplorer/FlexGrid/Paging
The flexgrid_RemoteBinding.txt file uses the remote binding method. The paging works but I would like to know why the model binding doesn't work. Kindly refer to the file. I have made comments for clarification.
Again, thank you for your assistance. Hope to hear from you soon.
Best regards,
draguel
Attached is the flexgrid_RemoteBinding.txt file
The answer from support is to add the following to the InputMast
.CssStyle("vertical-align", "bottom")
And that fixed it.
FlexGrid SearchPanel not highlighting text on a form with ThemeController set to the following styles - VisualStyleOffice2010Silver, VisualStyleOffice2010Blue or VisualStyleOffice2010Black. It is working for other themes. Refer to the attached screen shots:
- VisualStyleOffice2010Blue.png - Theme = VisualStyleOffice2010Blue - highlighting NOT working
Excel.NET will not print an ampersand in the footer. To print and ampersand in the footer using Excel you enter "This && That" in the footer text - this is not working in Excel.NET.
Hi
Looking at http://demos.componentone.com/ASPNET/5/FlexChart101
Would like to configure the chart (flexchartmodel) completely in the controller, including series, labels and other settings.
Then, would like to pass this model to cshtml view and be able to instantiate flexchart using this model.
Kindly advise.
I have just updated WinForms to 4.0.20171.248 and now cannot get a C1PrintPreviewControl form to show up in my existing vs2015.net projects. I have even tried creating a new project and get the same attached error. Please let me know how to solve this issue. Thanks.
I am trying to use the C1FlexGridSearchPanel with the C1FlexGrid.
I add both controls to the form and link the SearchPanel on the FlexGrid.
When running the application, I receive the following exception whether the FlexGrid is bound or unbound.
'C1.Win.C1FlexGrid.C1FlexGridSearchPanel' does not contain a definition for 'Cols'
Has anyone noticed that FlexReport, specifically C1Zip uses up memory when exporting to pdf. After refactoring my application, to be sure I disposed of all objects, I was still consuming 2 gigabytes of memory after exporting 538 reports. I took a snapshot of the heap and noticed that the only thing growing was C1Zip. I set the PDFFilter UseCompression property to false and the memory stopped growing but the file size increase by 5 or 6 times. I am disposing of the PDFFilter after each report but the C1Zip memory still exists (when UseCompression set to true). Is there any way to release the memory between document exports.
I have extended the WPF C1DataGrid (Derived class named AllianceMainListGrid). The grid's source is bound to a ListCollectionView and it's SelectionMode="Row". The issue I am having is the the top, left-most cell is selected when the grid is loaded. If a user clicks this cell in order to select the top row, the row is highlight, but isn't selected. In other words, the CurrentItem in the ListCollectionView isn't changed. The user can click any other cell in the same row and the CurrentItem changes fine.
It appears the issue is because the Cell is already selected (it has a border around that cell) and not change is being registered. So it seems the solution is to deselect the cell on startup. How can this be achieved? Or maybe you have a better solution for my underlying problem.
Here are the styles used for the grid. One is based on the other:
<Style x:Key="DataGridBaseStyle" TargetType="{x:Type c1:C1DataGrid}">
<Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGridColumnHeaderPresenterStyle}"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="CanUserFilter" Value="False"/>
<Setter Property="CanUserAddRows" Value="False"/>
<Setter Property="CanUserRemoveRows" Value="False"/>
<Setter Property="CanUserReorderColumns" Value="True"/>
<Setter Property="CanUserSelectByDragging" Value="False"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="SelectionMode" Value="SingleRow"/>
<Setter Property="HeaderForeground" Value="White"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="ShowGroupingPanel" Value="False"/>
<Setter Property="attachedProps:FocusExtension.IsFocused" Value="{Binding MainGridIsFocused}"/>
</Style>
<Style TargetType="{x:Type controls:AllianceMainListGrid}" BasedOn="{StaticResource DataGridBaseStyle}">
<Setter Property="UserCanRightClickDelete" Value="True"/>
<Setter Property="IsEnabled" Value="{Binding IsDirty, Converter={StaticResource inverseBoolean}}"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="CanUserEditRows" Value="False"/>
<Setter Property="CanUserSort" Value="True"/>
<Setter Property="GridLinesVisibility" Value="None"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type c1:C1DataGrid}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard/>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ReadOnly">
<Storyboard/>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="LoadingStates">
<VisualState x:Name="Ready"/>
<VisualState x:Name="Loading">
<Storyboard>
<BooleanAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsActive" Storyboard.TargetName="LoadingBackground">
<DiscreteBooleanKeyFrame KeyTime="0" Value="True"/>
</BooleanAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid x:Name="GridControl">
<Grid.Resources>
<ControlTemplate x:Key="TopLeftCornerTemplate" TargetType="{x:Type Button}">
<Grid x:Name="RootElement">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverElement">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard/>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0" Duration="0:0:0.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
<DiscreteDoubleKeyFrame KeyTime="0" Value="0"/>
<LinearDoubleKeyFrame KeyTime="0" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused"/>
<VisualState x:Name="Unfocused"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<c1:C1BrushBuilder x:Name="TopLeftCornerBackgroundBrush" DesignColor="#FFD1DCE8" ExtrapolationMethod="Absolute" IsHitTestVisible="False" Input="{TemplateBinding Background}" Visibility="Collapsed">
<c1:C1BrushBuilder.DesignBrush>
<RadialGradientBrush>
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.984" ScaleX="1.984"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform CenterY="0.5" CenterX="0.5"/>
<TranslateTransform X="0.502" Y="0.508"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop Color="#FFD1DCE8" Offset="1"/>
</RadialGradientBrush>
</c1:C1BrushBuilder.DesignBrush>
</c1:C1BrushBuilder>
<c1:C1BrushBuilder x:Name="TopLeftCornerOverBrush" DesignColor="#FFBFE1EA" ExtrapolationMethod="Absolute" IsHitTestVisible="False" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" Visibility="Collapsed">
<c1:C1BrushBuilder.DesignBrush>
<RadialGradientBrush>
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.984" ScaleX="1.984"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform CenterY="0.5" CenterX="0.5"/>
<TranslateTransform X="0.502" Y="0.508"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop Color="#FFBFE1EA" Offset="1"/>
</RadialGradientBrush>
</c1:C1BrushBuilder.DesignBrush>
</c1:C1BrushBuilder>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Background="{Binding Output, ElementName=TopLeftCornerBackgroundBrush}" CornerRadius="0"/>
<Border x:Name="MouseOverElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Background="{Binding Output, ElementName=TopLeftCornerOverBrush}" CornerRadius="0" Visibility="Collapsed"/>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom"/>
</Grid>
</ControlTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<c1:C1BrushBuilder x:Name="BottomRightCornerBackgroundBrush" DesignColor="#FFD1DCE8" ExtrapolationMethod="Absolute" IsHitTestVisible="False" Input="{TemplateBinding HeaderBackground}" Visibility="Collapsed">
<c1:C1BrushBuilder.DesignBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFD1DCE8" Offset="1"/>
</LinearGradientBrush>
</c1:C1BrushBuilder.DesignBrush>
</c1:C1BrushBuilder>
<Grid x:Name="BottomRightCorner" Grid.Column="1" Grid.Row="2">
<Border x:Name="BackgroundElement" Background="{Binding Output, ElementName=BottomRightCornerBackgroundBrush}" CornerRadius="0"/>
</Grid>
<c1:DataGridGroupingPresenter x:Name="Grouping" BorderThickness="0,0,2,1" Grid.ColumnSpan="2" IsTabStop="False"/>
<Border x:Name="GridContent" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="0" Grid.Row="1">
<Grid x:Name="Root">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button x:Name="TopLeftCorner" Background="{TemplateBinding HeaderBackground}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="RootElement">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverElement">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard/>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0" Duration="0:0:0.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
<DiscreteDoubleKeyFrame KeyTime="0" Value="0"/>
<LinearDoubleKeyFrame KeyTime="0" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused"/>
<VisualState x:Name="Unfocused"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<c1:C1BrushBuilder x:Name="TopLeftCornerBackgroundBrush" DesignColor="#FFD1DCE8" ExtrapolationMethod="Absolute" IsHitTestVisible="False" Input="{TemplateBinding Background}" Visibility="Collapsed">
<c1:C1BrushBuilder.DesignBrush>
<RadialGradientBrush>
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.984" ScaleX="1.984"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform CenterY="0.5" CenterX="0.5"/>
<TranslateTransform X="0.502" Y="0.508"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop Color="#FFD1DCE8" Offset="1"/>
</RadialGradientBrush>
</c1:C1BrushBuilder.DesignBrush>
</c1:C1BrushBuilder>
<c1:C1BrushBuilder x:Name="TopLeftCornerOverBrush" DesignColor="#FFBFE1EA" ExtrapolationMethod="Absolute" IsHitTestVisible="False" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" Visibility="Collapsed">
<c1:C1BrushBuilder.DesignBrush>
<RadialGradientBrush>
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.984" ScaleX="1.984"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform CenterY="0.5" CenterX="0.5"/>
<TranslateTransform X="0.502" Y="0.508"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop Color="#FFBFE1EA" Offset="1"/>
</RadialGradientBrush>
</c1:C1BrushBuilder.DesignBrush>
</c1:C1BrushBuilder>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Background="{Binding Output, ElementName=TopLeftCornerBackgroundBrush}" CornerRadius="0"/>
<Border x:Name="MouseOverElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Background="{Binding Output, ElementName=TopLeftCornerOverBrush}" CornerRadius="0" Visibility="Collapsed"/>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom"/>
</Grid>
</ControlTemplate>
</Button.Template>
<Path Data="M10,0L10,10 0,10z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Right" Height="10" Opacity="0.3" Stretch="None" VerticalAlignment="Bottom" Width="10"/>
</Button>
<c1:DataGridColumnsHeaderPanel x:Name="ColumnsHeader" Background="{TemplateBinding HeaderBackground}" Grid.Column="1" MinHeight="16"/>
<c1:DataGridRowsPanel x:Name="Body" Background="{TemplateBinding Background}" Grid.Column="1" Grid.Row="1"/>
<c1:DataGridRowsHeaderPanel x:Name="RowsHeader" Background="{TemplateBinding HeaderBackground}" Grid.Row="1"/>
</Grid>
</Border>
<Border x:Name="Border_HorizontalScrollBar" Grid.Row="2">
<ScrollBar x:Name="HorizontalScrollBar"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
Background="{TemplateBinding HeaderBackground}"
Foreground="{TemplateBinding HeaderForeground}"
Height="Auto"
c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}"
Template="{DynamicResource ScrollBarTemplate}"
Orientation="Horizontal"
c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}"
Visibility="Collapsed"/>
</Border>
<Border x:Name="Border_VerticalScrollBar" Grid.Column="1" Grid.Row="1">
<ScrollBar x:Name="VerticalScrollBar"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
Background="{TemplateBinding HeaderBackground}"
Foreground="{TemplateBinding HeaderForeground}"
c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}"
Orientation="Vertical"
c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}"
Template="{DynamicResource ScrollBarTemplate}"
Visibility="Collapsed"
Width="Auto"/>
</Border>
<Popup x:Name="Popup"/>
</Grid>
<c1:C1ProgressIndicator x:Name="LoadingBackground" IsTabStop="False" IsActive="False" Style="{Binding LoadingIndicatorStyle, RelativeSource={RelativeSource TemplatedParent}}"/>
<Border x:Name="DisabledVisualElement" Background="#77E8E8E8" CornerRadius="0" IsHitTestVisible="False" Visibility="Collapsed"/>
</Grid>
<controls:VerticalListViewButtonBar x:Name="verticalButtonBar" Grid.Column="1"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Hi,
I'm trying to migrate an application from using C1Report to C1FlexReport. One feature of C1Report frequently used by the application is the rendering of the report output as a Pdf to a memory stream (subsequently consumed through a service call to a mail server).
The C1FlexReport samples I've viewed to achieve a similar result render the file to disk with an export filter (RenderToFilter()). The application generates hundreds of reports in payment/statement runs and this would be inefficient resulting in high disk IO.
Redacted function code
Friend Function CreatePdfAttachment(attachmentName As String, report As C1Report) As MemoryStreamAttachment
Dim reportStream As MemoryStream = New MemoryStream()
report.RenderToStream(reportStream, FileFormatEnum.PDFEmbedFonts)
Return New MemoryStreamAttachment(reportStream, MediaTypeNames.Application.Pdf, attachmentName)
End Function
Is it possible to achieve the same outcome with C1FlexReport without writing the output to disk?
Regards.
Hi,
for achieving the same, you need to specify the Stream property in PdfFilter without any file name as:
'Render the C1FlexReport as stream
Dim ms As New MemoryStream()
Dim pdf As New PdfFilter()
pdf.Stream = ms
c1FlexReport1.RenderToFilter(pdf)
ms.Position = 0
' if you want to save in disk
Dim fs As New FileStream("flex.pdf", FileMode.Create)
ms.WriteTo(fs)
fs.Close()
Hope, it will work for you.
Thanks,
Sonu
Hi Kathika,
This problem happens when you ask C1Report to export the report but it's busy in rendering.
Please try to check the C1Report.IsBusy property before exporting the report. Please do not try to export a report when C1Report.IsBusy property returns TRUE.
If this does not solve your issue please share a sample application or code snippet and steps to reproduce the same with us so that we can assist you further accordingly.
Hope, it clarifies.
Thanks,
Sonu
Hi,
Below are the answers for your questions:
1. In ValidateEdit event you can select all the text when validation fails after setting e.Cancel to true by getting the editor of the FlexGrid as TextBox and calling it's SelectAll method.
private void c1FlexGrid1_ValidateEdit(object sender, ValidateEditEventArgs e)
{
if(e.Col == 1)
{
if(c1FlexGrid1[e.Row,e.Col].ToString() != "TEST")
{
e.Cancel = true;
TextBox tb = (TextBox)c1FlexGrid1.Editor;
tb.SelectAll();
}
}
}
2. To set the maximum value in a cell when user enters a higher value you need to use AfterEdit event of FlexGrid.
private void c1FlexGrid1_AfterEdit(object sender, RowColEventArgs e)
{
if(e.Col == 2)
{
if(Convert.ToSingle(c1FlexGrid1[e.Row,e.Col]) > 50)
{
MessageBox.Show("Maximum Limit Is 50.");
c1FlexGrid1[e.Row, e.Col] = 50;
}
}
}
Hope it helps.
Thanks,
Akshay
Hi,
Thanks for providing the screenshot.
In order to change the back and fore color of fixed rows and columns you need to change their style using the code given below:
c1FlexGrid1.Styles.Fixed.BackColor = Color.Red;
c1FlexGrid1.Styles.Fixed.ForeColor = Color.Yellow;
Please let us know if you need any further assistance on it.
Thanks,
Akshay
Hi,
In order to further investigate on this issue we request you to please share a sample application along with some screenshots/video file representing the issue you are facing.
Thanks,
Akshay