Telerik Forums
UI for WinForms Forum
13 answers
663 views
Hi,

I'm trying to use the BestFit method dynamically to resize the column width property as the largest word in my DataSet in one column specific. But when I use this method, the application fit the column as the largest word that I can see, and if I slide the scroll down, some words in the grid column is truncated. 

How can I do to display all my grid data with no truncate words?

Regards
Hristo
Telerik team
 answered on 29 Sep 2016
1 answer
190 views

Hello, I am not sure whether to post this in the RichTextEditor forum or the Telerik Document Processing forum as this problem exists in both import/export methods.

This is the code that triggers the error:

using Telerik.WinForms.Documents.FormatProviders.Rtf;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var rtf = @"{\rtf1\ansicpg1252{\fonttbl{\f0Arial ;}{\f1Tahoma ;}}{\colortbl;\red0\green0\blue0;}\sectd{\*\footer}{\*\header}\paperw12240\paperh15839\margl1439\margr1439\margt1439\margb1439\pgbrdropt40\pgbrdrt\pgbrdrb\pgbrdrl\pgbrdrr{{\trowd\trautofit\irow0\lastrow\clnowrap\cellx9360{\ql{\pard{\trowd\trautofit\trkeep\irow0\intbl\itap2{\ql{\pard{\trowd\trrh-1727\trkeep\irow0\lastrow\intbl\itap3{\ql{\plain\f0\fs20\cf1 Aaron Fitz Electrical, your invoice(s) are past due. The total remaining amount is $29120.06.}\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trrh-1727\trkeep\irow0\lastrow\clpadt39\clpadft3\clpadr39\clpadfr3\cellx9360\nestrow}{\nonesttables\par}}\trowd\trautofit\trkeep\irow0\clnowrap\cellx9360}\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trautofit\trkeep\irow0\clnowrap\cellx9360\nestrow}{\nonesttables\par}}{\trowd\trautofit\trkeep\irow1\intbl\itap2{\ql{\pard{\trowd\trrh-1188\irow0\intbl\itap3{\ql{\pard{\trowd\trrh-724\trkeep\irow0\intbl\itap4{\ql{\plain\f1\fs20\cf1 Invoice Num}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs20\cf1 Transaction Description}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs20\cf1 Purchase Order Num}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs20\cf1 Amount}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs20\cf1 Doc Date}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs20\cf1 Due Date}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs20\cf1 Total Amount Due}\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trrh-724\trkeep\irow0\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx1151\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx2303\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx3455\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx4607\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx5759\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx6911\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\clvertalc\cellx8063\nestrow}{\nonesttables\par}}{\trowd\trrh-434\trkeep\irow1\lastrow\intbl\itap4{\ql{\plain\f1\fs18\cf1 SVC1000              }\nestcell{\nonesttables\par}}{\ql\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs18\cf1                      }\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs18\cf1 4322.98000000}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs18\cf1 6/12/2013 12:00:00 AM}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs18\cf1 7/12/2013 12:00:00 AM}\nestcell{\nonesttables\par}}{\ql{\plain\f1\fs18\cf1 468.70000000}\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trrh-434\trkeep\irow1\lastrow\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx1151\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx2303\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx3455\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx4607\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx5759\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx6911\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clpadt39\clpadft3\clpadr39\clpadfr3\cellx8063\nestrow}{\nonesttables\par}}\trowd\trrh-1188\irow0\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clnowrap\cellx8093\clnowrap\cellx9360}\nestcell{\nonesttables\par}}{\ql\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trrh-1188\irow0\clbrdrt\brdrs\brdrw14\brdrcf1\clbrdrb\brdrs\brdrw14\brdrcf1\clbrdrl\brdrs\brdrw14\brdrcf1\clbrdrr\brdrs\brdrw14\brdrcf1\clnowrap\cellx8093\clnowrap\cellx9360\nestrow}{\nonesttables\par}}{\trowd\trrh-1691\irow1\lastrow\intbl\itap3{\ql\nestcell{\nonesttables\par}}{\ql\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trrh-1691\irow1\lastrow\clnowrap\cellx8093\clnowrap\cellx9360\nestrow}{\nonesttables\par}}\trowd\trautofit\trkeep\irow1\clnowrap\cellx9360}\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trautofit\trkeep\irow1\clnowrap\cellx9360\nestrow}{\nonesttables\par}}{\trowd\trrh-1440\trkeep\irow2\lastrow\intbl\itap2{\ql\nestcell{\nonesttables\par}}{\*\nesttableprops\trowd\trrh-1440\trkeep\irow2\lastrow\clnowrap\cellx9360\nestrow}{\nonesttables\par}}\trowd\trautofit\irow0\lastrow\clnowrap\cellx9360}\cell}\row}}\sect}";
            var inProvider = new RtfFormatProvider();
            var document = inProvider.Import(rtf);
        }
    }
}

 

I get a NullReferenceException

   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfImportContext.FlushTableRowsIntoTable(List`1 rowStackItems)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfImportContext.FlushStructureStack()
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfImportContext.HandleSectionEnd()
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfHandlers.RtfTagHandlers.SectionEndHandler(RtfTag tag, RtfImportContext context)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.DoVisitTag(RtfTag tag)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitElement(RtfElement element, Boolean recursive)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitGroupChildren(RtfGroup group, Boolean recursive)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.ImportRoot(RtfGroup rtfGroup)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.Import(Stream input, RtfImportSettings settings)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider.Import(Stream input)
   at Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider.Import(String input)
   at ConsoleApplication1.Program.Main(String[] args) in C:\Users\Daniel Flaws\Desktop\temp\ConsoleApplication1\Program.cs:line 10

I am pretty sure that this RTF is well-formatted; it opens correctly in Microsoft Word, and it came directly from an export of a Telerik Report.

Is there anything I can do to fix this?

Dimitar
Telerik team
 answered on 29 Sep 2016
1 answer
110 views

Does the Winform Chartview have built in Virtualization or Sampling?  We are experiencing slow response time with large clusters of points!  How would you handle this scenario?

 

Thanks

Dimitar
Telerik team
 answered on 29 Sep 2016
2 answers
1.0K+ views

What control is used to build the left side navigation in a screenshot shown on this page? http://docs.telerik.com/devtools/winforms/introduction

I am assuming it can collapse to show only icons, which is what I am looking to do.

This page has a nice animated GIF showing what I am trying to do http://www.devcomponents.com/dotnetbar/SideNavControl.aspx
Dimitar
Telerik team
 answered on 29 Sep 2016
6 answers
390 views

Hello :)

is it possible to hide this border (see picture)?

 

Thank you in Advance

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Sep 2016
9 answers
1.1K+ views
I want to ask where can I find the icons used on the Teleriks Controls.. I'm creating a program that uses RadPropertyGrid.. and I wanted to know where are located the icons for the search bar and the cross (cancel search) because I want to create a search text box... somewhere else and for the sake of graphic coherence I wanted graphics to be the same.. Thank you in advance! 
Stefan
Telerik team
 answered on 27 Sep 2016
4 answers
194 views
Hi
I have to prompt the user to confirm a delete of row (rows).
For the single row it is easy via RowsChanging event.
But it is not the way for multiple rows deliting (in that case confirmation dialog will be shown for every selected row).

How can I show single confirmation dialog for multiple rows deleting?

User can delete rows from keyboard as well as from standard content menu.

------------------
Telerik.WinControls version 2014.3.1021.40
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Sep 2016
6 answers
217 views
I have a RadScrollbar (RadVScrollBar) working great except for some sizing problems.

I want to increase the size of the RadVScrollBar1.  I have increased the size of the .Size property and also adjusted the size of the thumb scroller according to:
http://www.telerik.com/support/kb/article/b454K-tmh-b454T-ckt-b454c-ckt.aspx

However, I want to adjust the size of the Up arrow and down arrow.  I want the area of clickability to be larger so it is easer to click on a larger sized control.  Also, is is possible to insert my own (arrow) image to replace the current arrows provided?
Ben
Top achievements
Rank 1
 answered on 26 Sep 2016
1 answer
294 views

Hello guys,

I've just make a project and my main form is radform1. now I want to add another radform but I get This Error

 

An error occurred while running the wizard.

Error executing custom action Telerik.VSX.TextTemplating.Actions.UnfoldFilesAction: An exception was thrown while trying to compile the transformation code. The following Exception was thrown:
System.IO.FileNotFoundException: Could not find file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\System.dll'.
File name: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\System.dll'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(String path)
   at Roslyn.Utilities.FileUtilities.OpenFileStream(String path)
   at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
   at Microsoft.VisualStudio.TextTemplating.CompilerBridge.<>c.<.ctor>b__15_0(String x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<UnionIterator>d__66`1.MoveNext()
   at System.Linq.Enumerable.<UnionIterator>d__66`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.ImmutableArrayExtensions.AsImmutableOrEmpty[T](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.Compilation.ValidateReferences[T](IEnumerable`1 references)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.WithReferences(IEnumerable`1 references)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CommonWithReferences(IEnumerable`1 newReferences)
   at Microsoft.VisualStudio.TextTemplating.CompilerBridge.PrepareNewCompilation()
   at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Compile()
   at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)
----------------------------------------------------------------------------------------------------

Momchil
Telerik team
 answered on 26 Sep 2016
1 answer
342 views

Hi, 

I am using ConditionalFormattingObject to format cells like this:

 

var x = new ConditionalFormattingObject("column", ConditionTypes.NotEqual, "-1", "", false);
x.CellBackColor = Color.FromArgb(222, 253, 219);
x.CellForeColor = Color.Blue;
column.ConditionalFormattingObjectList.Add(x);

Everything is fine until a multi-cell selection.

It seems to me that ConditionalFormattingObject also overrides the background coloring for the selected cells, but it should not.

Please check the attachment, which shows what is now and what should be.

I do not want to use the ViewCellFormatting event becouse of performance reasons.

 

ConditionalFormattingObject x1 = new ConditionalFormattingObject(column.FieldName, ConditionTypes.NotEqual, "-1"""false);
x1.CellBackColor = Color.FromArgb(222, 253, 219);
x1.CellForeColor = Color.Blue;
column.ConditionalFormattingObjectList.Add(x1);
ConditionalFormattingObject x1 = new ConditionalFormattingObject(column.FieldName, ConditionTypes.NotEqual, "-1"""false);
x1.CellBackColor = Color.FromArgb(222, 253, 219);
x1.CellForeColor = Color.Blue;
column.ConditionalFormattingObjectList.Add(x1);
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Sep 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
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?