Telerik Forums
UI for WinForms Forum
4 answers
394 views
I'm using RadChart v2011.3.11.1219 with a .Net 4.0 WinForms app using VS 2010 sp1. In this app I am displaying a couple of charts, but I am wondering if it is possible to generate a line chart and save it to png without ever displaying the chart?

How would I go about doing that?
Stefan
Telerik team
 answered on 03 Mar 2016
11 answers
463 views
I have tried searching everywhere and I have found no mention of the issue I am running into. Using a winforms application I add a png image to a radgridview. Then I export the Radgridview to a pdf file. However, in the pdf the image only shows up as the text "System.Drawing.Bitmap". Any idea what could cause the image to not render for the pdf? It looks just fine within the radgridview. I'm currently using version 2010.2.10.914 of the winform controls. Any help would be greatly appreciated.


This is the code I used to produce the Pdf.
private void AddImage(RadGridView TheGrid, MemoryStream mStream)
        {
            Image TheImage = System.Drawing.Image.FromStream(mStream);
            GridViewImageColumn ImageColumn = new GridViewImageColumn();
            ImageColumn.ImageLayout = ImageLayout.Stretch;
            ImageColumn.Width = 1095;
            ImageColumn.IsVisible = true;
 
            radGridView1.MasterGridViewTemplate.Columns.Add(ImageColumn);
            radGridView1.MasterGridViewTemplate.Rows.Add(TheImage);
            radGridView1.Refresh();
        }
 
            radGridView1.MasterGridViewTemplate.Columns.Add(Chart);
            radGridView1.MasterGridViewTemplate.Rows.Add(ChartImage.Image);
            radGridView1.Refresh();
        }
 
 
 
 
private void radGridView1_Click(object sender, EventArgs e)
        {
             
            if (this.radGridView1.Rows.Count != 0)
            {
                ExportToPDF exporter = new ExportToPDF(this.radGridView1);
                exporter.FileExtension = "pdf";
                exporter.ExportVisualSettings = true;
                exporter.PageTitle = "Chart";
                exporter.FitToPageWidth = true;
                exporter.PdfExportSettings.EnableCopy = true;
                 
 
                exporter.SummariesExportOption = SummariesOption.ExportAll;
 
                string fileName = "C:\\ExportedData.pdf";
                exporter.RunExport(fileName);
 
            }

Stefan
Telerik team
 answered on 03 Mar 2016
2 answers
135 views

I might just be missing a very simple property here... the rows appear fine as soon as the application is run, but as soon as you click on a row, the value is rounded to two decimal places. Here's my code:

private void RadForm1_Load(object sender, EventArgs e)
{
    RadPropertyStore PropertyStore = new RadPropertyStore();
 
    radPropertyGrid1.SelectedObject = PropertyStore;
     
    PropertyStore.Add(new PropertyStoreItem(typeof(double), "test", 184.9484));
    PropertyStore.Add(new PropertyStoreItem(typeof(double), "test2", 341651.7823));
}

I tried to force the decimal places to remain the same using this, but it did not work:

private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
{
    PropertyGridTableElement te = sender as PropertyGridTableElement;
    PropertyGridSpinEditor editor = e.Editor as PropertyGridSpinEditor;
 
    if (editor != null && te != null)
    {
        ((BaseSpinEditorElement)editor.EditorElement).DecimalPlaces = 5;
    }
}

How can I prevent my values from being rounded?

 

Thanks!

Ryan
Top achievements
Rank 1
 answered on 02 Mar 2016
7 answers
299 views
I'm having issues using the [Logo] feature when attempting to print a grid. For my test, I've got a png file at a size of 63x18 pixels and I want to place it in the LeftFooter. It does print it, but the logo is stretched instead of retaining its shape. I've attached an image of what I'm seeing.

Here is a snippet of code I'm using in my testing.
var doc = new RadPrintDocument();
doc.HeaderHeight = 20;
doc.FooterHeight = 18;
doc.HeaderFont = new Font("Arial", 10, FontStyle.Bold);
doc.FooterFont = new Font("Arial", 8, FontStyle.Regular);
doc.LeftHeader = "Test Header";
doc.Logo = System.Drawing.Image.FromFile(@"Z:\Home\Kurt\Y&M Logos\ymlogo_63x18.png");
doc.LeftFooter = "[Logo]";
doc.Landscape = true;
doc.AssociatedObject = radGridView1;
doc.Print();

If I had the ability to set the Width of the LeftFooter, or force the size of the Logo, I'd be set, but I can't find a way to do this. Any ideas?
Stefan
Telerik team
 answered on 02 Mar 2016
4 answers
70 views
hi want show text with right to left in rad print document please help me.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Mar 2016
1 answer
235 views

Hello,

I want to make use of the AutoCompleteBox so the user has a nice autocomplete feature, without him being able to input other values then the ones in the autocomplete items. I've been looking for this some time now, but it seems like in WPF and Web it's the SelectionMode property. But in my Winform project, there is no such a property.

Can you tell me if this is possible and if so, how (which winform property i need to set). I'm using latest .net, latest telerik updates etc. Control is RadAutoCompleteBox.

Thanks a lot!

best regards,

Francois

 

Dimitar
Telerik team
 answered on 02 Mar 2016
1 answer
655 views
I have data grid , When the form loads, the grid is just an empty because there are no data . Is there any way to display the grid lines when there are no data ? like that excell page. Thank you!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Mar 2016
1 answer
157 views

Hi there,

There seems to be a bug with the PivotGrid when using the Export to Excel function.

Using the Demo Application for WinForms, you can just open the PivotGrid - Export to Excel example and then export one.

After that, minimize the Demo Application to task bar, and maximize it back. Some of the rows will be missing. If you keep minimizing and maximing, the rows that are disappearing will keep changing.

I'm not sure if this bug is just on my machine or if there's anything that that needs to be installed.

Thanks!

Ralitsa
Telerik team
 answered on 02 Mar 2016
6 answers
675 views
Hi,

    I'm looking for a way to have a tree dock to the left side in a collapsible panel, and a panel on the right side to fill.  If the left side panel is collapsed I'd like the right side to consume the free space?   Any hints on how to do this?

thanks
Mike
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Mar 2016
0 answers
85 views
How can I auto height header of Grid?
Feri
Top achievements
Rank 1
 asked on 02 Mar 2016
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?