Telerik Forums
UI for WinForms Forum
3 answers
307 views
Hello, I am very new to Telerik, but others in my group have been using it for some time and nobody else experiences this issue and cannot reproduce this issue.

I am modifying a GUI that has been generated by another engineer, simply, I am moving a button by only a couple of pixels and the VS2010 designer changes nearly a hundred of lines of code in the designer.cs file.  But they only lines of code that prevent the GUI from displaying are included here, and at the bottom of the message is the exception that occurs at run-time.

Original Code (Bold code is removed by the VS designer/Telerik after button is moved):
            // 
            // radScrollablePanel1
            // 
            this.radScrollablePanel1.AutoScroll = true;
            this.radScrollablePanel1.AutoScrollMargin = new System.Drawing.Size(0, 0);
            this.radScrollablePanel1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this.radScrollablePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radScrollablePanel1.Location = new System.Drawing.Point(0, 0);
            this.radScrollablePanel1.Name = "radScrollablePanel1";
            this.radScrollablePanel1.Padding = new System.Windows.Forms.Padding(1);
            // 
            // radScrollablePanel1.PanelContainer
            // 
            this.radScrollablePanel1.PanelContainer.AutoScroll = true;
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel8);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel14);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel1);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel13);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel2);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel12);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel3);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel11);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel4);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel10);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel5);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel9);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel6);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.label12);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.panel7);
            this.radScrollablePanel1.PanelContainer.Controls.Add(this.GeneralQryResultRichTextBox);
            this.radScrollablePanel1.PanelContainer.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radScrollablePanel1.PanelContainer.Location = new System.Drawing.Point(1, 1);
            this.radScrollablePanel1.PanelContainer.Name = "PanelContainer";
            this.radScrollablePanel1.PanelContainer.Size = new System.Drawing.Size(940, 530);
            this.radScrollablePanel1.PanelContainer.TabIndex = 0;


After Modification of the button control (Bold code is added by the VS/Telerik after button is moved): 
            // 
            // radScrollablePanel1
            // 
            this.radScrollablePanel1.AutoScrollMargin = new System.Drawing.Size(0, 0);
            this.radScrollablePanel1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this.radScrollablePanel1.Controls.Add(this.radScrollablePanel1.PanelContainer);
            this.radScrollablePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radScrollablePanel1.Location = new System.Drawing.Point(0, 0);
            this.radScrollablePanel1.Name = "radScrollablePanel1";
            this.radScrollablePanel1.Padding = new System.Windows.Forms.Padding(1);



During runtime I get this exception at the Bolded line in the "After" section:
*** [05 Jan 2012 10:17:25.701 WSApp     ] [ERROR] System.ApplicationException: Unable to create an instance of the B.WS.SnapIn.RV.RVControlSnapIn plugin in the assembly named B.WS.SnapIn.RV. 
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Control already added!
   at Telerik.WinControls.UI.RadScrollablePanelControlCollection.Add(Control value)
   at B.WS.SnapIn.RV.RVControlSnapIn.InitializeComponent() in C:\_dev\VS\Main\S\Apps\WS Apps\Libs\B.WS.SnapIn.RV\RVControlSnapIn.designer.cs:line 1755
   at B.WS.SnapIn.RV.RVControlSnapIn..ctor() in C:\_dev\VS\Main\S\Apps\WS Apps\Libs\B.WS.SnapIn.RV\RVControlSnapIn.cs:line 41
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at B.NE.PluginFramework.PluginManager.LoadPlugin(String typeName, String path, Hashtable parameters) in C:\_dev\VS\Main\S\SLibs\B.NE.PluginFramework\PluginManager.cs:line 438 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Control already added!
   at Telerik.WinControls.UI.RadScrollablePanelControlCollection.Add(Control value)
   at B.WS.SnapIn.RV.RVControlSnapIn.InitializeComponent() in C:\_dev\VS\Main\S\Apps\WS Apps\Libs\B.WS.SnapIn.RV\RVControlSnapIn.designer.cs:line 1755
   at B.WS.SnapIn.RV.RVControlSnapIn..ctor() in C:\_dev\VS\Main\S\Apps\WS Apps\Libs\B.WS.SnapIn.RV\RVControlSnapIn.cs:line 41
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at B.NE.PluginFramework.PluginManager.LoadPlugin(String typeName, String path, Hashtable parameters) in C:\_dev\VS\Main\S\SLibs\B.NE.PluginFramework\PluginManager.cs:line 438
   --- End of inner exception stack trace ---
   at B.NE.PluginFramework.PluginManager.LoadPlugin(String typeName, String path, Hashtable parameters) in C:\_dev\VS\Main\S\SLibs\B.NE.PluginFramework\PluginManager.cs:line 461
   at WSContainer.WSContainerNode.AddPlugin(String typeName, String path, Hashtable parameters) in C:\_dev\VS\Main\S\Apps\WS Apps\WSContainer\WSContainerNode.cs:line 133
   at WSContainer.WSApp.LoadPlugin(Guid id, String typeName, String path) in C:\_dev\VS\Main\S\Apps\WS Apps\WSContainer\WSApp.cs:line 792
Stefan
Telerik team
 answered on 04 Jul 2012
1 answer
149 views
The following code will reproduce the exception:

RadTreeView tree = new RadTreeView();
tree.Name = "tree";
       
RadTreeNode[] nodes = new RadTreeNode[5];
for (int i = 0; i < nodes.Length; ++i)
  nodes[i] = new RadTreeNode(i.ToString());
 
tree.Nodes.AddRange(nodes);
tree.Nodes.Clear();
tree.Nodes.AddRange(nodes);

It seems that I would need to call "Remove" on each node before adding them back to the tree. But, since I'm adding them to the same TreeView, should an exception still be thrown?
Stefan
Telerik team
 answered on 04 Jul 2012
1 answer
182 views
Rather than looping through the rows, testing a cell value and determining if that value is NOT and should be deleted, is there a query against the control I can use to do the same thing?

Conceptually:

delete from radGridView1 where column["ID"].Value not in set (can be a list or some other collection)

Thanks
Stefan
Telerik team
 answered on 04 Jul 2012
3 answers
328 views
hi guys,

ive recently updated my visual studio 2008 to visual studio 2010. before doing it ive uninstalled telerik controls and also visual studio 2008.

when i installed everything again. i did not encounter any error. but when i create a new project or opened an old project, and tried to add a Radform i could not add it. normally i just do a simple add item and then select the Radform. unfortunately, now cannot select the Radform nor could not see any item for radcontrols.

hoping for your help.

thanks.

joey
Aylin
Telerik team
 answered on 03 Jul 2012
2 answers
290 views
Hi,

I'm a begginer with Winforms controls and i'm writing a new VB.Net application. What pattern is the best to use with Telerik Winforms controls? (MPV, MPC, M-V-V-M)

Do you had some example for me using this "best" pattern to start the GUI of my new app?

Thank you.
Allin
Top achievements
Rank 1
 answered on 03 Jul 2012
8 answers
232 views
Hi,

I can not find the Desert Theme at design time on my radcontrols after upgrading to Q3. If I try to apply this theme via programming, then no theme is applied.

Any ideas?

Thanks & regards,

Julio
Jack
Telerik team
 answered on 03 Jul 2012
9 answers
482 views
Hi,

I've a problem with the Autofilter in the MultiColumn ComboBox:

If AutoFilter is turned on, and I type some numbers in the CB and if there is only one value in the Combo Box which matches with the text we type it is automatically getting selected.

Is there a way to disable this function because extra numbers are getting added after the autoselect.

For eg if I m  typing the value 990113 in the text area of CB,and there is only one value in the Combobox which starts with 9901,then
if we just type 9901 the value 990113 will get automaticaly selected .So when we try to type 990113 ,
after we type 1 it will automaticaly select 990113 and it will also add 13 which we type and the value will be like this 99011313.

Please advise how to workaround these problems.

Thanks
Jack
Telerik team
 answered on 03 Jul 2012
3 answers
198 views
Hi,

I have the following scenario.

I have windows forms user control (written Framework 4, VS 2010, C#) and I need that user control to be dockable so users can move it from the main application window to the second monitor to be visible while main form is visible as well.

So I need to have a sample code or better a simple demo project in C#/VS 2010 that demoes how it can be achieved.

Regards, Anvar
Julian Benkov
Telerik team
 answered on 03 Jul 2012
5 answers
916 views
Hi,

I have a form(form1) and a gridview int it, and I am binding the grid with a datatable(access DB).
gridview.datasource = datatable

I have another form(form2) which pops-up from above form and I can add/delete rows to the above datatable(access DB).
I want to refresh the gridview on first form(form1) when form2 is closed.

How can I do this?

Julian Benkov
Telerik team
 answered on 03 Jul 2012
1 answer
296 views
I have a situation where I have a list of topics (stored in a datatable) that I would like to tie to multiple dropdownlists on separate tabs of my form.  In doing so, it appears that when I change the value of one, it changes the value of the other, triggering all of the index_changed events and every other repercussion that goes along with that (default values, etc.).  

Is there a way to tie this same datatable to multiple dropdownlists without having the selections mirror one another? I realize that I could loop over the table and add items but I would rather not go down that road.  The code that I am using to bind is below.  Any help would be appreciated.

With ddSMTaskType
                .BeginUpdate()
                .ValueMember = dtTaskType.Columns(0).ColumnName
                .DisplayMember = .ValueMember
.DataSource = dtTaskType 
                .SelectedValue = "Meeting"
                .EndUpdate()
End With

With ddSTTaskType
            .BeginUpdate()
            .ValueMember = dtTaskType.Columns(0).ColumnName
            .DisplayMember = .ValueMember
            .DataSource = dtTaskType
            .SelectedIndex = 0
            .EndUpdate()
End With
Peter
Telerik team
 answered on 03 Jul 2012
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?