Telerik Forums
UI for WinForms Forum
5 answers
589 views

Hi

How can the pivot grid auto resize the width of it's columns according to the width of it's column's data.

PivotGridElement.BestFitHelper.BestFitColumns() doesn't work for me.

Basically I want to execute the best fit function (provided in context menu for any column) for all members of ColumnGroupDescriptions and RowGroupDescriptions.

Additionally, I want to hide the PivotRowDescriptorContainer, PivotFilterDescriptorContainer and PivotColumnDescriptorContainer when the pivotgrid has no data,

or remove the "Drag data items here", "Drag row items here" and "Drag column items here" message that is displayed in this case so that the user doesn't try to do so (I am not using the RadPivotFieldList).

Hristo
Telerik team
 answered on 05 Feb 2018
3 answers
396 views

My gridview datasource is only updated when all row changes are complete; however, when a cell in a sorted column is changed, the grid is sorted immediately so the changing row may move positions.  This can be confusing to the user.  How can I prevent the grid from resorting until after the row changes are complete?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Feb 2018
7 answers
942 views

I see the datatype instead of the values I should see..

using System.ComponentModel;
 
namespace TelerikGridViewTests.Models
{
    public class CarsViewModel : ViewModelBase
    {
        public CarsViewModel()
        {
            _cars = new BindingList<CarViewModel>();
 
            _cars.Add(new CarViewModel()
            {
                Id = 0m,
                Description = "Ford",
                Colors = new ColorsViewModel().Colors,
            });
 
            _cars.Add(new CarViewModel()
            {
                Id = 1m,
                Description = "Chevy",
                Colors = new ColorsViewModel().Colors,
            });
 
            _cars.Add(new CarViewModel()
            {
                Id = 2m,
                Description = "Dodge",
                Colors = new ColorsViewModel().Colors,
            });
        }
 
        BindingList<CarViewModel> _cars;
        public BindingList<CarViewModel> Cars { get { return _cars; } set { _cars = value; } }
    }
 
    public class CarViewModel : ViewModelBase
    {
        public decimal Id { get; set; }
        public string Description { get; set; }
 
        BindingList<ColorViewModel> _colors;
        public BindingList<ColorViewModel> Colors
        {
            get { return _colors; }
            set { _colors = value; }
        }
    }
 
    public class ColorsViewModel : ViewModelBase
    {
        public ColorsViewModel()
        {
            Colors = new BindingList<ColorViewModel>();
 
            Colors.Add(new ColorViewModel()
            {
                Id = 1,
                Color = "Blue",
            });
            Colors.Add(new ColorViewModel()
            {
                Id = 2,
                Color = "Red",
            });
            Colors.Add(new ColorViewModel()
            {
                Id = 3,
                Color = "Green",
            });
            Colors.Add(new ColorViewModel()
            {
                Id = 4,
                Color = "Yellow",
            });
        }
 
        public BindingList<ColorViewModel> Colors { get; set; }
    }
 
    public class ColorViewModel : ViewModelBase
    {
        public int Id { get; set; }
        public string Color { get; set; }
    }
}

 

Here is where I bind...

public Form1()
{
    InitializeComponent();
 
    BindingList<CarViewModel> _cars = new CarsViewModel().Cars;
    radGridView1.DataSource = _cars;
}

 

I've set the DisplayMember of the column to "Color", the ValueMember to "Id" and the DataType to "System.ComponentModel.BindingList`1[TelerikGridViewTests.Models.ColorViewModel]"  Instead of seeing the colors in the combobox I see "System.ComponentModel.BindingList`1[TelerikGridViewTests.Models.ColorViewModel]" instead.  See attached screens.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Feb 2018
2 answers
158 views

I have a GridView with many rows (let's call it Grid A).  Within each row there is another GridView (Grid B).  This is created when the RowSourceNeeded event is raised. 

When the user changes a value in one of the columns in my GridView (Grid A), I need this to result in removing the GridView (Grid B) that was added during RowSourceNeeded and have the event be raised again.

Dimitar
Telerik team
 answered on 02 Feb 2018
4 answers
307 views

For a float value, the PropertyGridSpinEditor is always used. 

It is not comfortable. For example, the value is always rounded to two decimal places.

How to do that this editor is not used and the SingleConverter (overridden) was used

 

Valery
Top achievements
Rank 1
Veteran
 answered on 02 Feb 2018
2 answers
88 views

Why is the radrotator seem to be poor at updating at it's defined intervals? The same thing also happens in First Look.

I thought that maybe the webbrowser element was slowing things down if it sensed it needed to update and repaint, but Im finding that using a rotator with 2 png files can take many seconds to recover after resizing a window, if it ever recovers (I get bored waiting after a minute or two) as it appears to stall.

Are there any hints to improve performance and prevent stalling please? I can't use the control if I can't rely on it working reliably.

 

Dimitar
Telerik team
 answered on 02 Feb 2018
2 answers
133 views

Hi.

Using VS2017 with Telerik control set version 2018.1.116.40

I'm following the help document Telerik simple example for using the radrotator control and am having design time problems with script errors generated in visual studio every time I attempt to use the radwebbrowser item in the rotator.. I'm setting it to http://www.telerik.com. I've not tried any other URL. I've not had a chance to test suppressing script errors at runtime as I've no clue how to get beyond the design time problem :D

The errors are thrown by VS2017 itself and I can't break out of the constant stream of exception messages. I have to close it using task manager each time. Once VS reloads all sorts of corruptions seem to occur in VS's settings.

My only option is to go into the x.designer.cs file and delete references and code for the webbrowser item.

If its easily solveable then it might be useful to document this in the example so that users can fix it before it happens.

Can you help please?

Hristo
Telerik team
 answered on 02 Feb 2018
4 answers
280 views
ERD
I'm trying to use the RadDiagram to create an ERD that shows a root entity and all of its first level relationships. The goal is to have the related entities placed in a circle around the root entity. This is easily enough accomplished with the RadialTree layout. The second requirement is that the layout use orthogonal lines. Is there a way to achieve both of these goals in conjunction?
Hristo
Telerik team
 answered on 02 Feb 2018
3 answers
233 views

I've tried to put this question in the forum but the page keeps disappearing after I click "submit", so here I am...

I have a 3 column GridView and the GridViewComboBoxColumn is not binding correctly.  I've set the following for the grid.

  1. DisplayMember = Color
  2. ValueMember = Id 
  3. DataType =  System.ComponentModel.BindingList`1[TelerikGridViewTests.Models.ColorViewModel]

When I run the application I see "System.ComponentModel.BindingList`1[TelerikGridViewTests.Models.ColorViewModel]" instead of the object within my model.  For my other 2 columns in the grid (a decimal and a string) those are displayed just fine. 

 

Here is my model code... 

using System.ComponentModel;

namespace TelerikGridViewTests.Models
{
    public class CarsViewModel : ViewModelBase
    {
        public CarsViewModel()
        {
            _cars = new BindingList<CarViewModel>();

            _cars.Add(new CarViewModel()
            {
                Id = 0m,
                Description = "Ford",
                Colors = new ColorsViewModel().Colors,
            });

            _cars.Add(new CarViewModel()
            {
                Id = 1m,
                Description = "Chevy",
                Colors = new ColorsViewModel().Colors,
            });

            _cars.Add(new CarViewModel()
            {
                Id = 2m,
                Description = "Dodge",
                Colors = new ColorsViewModel().Colors,
            });
        }

        BindingList<CarViewModel> _cars;
        public BindingList<CarViewModel> Cars { get { return _cars; } set { _cars = value; } }
    }

    public class CarViewModel : ViewModelBase
    {
        public decimal Id { get; set; }
        public string Description { get; set; }

        BindingList<ColorViewModel> _colors;
        public BindingList<ColorViewModel> Colors
        {
            get { return _colors; }
            set { _colors = value; }
        }
    }

    public class ColorsViewModel : ViewModelBase
    {
        public ColorsViewModel()
        {
            Colors = new BindingList<ColorViewModel>();

            Colors.Add(new ColorViewModel()
            {
                Id = 1,
                Color = "Blue",
            });
            Colors.Add(new ColorViewModel()
            {
                Id = 2,
                Color = "Red",
            });
            Colors.Add(new ColorViewModel()
            {
                Id = 3,
                Color = "Green",
            });
            Colors.Add(new ColorViewModel()
            {
                Id = 4,
                Color = "Yellow",
            });
        }

        public BindingList<ColorViewModel> Colors { get; set; }
    }

    public class ColorViewModel : ViewModelBase
    {
        public int Id { get; set; }
        public string Color { get; set; }
    }
}

 

and code which binds the model..

using System.ComponentModel;
using System.Windows.Forms;
using TelerikGridViewTests.Models;

namespace TelerikGridViewTests
{
    public partial class Form1 : Form
    {        
        public Form1()
        {
            InitializeComponent();

            BindingList<CarViewModel> _cars = new CarsViewModel().Cars;
            radGridView1.DataSource = _cars;
        }
    }
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Feb 2018
2 answers
146 views

Hello,
Is there a way to load a pdf file; located in Project's Resources, into pdfviewer?

Thanks a lot,

William

wiquezada
Top achievements
Rank 1
 answered on 01 Feb 2018
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?