Telerik Forums
UI for WinForms Forum
1 answer
64 views

Add a GridViewCheckBoxColumn to the GridView and set its EnableHeaderCheckBox property to true. An exception is caused when the column is hidden and the Readonly property of the GridView is set.

The test code is as follows: Press Btn1 and then Btn2 to trigger an exception.
public partial class RadForm1 : RadForm
{
    private bool flag1 = false;
    private bool flag2 = false;
    private GridViewCheckBoxColumn checkColumn;

    public RadForm1()
    {
        InitializeComponent();
        AddCheckColumn();
        AddButton();

        this.radGridView1.RowCount = 10;
        this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
        this.radGridView1.MasterTemplate.AllowAddNewRow = false;
    }

    private void AddCheckColumn()
    {
        checkColumn = new GridViewCheckBoxColumn();
        checkColumn.Name = "Select";
        checkColumn.HeaderText = "All";
        checkColumn.EnableHeaderCheckBox = true;
        this.radGridView1.Columns.Insert(0, checkColumn);
        this.radGridView1.HeaderCellToggleStateChanged += RadGridView1_HeaderCellToggleStateChanged;

        this.radGridView1.Columns.Add(new GridViewTextBoxColumn("A"));
        this.radGridView1.Columns.Add(new GridViewTextBoxColumn("B"));
    }

    private void RadGridView1_HeaderCellToggleStateChanged(object sender, GridViewHeaderCellEventArgs e)
    {
        MessageBox.Show($"Stateļ¼š{e.State}");
    }

    private void AddButton()
    {
        Button btn1 = new Button();
        btn1.Text = "Btn1";
        btn1.Click += (o, e) =>
        {
            checkColumn.IsVisible = flag1;
            flag1 = !flag1;
        };
        btn1.Location = new Point(5, 5);
        this.Controls.Add(btn1);

        Button btn2 = new Button();
        btn2.Text = "Btn2";
        btn2.Click += (o, e) =>
        {
            if (flag2)
                radGridView1.Hide();
            else
            {
                radGridView1.Show();
                try
                {
                    radGridView1.ReadOnly = flag2;
                }
                catch { }
            }
            flag2 = !flag2;
        };
        btn2.Location = new Point(120, 5);
        this.Controls.Add(btn2);
    }
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Jul 2023
1 answer
64 views
Hi,
   Currently i designed in RadRibbonForm, now we want to change to ordinary radform, but when i see controls tab , RadFormConverter control is missing version 2017, is there any way to change the ribbonform to radform ?

Or if i delete ribbon control and show form top bar like minimize, maximize and close icons ?

Pls reply asap

Regards
Aravind
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Jul 2023
1 answer
122 views

I just started using RadPDFViewer and it works well but I have two things that are driving me crazy.

  1. How do I remove the white spacing at the top of the control between the pdf and top of the control.
  2. There is a black border around the PDF itself inside the control that I would like to remove.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Jul 2023
1 answer
92 views

HI,

Is it possible to apply Telerik themes to any of the native (i.e. non-Telerik) Microsoft controls, such as System.Windows.Forms.Button?  This is possible with WPF controls (https://docs.telerik.com/devtools/wpf/styling-and-appearance/stylemanager/common-styling-themes-mscontrols), but I have not found any documentation for doing this with WinForms controls.

Is this possible? 

Thanks!

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Jul 2023
1 answer
110 views

We want to use a customer Browsable() attribute to Show/Hide columns from a grid, but we are having an issue just getting it to work.  Does telerk grids support customer browsable attribute?   I know it does for DisplayName.  

If so, I could use some help.

Dinko | Tech Support Engineer
Telerik team
 answered on 30 Jul 2023
1 answer
63 views

Hello

 

How to get the IdOperacao value from selected row?

 

Best Regards,

Marco Gaspar

 

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Jul 2023
2 answers
89 views

Helo, i'll go straight to the point

 

************** ERROR START **************

See the end of this message for details on invoking 

just-in-time (JIT) debugging instead of this dialog box.

 

************** Exception Text **************

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

  at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()

  at Telerik.WinControls.ComponentInputBehavior.ElementUnderMouseMonitorTimer_Tick(Object sender, EventArgs e)

  at System.Windows.Forms.Timer.OnTick(EventArgs e)

  at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)

  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** ERROR END **************

 

I get the error when i subscribe to the event 'GraphicalViewItemFormatting'.

Example: THIS-OBJECT:radGanttView1:GraphicalViewItemFormatting:Subscribe(THIS-OBJECT:radGanttView1_GraphicalViewItemFormatting).

 

I can replicate the error by moving the mouse really fast (from the text element to the graphic element over and over again). If i unsubscribe then everything works just fine. This error is faster to replicate if there's more objects in the RadGanttView in question.

 

This error doesn't seem to exist anywhere BUT in Progress. I had this problem with the "RadGridView" but i managed to go around it. Something i wasn't able to do in this object.

 

My goal is to change the items/tasks colors but aparently that isn't something that can be done OUTSIDE of an event...

 

I talked to my colleagues and the ones with years of experience said it's probably on the DLL side. They said a 'Collection' is being modified at the wrong time and it's not in my control. 

 

Does anyone know how to go around this? How I may change the items colors without using this event? Maybe a way to disable highlights and animations on the object to prevent said 'Collection' from being modified?

 

Thank you.

 

JP

 

Update1: Aparently this also happens to the 'TextViewItemFormatting' event. If i comment both subscribes everything goes perfect.

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Jul 2023
1 answer
115 views

I am using the RadMaskedEditBox to limit the user input. I need to allow the user to enter values from 0.0 to 999.9.  I was using a MaskType of Standard with a Mask of 999.9 or ###.#...however, this is forcing the user to enter numbers that are < 100 as 099.0. The users down't want to enter 0 for any value below 100, this is a real pain for them. so, I switched it to using a MaskType of Numeric and setting the Mask to N1, but this has its own problem of allowing the user to enter 9999999.9, which when saved, thows an error (the underline field is only 5 characters).  Since there is no MaxLenth field on this control, I need a better method.   I looked at using REGEX as the masktype, but, to this date, I still struggle with REGEX EXPRESSIONS and how to create an REGEX Expression to make this work.  Anyone help me out here. 

 

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Jul 2023
1 answer
69 views

Hello All,

     I'm working on an active directory project where the RadTreeView requires it's nodes to have images according to the nodes respective containers (I.E. User Accounts will have an user icon). I have posted some code relating to my issue. I hope someone here can shed some light on this and tell me what it is I'm doing wrong.

To be clear on this, the nodes show active directory binded data but not the images. Thank you in advance.

 


        public void subEnumerateChildren(RadTreeNode oRootNode)
        {
            DirectoryEntry deParent = new DirectoryEntry("LDAP://RootDSE");


            foreach (DirectoryEntry deChild in deParent.Children)
            {
                RadTreeNode oChildNode = oRootNode.Nodes.Add(deChild.Path);
                switch (deChild.SchemaClassName)
                {
                    case "computer":
                        oChildNode.ImageIndex = 6;
                        break;
                    case "user":
                        oChildNode.ImageIndex = 7;
                        break;
                    case "group":
                        oChildNode.ImageIndex = 8;
                        break;
                    case "organizationalUnit":
                        oChildNode.ImageIndex = 3;
                        break;
                    case "container":
                        oChildNode.ImageIndex = 1;
                        break;
                    case "publicFolder":
                        oChildNode.ImageIndex = 5;
                        break;
                    default:
                        oChildNode.ImageIndex = 1;
                        break;
                }

                oChildNode.Tag = deChild;
                oChildNode.Text = deChild.Name.Substring(3).Replace("\\", "");

            }
        }

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Jul 2023
1 answer
75 views

Hello everyone, I want to turn off the hidden function of the ribbonTab drop-down interface after double-clicking the mouse in Telerik's radRibbonBar control. How can I change it? I rewrote the double-click event of the ribbonTab and found that it has no effect. After double-clicking the ribbonTab, it will still be hidden. Thank you.


        private void radRibbonBar1_Load(object sender, EventArgs e)
        {
            foreach (var tab in radRibbonBar1.CommandTabs)
            {
                tab.DoubleClick += new EventHandler(ribbonTab_DoubleClick);
            }
        }

        private void ribbonTab_DoubleClick(object sender, EventArgs e)
        {
            // do nothing
        }

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Jul 2023
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?