Telerik Forums
UI for WinForms Forum
0 answers
132 views
I am trying to set an entire WinForms app with Desert theme
I have a group of buttons in a user control which is used in two different forms
both forms are RadForms and both are set to Desert as part of the constructor
Public Sub New()
    ' This call is required by the designer.
    InitializeComponent()
    Dim myTheme As New DesertTheme()
    ThemeResolutionService.ApplicationThemeName = "Desert"
End Sub

one form has ochre buttons with that gradient I like - and the other form has that ugly grey which is Microsoft control
why is this?

I figured out why - after leaving a dent in my desk after trying EVERYTHING I could think of
the user control starts out not Enabled - when it is Enabled it gets the nice gradient
Elliott
Top achievements
Rank 2
 asked on 05 Sep 2012
2 answers
187 views
Hi,

can anyone convert this code to vb.net, please?

radscheduler1.AppointmentEditDialogShowing += new EventHandler<Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs>(radscheduler1_AppointmentEditDialogShowing);


The Telerik converter generates this, but it doesn't work.

radscheduler1.AppointmentEditDialogShowing += New EventHandler(Of Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs)(radscheduler1_AppointmentEditDialogShowing)



Thanks + greeting

Daniel
Daniel
Top achievements
Rank 1
 answered on 05 Sep 2012
4 answers
319 views

I created a support ticket and asked the following question:

I am binding a RadGridView to a SQL Server table.
The code below returns the following Data Exception Error:
Cannot set column 'SSAN'. The value violates the MaxLength limit of this column.

The SSAN field is a varchar(9). It should store 111223333 and not 111-22-3333. How can I set the column to save the text without the literals?

 

Dim col As GridViewMaskBoxColumn = New GridViewMaskBoxColumn
With col
.Name = "SSAN2"
.FieldName = "SSAN"
.HeaderText = "SSN"
.MaskType = MaskType.Standard
.Mask = "000-00-0000"
.TextAlignment = ContentAlignment.MiddleCenter
.DataType = GetType(String)
'.FormatString = "{0:000-00-0000}"
End With
RadGridView1.MasterTemplate.Columns.Add(col)


Svett from Telerik answered with the following:

You can achieve that by creating a custom editor:
Public Class CustomMaskedEditor
Inherits RadMaskedEditBoxEditor
Public Overrides Property Value() As Object
Get
Dim value__1 As Object = MyBase.Value
value__1 = Convert.ToString(value__1).Replace("-", String.Empty)
Return value__1
End Get
Set
MyBase.Value = value__1
End Set
End Property
End Class

Then you should use the EditorRequired event of RadGridView to replace the default one:
Private Sub radGridView1_EditorRequired(sender As Object, e As EditorRequiredEventArgs)
If e.EditorType = GetType(RadMaskedEditBoxEditor) Then
e.EditorType = GetType(CustomMaskedEditor)
End If
End Sub



I did not realize that my ticked had been closed because of my delayed response and I asked  Svett if the following would not also be a solution:
Imports Telerik.WinControls.UI
Public Class CustomMaskedEditor
Inherits RadMaskedEditBoxEditor
Public Overrides Sub BeginEdit()
MyBase.MaskTextBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals
MyBase.BeginEdit()
Me.EditorElement.Focus()
End Sub
End Class

Can anyone tell me if this is not an acceptable way to only have the numbers saved to the database? 
Peter
Telerik team
 answered on 05 Sep 2012
4 answers
255 views

Upgraded to Version 2012.2.726.40 today and have been struggling to get my project working again. 

One thing I noticed right away is that my command buttonelements in my grid no longer display their images.

here's how I am adding them in code:

private void radGridViewJobs_CellFormatting(object sender, CellFormattingEventArgs e)
{
    try
    {
        foreach (RadElement ele in e.CellElement.Children)
        {
            if (ele is RadProgressBarElement)
            {
                e.CellElement.Children.Remove(ele);
                break;
            }
 
        }
 
        if (e.CellElement is GridCommandCellElement && !(e.CellElement.RowElement is GridTableHeaderRowElement))
        {
 
            GridViewCommandColumn column = (GridViewCommandColumn)e.CellElement.ColumnInfo;
            String colname = column.FieldName.ToLower();
            if (colname == "stationview")
            {
                RadButtonElement element = (RadButtonElement)e.CellElement.Children[0];
                element.Image = global::PayerConnectClient.Properties.Resources.workstation;
                element.DisplayStyle = DisplayStyle.Image;
                element.ImageAlignment = ContentAlignment.MiddleCenter;
                 
 
                String myStation = e.CellElement.RowInfo.Cells["workstation"].Value.ToString().Trim();
 
                if (myStation.Length > 0)
                {
                    element.ToolTipText = @"View/Modify " + myStation + " Profile and Current Configuration";
                    element.Enabled = true;
                    element.DisplayStyle = DisplayStyle.Image;
                    element.ShowBorder = true;
                }
                else
                {
                    element.Enabled = false;
                    element.DisplayStyle = DisplayStyle.None;
                    element.ShowBorder = false;
                }
                if (element.ElementState == ElementState.Constructed)
                    element.Click += new EventHandler(Workstation_Click);
 
            }
         }
     }
    catch (Exception ex)
    {
        RadMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, RadMessageIcon.Error);
    }
}

Other than the Telerik update - nothing else has changed.

Any help you could provide would be greatly appreciated.  This is extremely urgent as I will be demoing this product early next week.

thanks!


Note:  I am using 4 different themes: Office2010Blue, Black and Silver and Windows7.  All themes show same behavior.

Stefan
Telerik team
 answered on 05 Sep 2012
3 answers
443 views
So here is our scenario:

We have a main executable (app) with docking enabled.  A Left Panel and a Right panel.  Each of them can be undocked and pulled out of the application.

The left panel is a no brainer it contains windows controls, etc. 

The right panel has a few windows controls, and a user control that we created and also has docking enabled?

So there are a couple questions:

1. Is this scenario able to be accomplished? 
2. Can we build a user control that contains docking?
3. If the user control, has a docked panel(s), can we pull those out not only from the user control but also from the main application?

I hope that makes sense.  Thank you in advance for any tips, gotchas, etc. 


Nikolay
Telerik team
 answered on 05 Sep 2012
1 answer
238 views

Hello,

I have downloaded the below reffered test application and try to run in the latest Telerik version release(Q2 2012 SP1), I am finding attached error messages which I can't debug it. I tried lot to adding all refernces and didn't found the required reference dll. RadControlDesignTimeData and
ControlStyleBuilderInfoList.

Please make it ruinable below attached application ASAP otherwise give new collapsible panel test application whic works in Telerik version (Q2 2012 SP1) (C# code required)

Thanks in advance.

Ref:http://www.telerik.com/community/forums/winforms/panels-and-labels/collapsible-panels.aspx

Regards
Manoj

 

Nikolay
Telerik team
 answered on 04 Sep 2012
3 answers
387 views
Please help me for setting the theme for grid view.

Thanks for support.
Stefan
Telerik team
 answered on 04 Sep 2012
2 answers
547 views
how do I add a border to selected RadLabels?
I am skinning the entire Winforms app with Desert
the following routine only seems to expand the size of the label
Public Sub BorderStyleLabel(ByRef rdLabel As RadLabel)
    Dim labelBorder As BorderPrimitive
    labelBorder = DirectCast(rdLabel.LabelElement.Children(1), BorderPrimitive)
    labelBorder.BoxStyle = BorderBoxStyle.SingleBorder
    labelBorder.BackColor = Color.Chocolate
    labelBorder.Width = 1
End Sub
I am hoping to find kode to mimic BorderStyle=FixedSingle
Elliott
Top achievements
Rank 2
 answered on 04 Sep 2012
2 answers
163 views
I am replacing as many Microsoft controls with Telerik Winforms controls in order to prepare for a move to Windows 8
the app uses Microsoft Ink
the Telerik textbox doesn't seem to want to hook up with Ink
here's the kode
myInkCollector = New InkCollector(Me.txtSignature.Handle)
myInkCollector.DefaultDrawingAttributes.Width = ThinInkWidth
myInkCollector.Enabled = True
if txtSignature is a Microsoft textbox it works
if it is a RadTextBox it doesn't
Elliott
Top achievements
Rank 2
 answered on 04 Sep 2012
1 answer
144 views
I'm trying to get some standard Winforms code moved over to use the Telerik library. It's hard to figure out how to move over standard combobox code. In my standard combobox code, I could simply handle the "SelectedValueChanged" event. This event is only fired when the user actually selects a value (i.e. clicks or presses 'Enter'), even in auto-complete mode.

For the Telerik "RadDropDownList", the "SelectedValueChanged" event fires every time the user moves the cursor down a list of matching items. To me, this seems wrong. The selected value is not changed yet, not until the user presses 'Enter' or clicks the mouse on a particular item. Nevertheless, right or wrong, is there an optimal way to make a "RadDropDownList" work like a combobox? I really won't want to write hundreds of lines of code to handle every variation of key and mouse clicks to try and figure out what the user is doing.

More generally, is there any guide or cookbook that shows a person what is involved with changing each type of standard Windows control over to the corresponding Telerik control? This would be really useful. It took me an entire day to figure out that a Telerik "RadSplitButton" isn't really a true split button (i.e the same functionality as a button and a drop-down menu button), but is more simplistic, sort of a "menu item button". The best way to port code from Windows split buttons to Telerik without losing functionality is to use a separate RadButton and a separate RadDropDownButton. Some sort of guide book would be immensely helpful.

Thanks.
Peter
Telerik team
 answered on 04 Sep 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
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?