Telerik Forums
UI for WinForms Forum
2 answers
2.2K+ views

Hi,

I have installed 2019.1.115.40 trial and I am testing RadGridView and trying to achieve require results using ColumnGroups view. From the documentation I have achieved the following.

 

ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();

view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
view.ColumnGroups[0].Rows[0].ColumnNames.Add("CompanyID");

 

I have learnt that the "CompanyID" should be same as of the Column-Heading of the data-table (data-source) provided to the grid.

My question is: Is it possible if I can change this "CompanyID" text after data has been loaded into the grid.

Or is there anything I can do, as with the datagridview, we use Name property for binding and Text property for display purpose.

Attached image might help.

Thanks

 

Regards,

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Jan 2019
2 answers
92 views

Hi,

 

Is it possible to change the design of the progressbar in the GraphicalViewItem? I would like to make it a bit bigger and change the color. 

 

thanks!

Sebastiaan

Sebastiaan
Top achievements
Rank 1
 answered on 18 Jan 2019
1 answer
90 views
Hey guys, is there a way to don't close the radsplittbutton menu when the user click on RadMenuItem ? I'm wanting this because I'm using RadMenuItem as options
Leandro
Top achievements
Rank 1
 answered on 17 Jan 2019
4 answers
890 views

Hello,

I use multiselect in my gridview. I've found a strange behavior when I deselect a row among several selected rows.

For example,

Step 1, I've selected 4 rows by using Shift+left click. Here is the row stats.

Row Index | IsSelected | highlighted | isCurrent

    0            |     yes         |      yes       |      no

    1            |     yes         |      yes       |      no

    2            |     yes         |      yes       |      no

    3            |     yes         |      yes       |     yes

Step 2, I've deselected third row by using Ctrl+left click. In terms of display, nothing changes.
Row Index | IsSelected | highlighted | isCurrent
    0            |      yes       |        yes     |        no
    1            |     yes        |        yes     |        no
    2            |     no          |        yes     |       yes
    3            |     yes        |        yes      |       no

Step 3, I've deselected second row by using Ctrl+left click. In terms of display, 3 rows are highlighted, but actually 2 rows are selected.
Row Index | IsSelected | highlighted | isCurrent
    0            |     yes        |       yes       |       no
    1            |     no          |      yes        |      yes
    2            |     no          |       no        |      no
    3            |     yes         |      yes       |       no

I understand that current row and selected row are both highlighted. It's comprehensible to developer. But this behavior is not such friendly to software user.

I tried to disable highlight to current row by using row formatting. No luck.

To be more clear, I hope that only selected row can be highlighted.

Please help me. Thank you.

Kun
Top achievements
Rank 2
 answered on 17 Jan 2019
1 answer
267 views

Hi Guys,

Im currently using winforms to run multiple displays through a RadDocking system and have been asked to refresh the displays at the highest frequency possible. And i have a couple of questions regarding this.

What "graphics engine" does the ui use if any, e.g. directX etc.

Are there any optimizations i might have missed for updating the controls at high frequencies for controls like chartViews, GridViews and any other common control general optimizations.

Cheers

Dan

Hristo
Telerik team
 answered on 17 Jan 2019
2 answers
316 views

I would like to use the ChartView control to create charts of time line data. The SQL database that I am querying against has a data point for every minute for thousands of counters.  For space savings, the application that stores the data does not create a record if the value of the data points is ZERO for that minute.  For this data, that is a savings of more than 75%.

When creating a line chart, is it possible to have RadChartView treat the missing data points with the value of ZERO?  In my test application, ChartView seems to approximate the missing values and simply draws a straight line between the two point that do have a value.  This is not an accurate representation of the data. What I need is from the line chart to go to 0 for the minutes there there is no data.

I've used other charting applications that have this capability.

Chris

 

Chris Ward
Top achievements
Rank 1
 answered on 16 Jan 2019
8 answers
326 views

Hello
I have some problem with displaying RadGroupBox on HDPI that host in UserControl/System.Windows.Form and must be AutoSize = true.
In our scenario, the RadGroupBox contains RadLabel and must change size depending on the size of the text. So we set AutoSize = true. However such RadGroupBox have incorrect font scaling in the header, the font becomes at least 2 times larger than it should be, and if GB is in the scrolling container (like in the example below) even larger. 

If groupbox is hosted in RadForm the bug is not reproducible. 

I use Telerik 2018.3.1016.20 with .Net 3.5 
I very much rely on your help and advice.

Here are examples of my code and screenshots from different DPI. 

100% (Form) https://c2n.me/3Z4oYcS
100% (RadForm) https://c2n.me/3Z4p2L0
200% (Form) https://clip2net.com/s/3Z4pjSv
200% (RadForm) https://clip2net.com/s/3Z4pbV0

using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using Telerik.WinControls;
using Telerik.WinControls.Primitives;
using Telerik.WinControls.UI;
 
namespace PP.DesignExamples.BugsForTelerik
{
    public class Form6 : Form
    {
        private RadScrollablePanel actionsScroll;
        private RadGroupBox gbAutosizeTrue;
        private RadLabel lblAutosizeTrueContent;
        private RadGroupBox gbAutosizeFalse;
        private RadLabel lblAutosizeFalseContent;
 
        public Form6()
        {
            InitializeComponent();
        }
 
        private void InitializeComponent()
        {
            actionsScroll = new RadScrollablePanel();
            gbAutosizeTrue = new RadGroupBox();
            lblAutosizeTrueContent = new RadLabel();
            gbAutosizeFalse = new RadGroupBox();
            lblAutosizeFalseContent = new RadLabel();
            ((ISupportInitialize)(actionsScroll)).BeginInit();
            actionsScroll.PanelContainer.SuspendLayout();
            actionsScroll.SuspendLayout();
            ((ISupportInitialize)(gbAutosizeTrue)).BeginInit();
            gbAutosizeTrue.SuspendLayout();
            ((ISupportInitialize)(lblAutosizeTrueContent)).BeginInit();
            ((ISupportInitialize)(gbAutosizeFalse)).BeginInit();
            gbAutosizeFalse.SuspendLayout();
            ((ISupportInitialize)(lblAutosizeFalseContent)).BeginInit();
            SuspendLayout();
            //
            // actionsScroll
            //
            actionsScroll.BackColor = Color.Transparent;
            actionsScroll.Dock = DockStyle.Fill;
            actionsScroll.ForeColor = Color.Transparent;
            actionsScroll.Location = new Point(0, 0);
            actionsScroll.Margin = new Padding(0);
            actionsScroll.MaximumSize = new Size(205, 0);
            actionsScroll.MinimumSize = new Size(205, 0);
            actionsScroll.Name = "actionsScroll";
            actionsScroll.Padding = new Padding(0);
            //
            // actionsScroll.PanelContainer
            //
            actionsScroll.PanelContainer.BackColor = Color.Transparent;
            actionsScroll.PanelContainer.Controls.Add(gbAutosizeTrue);
            actionsScroll.PanelContainer.Controls.Add(gbAutosizeFalse);
            actionsScroll.PanelContainer.Location = new Point(0, 0);
            actionsScroll.PanelContainer.Margin = new Padding(0);
            actionsScroll.PanelContainer.Size = new Size(205, 423);
            //
            //
            //
            actionsScroll.RootElement.MaxSize = new Size(205, 0);
            actionsScroll.RootElement.MinSize = new Size(205, 0);
            actionsScroll.Size = new Size(205, 423);
            actionsScroll.TabIndex = 4;
            ((RadScrollablePanelElement)(actionsScroll.GetChildAt(0))).Padding = new Padding(0);
            ((FillPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(0))).Visibility = ElementVisibility.Hidden;
            ((BorderPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(1))).Width = 0F;
            ((BorderPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(1))).LeftWidth = 0F;
            ((BorderPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(1))).TopWidth = 0F;
            ((BorderPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(1))).RightWidth = 0F;
            ((BorderPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(1))).BottomWidth = 0F;
            ((BorderPrimitive)(actionsScroll.GetChildAt(0).GetChildAt(1))).Visibility = ElementVisibility.Hidden;
            //
            // gbAutosizeTrue
            //
            gbAutosizeTrue.AccessibleRole = AccessibleRole.Grouping;
            gbAutosizeTrue.AutoSize = true;
            gbAutosizeTrue.BackColor = Color.Transparent;
            gbAutosizeTrue.Controls.Add(lblAutosizeTrueContent);
            gbAutosizeTrue.Dock = DockStyle.Top;
            gbAutosizeTrue.GroupBoxStyle = RadGroupBoxStyle.Office;
            gbAutosizeTrue.HeaderText = "AutoSize = true";
            gbAutosizeTrue.Location = new Point(0, 100);
            gbAutosizeTrue.MinimumSize = new Size(0, 100);
            gbAutosizeTrue.Name = "gbAutosizeTrue";
            gbAutosizeTrue.Padding = new Padding(4, 28, 4, 0);
            //
            //
            //
            gbAutosizeTrue.RootElement.AutoSize = false;
            gbAutosizeTrue.RootElement.MinSize = new Size(0, 100);
            gbAutosizeTrue.Size = new Size(205, 100);
            gbAutosizeTrue.TabIndex = 8;
            gbAutosizeTrue.Text = "AutoSize = true";
            ((RadGroupBoxElement)(gbAutosizeTrue.GetChildAt(0))).Padding = new Padding(4, 28, 4, 0);
            ((FillPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(0).GetChildAt(0))).BackColor = Color.FromArgb(176, 223, 226);
            ((GroupBoxHeader)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1))).GroupBoxStyle = RadGroupBoxStyle.Office;
            ((GroupBoxHeader)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1))).ForeColor = Color.DodgerBlue;
            ((FillPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(0))).BackColor = Color.Transparent;
            ((FillPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(0))).SmoothingMode = SmoothingMode.None;
            ((FillPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(0))).AutoSize = true;
            ((FillPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(0))).Margin = new Padding(0);
            ((TextPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Text = "AutoSize = true";
            ((TextPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).LineLimit = false;
            ((TextPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Font = new Font("Arial", 11.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
            ((TextPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Margin = new Padding(7, 0, 0, 0);
            ((TextPrimitive)(gbAutosizeTrue.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Alignment = ContentAlignment.MiddleLeft;
            //
            // lblAutosizeTrueContent
            //
            lblAutosizeTrueContent.Dock = DockStyle.Top;
            lblAutosizeTrueContent.Location = new Point(4, 28);
            lblAutosizeTrueContent.Margin = new Padding(16);
            lblAutosizeTrueContent.Name = "lblAutosizeTrueContent";
            //
            //
            //
            lblAutosizeTrueContent.RootElement.MaxSize = new Size(0, 0);
            lblAutosizeTrueContent.Size = new Size(197, 18);
            lblAutosizeTrueContent.TabIndex = 2;
            lblAutosizeTrueContent.Text = "description will be here";
            ((RadLabelElement)(lblAutosizeTrueContent.GetChildAt(0))).TextAlignment = ContentAlignment.MiddleLeft;
            ((RadLabelElement)(lblAutosizeTrueContent.GetChildAt(0))).Text = "description will be here";
            ((FillPrimitive)(lblAutosizeTrueContent.GetChildAt(0).GetChildAt(0))).AutoSizeMode = RadAutoSizeMode.Auto;
            ((FillPrimitive)(lblAutosizeTrueContent.GetChildAt(0).GetChildAt(0))).StretchHorizontally = false;
            //
            // gbAutosizeFalse
            //
            gbAutosizeFalse.AccessibleRole = AccessibleRole.Grouping;
            gbAutosizeFalse.BackColor = Color.Transparent;
            gbAutosizeFalse.Controls.Add(lblAutosizeFalseContent);
            gbAutosizeFalse.Dock = DockStyle.Top;
            gbAutosizeFalse.GroupBoxStyle = RadGroupBoxStyle.Office;
            gbAutosizeFalse.HeaderText = "AutoSize = false";
            gbAutosizeFalse.Location = new Point(0, 0);
            gbAutosizeFalse.MinimumSize = new Size(0, 100);
            gbAutosizeFalse.Name = "gbAutosizeFalse";
            gbAutosizeFalse.Padding = new Padding(4, 28, 4, 0);
            //
            //
            //
            gbAutosizeFalse.RootElement.AutoSize = false;
            gbAutosizeFalse.RootElement.MinSize = new Size(0, 100);
            gbAutosizeFalse.Size = new Size(205, 100);
            gbAutosizeFalse.TabIndex = 8;
            gbAutosizeFalse.Text = "AutoSize = false";
            ((RadGroupBoxElement)(gbAutosizeFalse.GetChildAt(0))).Padding = new Padding(4, 28, 4, 0);
            ((FillPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(0).GetChildAt(0))).BackColor = Color.FromArgb(176, 223, 226);
            ((GroupBoxHeader)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1))).GroupBoxStyle = RadGroupBoxStyle.Office;
            ((GroupBoxHeader)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1))).ForeColor = Color.DodgerBlue;
            ((FillPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(0))).BackColor = Color.Transparent;
            ((FillPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(0))).SmoothingMode = SmoothingMode.None;
            ((FillPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(0))).AutoSize = true;
            ((FillPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(0))).Margin = new Padding(0);
            ((TextPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Text = "AutoSize = false";
            ((TextPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).LineLimit = false;
            ((TextPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Font = new Font("Arial", 11.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
            ((TextPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Margin = new Padding(7, 0, 0, 0);
            ((TextPrimitive)(gbAutosizeFalse.GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Alignment = ContentAlignment.MiddleLeft;
            //
            // lblAutosizeFalseContent
            //
            lblAutosizeFalseContent.Dock = DockStyle.Top;
            lblAutosizeFalseContent.Location = new Point(4, 28);
            lblAutosizeFalseContent.Margin = new Padding(16);
            lblAutosizeFalseContent.Name = "lblAutosizeFalseContent";
            //
            //
            //
            lblAutosizeFalseContent.RootElement.MaxSize = new Size(0, 0);
            lblAutosizeFalseContent.Size = new Size(197, 18);
            lblAutosizeFalseContent.TabIndex = 2;
            lblAutosizeFalseContent.Text = "description will be here";
            ((RadLabelElement)(lblAutosizeFalseContent.GetChildAt(0))).TextAlignment = ContentAlignment.MiddleLeft;
            ((RadLabelElement)(lblAutosizeFalseContent.GetChildAt(0))).Text = "description will be here";
            ((FillPrimitive)(lblAutosizeFalseContent.GetChildAt(0).GetChildAt(0))).AutoSizeMode = RadAutoSizeMode.Auto;
            ((FillPrimitive)(lblAutosizeFalseContent.GetChildAt(0).GetChildAt(0))).StretchHorizontally = false;
            //
            // Form6
            //
            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(311, 423);
            Controls.Add(actionsScroll);
            Name = "Form6";
            Text = "Form6";
            actionsScroll.PanelContainer.ResumeLayout(false);
            actionsScroll.PanelContainer.PerformLayout();
            ((ISupportInitialize)(actionsScroll)).EndInit();
            actionsScroll.ResumeLayout(false);
            ((ISupportInitialize)(gbAutosizeTrue)).EndInit();
            gbAutosizeTrue.ResumeLayout(false);
            gbAutosizeTrue.PerformLayout();
            ((ISupportInitialize)(lblAutosizeTrueContent)).EndInit();
            ((ISupportInitialize)(gbAutosizeFalse)).EndInit();
            gbAutosizeFalse.ResumeLayout(false);
            gbAutosizeFalse.PerformLayout();
            ((ISupportInitialize)(lblAutosizeFalseContent)).EndInit();
            ResumeLayout(false);
 
        }
    }
}

 

Hristo
Telerik team
 answered on 16 Jan 2019
1 answer
450 views

In native WinForm forms, a property called AutoValidate can be changed to EnableAllowFocusChange to allow users to continue to other controls if validation fails for an errorProvider.

I am trying to mimic this behavior with radGridView. Currently, users are unable to move onto other cells or rows, or other controls outside of the gridView until they input correct data into the cell.

I want to be able to allow the user to work on other things, add rows, edit cells on a new row or an existing row, etc without forcing them to input something just to get rid of the validation. Only at the end of the process would I loop through all controls and cells to see if an error exists, and remind the user before they can continue on.

This is so that the user doesn't put in erroneous data into the cell just so they can move on. For example, if they do not know what the account code is for an item, they would have to ask someone else and this may take some time. They should be able to work on other things on the form in the mean time.

I've tried cancelling the editor and calling EndEdit on the current active editor, but this isn't working. Users are still locked in on a cell if validation failed. How do I allow the user to get out of the cell even if an error exists?

See below on what I have tried:

   if (e.Row is GridViewDataRowInfo)
                    {
                        if (detailValidation.IsEmptyInput(((string)e.Value), out errorMsg) || (!detailValidation.IsValidDecimalFormat(((string)e.Value), out errorMsg)))
                        {
                            e.ActiveEditor.EndEdit();
                            e.Cancel = true;
                            var test = e.ActiveEditor as RadTextBoxEditor;

                            currentCell.BackColor = Color.FromArgb(255, 221, 221);
                            ((GridViewDataRowInfo)e.Row).ErrorText = errorMsg;
                            
                           
                        }
                        else
                        {
                            ((GridViewDataRowInfo)e.Row).ErrorText = string.Empty;
                        }
                    }
                   


Dimitar
Telerik team
 answered on 16 Jan 2019
7 answers
454 views
Hi,

Is it possible to have custom column types in your grid?
I need to a column that in edit mode is a drop down list of values, with each entry being color coded. I need to then convert the selected value to an enum
I made a custom column based on your GridViewComboBoxColumn, which is displaying the list of values okay, but when I select one, I can't seem to cast it to an enum
And I can't change the colors because I don't seem to have access to the combo box itself.  It looks like I would have if I could write an editor based on RadComboBoxEditor, but then I can't find a way to associate the editor with the column?

any help/suggestions much appreciated.

thanks

noha
Top achievements
Rank 1
 answered on 14 Jan 2019
1 answer
296 views
I need to count items (rows) inside radlistview1
Dimitar
Telerik team
 answered on 14 Jan 2019
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?