Telerik Forums
UI for WinForms Forum
1 answer
331 views

Hi, I have a problem with convert "Telerik.WinControls.Ui.RadDropDownList" to "System.Windows.forms.Control"



I used "Control" from "System.Windows.Forms.Control" to find the elements used in an application I'm reverse engineering, and found a "RadDropDownList" as per the attached screenshot:


I would like to change the index of this list, but I can't convert from "Control" to "RadDropDownList".

Can anyone help me?

Translating the print error:
Cannot cast type "System.Windows.Forms.Control" to "Tlerik.WinControls.UI.RadDropDownList"

Adding:

I already tried to cast "Control" to "ComboBox" and got the following error when running the application. So I tried to cast it with "RadDropDownList":

 

Translating the error:

An unhandled exception occurred in the application. If you click continue, the application will ignore this error and try to continue. If you click Terminate, the application will terminate immediately.

Cannot cast an object of type 'Telerik.WinControls.UI.RadDropDownList' to type 'System.Windows.Forms.ComboBox'

 

Dinko | Tech Support Engineer
Telerik team
 answered on 30 Nov 2021
2 answers
796 views

Hello,

I'm using VS 2019 (Image 0)

Since the last update I'm getting this error trying to update projects: (image 1)

Failed to execute command.

System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\users\jonovoa\appdata\local\microsoft\visualstudio\16.0_8573c414\extensions\akzfqu3o.rq0\ProjectManagement\Upgrade\ScenarioDefinition.xml'.
   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, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
   at System.Threading.CompressedStack.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
   at System.Xml.XmlTextReaderImpl.OpenUrl()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Telerik.VSX.WizardEngine.Configuration.ScenarioDefinition.Deserialize(String fileName)
   at Telerik.VSX.ProjectConfiguration.ProjectConfigurationTypeSelectorBase.GetScenario(ProjectManagementScenarioPath path)
   at Telerik.WinControls.VSX.ProjectConfigurators.ProjectConfigurationTypeSelector.ProjectUpgrade(IPropertyDataDictionary additionalPreWizardData)
   at Telerik.WinControls.VSX.ProjectConfigurators.StreamlinedProjectConfiguration.StartUpgradeWizard()
   at Telerik.WinControls.VSPackage.CommandExecutor.Execute(UInt32 commandId)
   at Telerik.VSX.VSPackage.PackageBase.CommandCallback(Object sender, EventArgs e)

 

 

I have tried to remove and reinstall from Telerik control panel, it didn't work.

I also tried removing and reinstalling the extension within visual studio. it didn't work. 

 

I have found that the path c:\users\jonovoa\appdata\local\microsoft\visualstudio\16.0_8573c414\extensions\akzfqu3o.rq0 (image 2)

does not contain the folder mentioned in the error description: 

c:\users\jonovoa\appdata\local\microsoft\visualstudio\16.0_8573c414\extensions\akzfqu3o.rq0\ProjectManagement 

 

I just noted that I have another path with all the files: (image 3)

C:\Users\jonovoa\AppData\Local\Microsoft\VisualStudio\16.0_8573c414\Extensions\p2gdkolo.2so\ProjectManagement\Upgrade

 

Finally:

Visual studio throws a couple of warnings due to UNRESPONSIVE EXTENSIONS, with the following offenders:

"Progress Telerik  UI for Winforms Extension version 2021.2.505.1" (image 4)

"Progess Telerik WInforms Converter version 2021.2.505.1" (image 5)

 

My installed version is: R2 2021 (2021.2.511.0) (image 6)

 

Please help me to solve this.

Thanks,

Jorge

GIAnet
Top achievements
Rank 2
Iron
 answered on 26 Nov 2021
2 answers
127 views

I'm currently migrating a 160-form application to the latest Telerik framework, and I need to do some processing which is common to all forms:

- checking for, and applying a user-saved theme

- positioning the form where the user last saved it.

I could implement a method call in the _load event for each form, but I wonder if there is a better way. Maybe a kind of 'load' event which applies to all forms. Or some way to modify RadForm - whilst still making the Designer work.

Does anyone have a soltion for this which is neater than adding a method call in each of 160 forms (and remembering to do it for any ones) ?

Ian
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 25 Nov 2021
2 answers
419 views

hi

Why do I want to uncheck all the form checkboxes, but the regular checkbox is done ?!

 

 

my code is

void ClearForm(GroupBox control)
        {
               
            
                foreach (Control chexkBox in control.Controls)
                {
                    if (chexkBox is CheckBox)
                    {
                        ((CheckBox)chexkBox).Checked = false;

                    }


                }

                foreach (Control textBox in control.Controls)
                {
                if (textBox.GetType() == typeof(TextBox))
                    {
                        ((TextBox)textBox).Text = "no";

                    }

                }
            

           


        }
Dinko | Tech Support Engineer
Telerik team
 answered on 25 Nov 2021
1 answer
276 views

Hello Telerik,

What is the simple way to use a "classic" DropDown Editor for the PropertyGrid without implementing a converter and the standar value but directly a datasource for the property of an object representing a relation to a collection !

Is it possible to change the items of the PropertyGridDropDownListEditor with event or should I implement a custom editor ?

I haven't seen this case covered in the doc.

Best regards

Marco Guignard

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Nov 2021
1 answer
238 views

I'm trying to create simple variation on the Fluent theme. (as in article https://docs.telerik.com/devtools/winforms/tools/visual-style-builder/working-with-visual-style-builder/fluent-themes-blending which looks like exactly what I need)

I opened the copy of Visual Style Builder form the /lib...directory in my project, but I can't get further than a loading error.

I choose:

  1. Open VSB
  2. Choose Tools / Gneerate Fluent Theme Variation
  3. Dialog "requires "Fluent" theme to be loaded..." - YES
  4. Error "Failed to import theme package from recource: " (OK)
  5. Empty path name not legal.

What path it it looking for, and where do I set it ?

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Nov 2021
1 answer
149 views

Hi.

I have two gridviews in a form: Master and Detail. I am trying to set the focus on Detail Grid when the Master grid UserAddedRow Event occurs. I tried with Telerik grids, but, it doesn't work. The focus always stays in the Master grid.

In other question, you answer me with the below code sample, but, this sample shows the Detail grid inside the Master grid. My customer wants to do what I am showing in the PNG attachment, in order to make the fingering fast.

The sample in PNG was developed in native VS DataGridView.

Thanks

Code sample:

  DataTable masterTable = new DataTable();
        DataTable childTable = new DataTable();

        public RadForm1()
        {
            InitializeComponent();

            masterTable.Columns.Add("Id", typeof(int));
            masterTable.Columns.Add("Name", typeof(string));
            for (int i = 0; i < 3; i++)
            {
                masterTable.Rows.Add(i, "Row" + i);
            }
            childTable.Columns.Add("Id", typeof(int));
            childTable.Columns.Add("ParentId", typeof(int));
            childTable.Columns.Add("Title", typeof(string));
            childTable.Columns.Add("Date", typeof(DateTime));
            Random rand = new Random();
            for (int i = 0; i < 20; i++)
            {
                childTable.Rows.Add(i, rand.Next(0, 3), "Child" + i, DateTime.Now.AddDays(i));
            }

            radGridView1.DataSource = masterTable;
            radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = childTable;
            template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            radGridView1.MasterTemplate.Templates.Add(template);

            GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "MasterChild";
            relation.ParentColumnNames.Add("Id");
            relation.ChildColumnNames.Add("ParentId");
            radGridView1.Relations.Add(relation);

            this.radGridView1.UserAddedRow+=radGridView1_UserAddedRow; 
        } 

        private void radGridView1_UserAddedRow(object sender, GridViewRowEventArgs e)
        {
            e.Row.IsExpanded = true;
            this.radGridView1.CurrentRow = ((GridViewHierarchyRowInfo)e.Row).Views[0].TableAddNewRow;
            this.radGridView1.CurrentColumn = this.radGridView1.MasterTemplate.Templates[0].Columns[0];
            this.radGridView1.BeginEdit(); 
        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Nov 2021
7 answers
693 views
Is it just me or is there a feature missing from the RadControls DateTimePicker that is in the normal DateTimePicker from Microsoft...

I am looking to activate this as shown here. in the RadDateTimePicker

I looked though all the over and over again and was not able to find it.

Thank you
Michael
Top achievements
Rank 1
Iron
 answered on 19 Nov 2021
1 answer
1.2K+ views
(VB.net) I need to open the forms that I have already created in my project within different tabs of a RadTabbedForm, I calculate that it is something simple but I did not find how to do it

It would also be useful for me to know how to open a form within a radPageViewPage tab


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Nov 2021
11 answers
407 views

I have the following code in the event

 private void mccbSelectTheme_SelectedValueChanged(object sender, EventArgs e)
        {
            string cc = mccbSelectTheme.EditorControl.CurrentRow.Cells[1].Value.ToString();

         }

 

I keep getting a System.Null reference exception when I click the dropdown arrow.  

 

The control is loaded with2 columns with column 1 not visible.  

Paul
Top achievements
Rank 1
Iron
 answered on 18 Nov 2021
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)
Chart (obsolete as of Q1 2013)
Form
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
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
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
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
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?