Telerik Forums
UI for WinForms Forum
3 answers
110 views
Hi,

I am just trying to migrate from Visual Basic 6.0 to .net. And really new to telerik rad controls for winform. In my form I have added a tab control which will dynamically created tabitems and 3 different contols within each tab. Could someone please help me to find the name of tabitems and control added dynamically. Each time when loop starts functioning I want to check where the new tab item is already added by loop or not.  

 

Private Sub ShowData()  

 

Dim i As Integer  

 

Dim tmpWord As String  

 

Dim tmprelateto As String  

 

Dim itab As Integer  

 

Dim newtab As String

ds =
New DataSet()

 

myAdapter.Fill(ds,

"Dictionary")

 

 

mytable = ds.Tables(

"Dictionary")

 

 

tmprelateto =

""

 

 

 

tmpWord = ""

i = 0

 

Do
myrow = mytable.Rows.Item(rownumber)

 

tmpWord = Trim(myrow.Item(

"Word").ToString)

 

 

tmprelateto = Trim(myrow.Item(

"relateto").ToString)

 

 


If
tmprelateto = "" Then

    i = i + 1 

    If i = 2 Then

 

         Exit Do

 

    End If

    RichTextBox1.Text = Trim(myrow.Item(

"DefNep").ToString)

 

    RichTextBox2.Text = Trim(myrow.Item(

"DefEng").ToString)
    rownumber = rownumber + 1

Else
     newtab = Trim(myrow.Item("pref").ToString)

 

     RadTabStrip1.Items.Add(

New TabItem(newtab))

     Dim list As New ListBox
     Dim rtfbox As New RichTextBox

     Dim rtfbox2 As New RichTextBox

     For Each ti As TabItem In RadTabStrip1.Items

        ti.ContentPanel.Controls.Add(list)

        ti.ContentPanel.Controls.Add(rtfbox)

        ti.ContentPanel.Controls.Add(rtfbox2)

 

 

 

 

    With list  

            .Location =

 

New Point(5, 3)

 

            .Width = 132
            .BorderStyle = BorderStyle.None

            .Height = 117

             

 

If Trim(myrow.Item("Word").ToString) = "" Then

 

                 

 

.Items.Add(Trim(myrow.Item("relateto").ToString))

 

             

 

Else  

 

 

 

                 .Items.Add(Trim(myrow.Item(

"Word").ToString))

 

             

 

End If

 

 

    

 

End With

 

 

 

 

 

    With rtfbox

 

            .Location =

 

New Point(141, 3)

 

            .Width = 133

            .Height = 117

            .BorderStyle = BorderStyle.None

            .Text = Trim(myrow.Item(

 

"DefNep").ToString)  

 

 

 

    End With

 

 

 

 

 

    With rtfbox2

             .Location =

 

New Point(278, 3)

 

             .Width = 132

             .Height = 117

             .BorderStyle = BorderStyle.None

             .Text = Trim(myrow.Item(

 

"DefEng").ToString)

 

     

 

End With

 

 

 

Next  

 

 

 

rownumber = rownumber + 1 

End If  

 

 

Loop  

 

 

End Sub

Database Used above program looks like:
Word        relateto        pref        DefNep                                                DefNep
-------        ---------        ------       ---------                                                 ---------
A               Null             Null         (ए) अंग्रेजी वर्णमालाको पहिलो अक्षर         the first letter of the English alphabet
Null            A                adj.         एउटा, कोही, एक कुनै व्यक्ति                     one, any, some
Null            A                prep.      जब संज्ञामा उपसर्गको जस्तो यो              (when used as a prefix before nouns) 

 

 

 

Nick
Telerik team
 answered on 14 May 2009
4 answers
141 views
new project vb.net Added a RadRibbonBar.  Make the form a shaped form.  
by pasting the imports line and the inherits line.

Imports

Telerik.WinControls.UI

Public

Class Form1
Inherits ShapedForm

End Class


Run the application.  Press any key exept the space bar and shift. and the app crashes. see bleow.   Has any one else seen this. is there a fix.  I am using 2008 Q1

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls"
  StackTrace:
       at Telerik.WinControls.ComponentBehavior.ProcessUnmappedItems(List`1 childrenToBeMapped)
       at Telerik.WinControls.ComponentBehavior.IsPartOfKeyTip(Keys input, String representation)
       at Telerik.WinControls.ComponentBehavior.ProccessKeyMap(Keys input)
       at Telerik.WinControls.UI.RadRibbonBar.OnKeyDown(KeyEventArgs e)
       at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
       at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
       at System.Windows.Forms.Control.WmKeyChar(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at Telerik.WinControls.UI.RadRibbonBar.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at Test.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

I have tested this on 3 seperate apps and it is the same on all.

Thanks
 Paul
Nikolay
Telerik team
 answered on 14 May 2009
1 answer
117 views
Hi, I'm looking for all RadControls (in XML) for Desert Theme especially RadForm. Where can I get it?

Thank You,
Marcin
Deyan
Telerik team
 answered on 14 May 2009
2 answers
281 views
Hi,

We have an application that uses a custom built CAB approach.  When a user clicks on a launcher a view is inserted into a UI region and populates.  This view is a wizardview and uses a radtabstrip to hold other views for each panel in the wizard.  The UI region that holds these views is a radpanel with a roundedrectangleshape.  The app also has a header area with launchers and picturbox (logo) in it.  This is also rounded and has a gradient background. 

The interface uses tablelayoutpanels and flowlayoutpanels extensively and initially these were causes huge headaches due to transparency and flickering.  This has been remedied as per other posts on your forums by enabled double buffering on these controls (custom inherited control double buffered tablelayoutpanel etc...).  However there is still significant slow down with painting operations which causes the screen layout to take quite a period of time to repaint.

This happens predominantly when loading the wizardview for the first time and when resizing the application window.  I have used suspendlayout and resumelayout during resize begin and resize end respectively on the form which improves the performance but doesn't have the same snappy feel that the user would expect.

Normal winforms performs a lot better than this, however I understand the complexities that are in the radcontrols (element tree) and the impact on GDI+, saying that our client is getting frustrated with us and at this stage we may have to consider other control libraries.

Any help would be appreciated.  If you wish I can open an support ticket and upload a version of the app.

Regards,
Marcus@C9
Nikolay
Telerik team
 answered on 14 May 2009
1 answer
133 views

I have a PanelBar with a GroupElement which further has 5 Togglebuttons as child. I want to highlight the clicked togglebutton and make others Unhighlighted.
I am using togglestate ON/OFF property but its not working, below is my sample code.

Private Sub PanelBarElement1btnToggleButtonChild1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PanelBarElement1btnToggleButtonChild1.Click
        PanelBarElement1btnToggleButtonChild1.ToggleState = Enumerations.ToggleState.On    
        PanelBarElement1btnToggleButtonChild2.ToggleState = Enumerations.ToggleState.Off
        PanelBarElement1btnToggleButtonChild3.ToggleState = Enumerations.ToggleState.Off
        PanelBarElement1btnToggleButtonChild4.ToggleState = Enumerations.ToggleState.Off
        PanelBarElement1btnToggleButtonChild5.ToggleState = Enumerations.ToggleState.Off
End Sub

Many thanks in advance...............
Savan

Nick
Telerik team
 answered on 14 May 2009
3 answers
62 views
Hi,

I'm using a RadGalleryElement set to display two columns in a group on a ribbon bar, and I've filled it with 10 RadGalleryItem's and each of those items have a 32x32 image and TextImageRelation = ImageBeforeText so the image is next to the text. This results in showing some items and hiding the rest which is what I want.

When the form loads it looks fine, but when I click on the popup button to show the full list of items in the RadGalleryElement, and then click somewhere else to close the list, a padding of about 30px is added between the picture and the text and the text is cut off.

I've played with a few of the settings, but I haven't been able to stop this from happening, is there a simple solution? 

Cheers
Adrian
Peter
Telerik team
 answered on 14 May 2009
1 answer
162 views
Hi,
In my form at some event I am adding a RadDateTimePickerElement to a cell of a gridview. The RadDateTimePickerElement shows date picker. However my requirement is such that I want to show only a timepicker and want to select a specific time of day. But currently it allows me to select days and not time.
Boyko Markov
Telerik team
 answered on 13 May 2009
1 answer
223 views

Hi,

I have a windows Rad Scheduler control on my page. I want to bind this scheduler with the database. I have added some customized fields on the edit appointment dialog. I want to bind all the fields with the database including customized.

      I have tried to bind the control using SchedulerBindingDataSource but it is not binding the data with the control. I am not using AppointmentMappingInfo class. Instead of that i have created my own class that contains property like start, end, summary, description with some new customized property.

     One more thing i am not using SchedulerDataSet and AppointmentsTableAdapter, instead of that
I am using SQL dataset and adapter. I do not require Resources also.

     
    Could any one provide me the short and easy code. Its very urgent. Please HELP....

Thanks
Praveen
 

Jordan
Telerik team
 answered on 13 May 2009
1 answer
118 views

Hi, could you help me with RadGridView

I'm binding it to BindingSource object, selecting couple of columns in Grid's designer,

but when a start my aplication, and i'm setting my bindingSource DataSource property,

it generate lots of columns that I'm not interessted.

I set AutoGenerateHierarchy = false

Thanks in advance,

Nikodem Rafalski

Nikolay
Telerik team
 answered on 13 May 2009
1 answer
63 views
When a document container is split the source container is left with no tab selected.

  • If you open the Tabbed Document sample (2009 Q1).
  • Drag "document2" so it breaks the document area into 2 horizontally, and drop it below
  • you now have 3 documents tabbed in the top half and "document2" in the bottom half.
  • "Document1" is now showing in the top half, its text is bold, however its tab is not highlighted, and as its not properly selected the close button does not work.

This is quite confusing to uses as its not obvious why they can't close the window.

Nikolay
Telerik team
 answered on 13 May 2009
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
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
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?