Telerik Forums
UI for WinForms Forum
7 answers
1.0K+ views
Hello,

I'm looking to programmatically change the alignment of the dropdown box for my RadComboBox. I'd like the vertical scrollbar to align with the dropdown arrow, and the text to expand further left. Essentially have a top-right alignment instead of a top-left one.

Thanks!
Jeremy
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Jun 2017
10 answers
332 views
  • Hello,
    I am a new user trying to follow along with the RadScheduler webinar introduction.  I have everything set up to the point of database binding.  I am following through the examples, set up the connections to the sql server, edited the connections, but when I get as far as binding the radscheduler to the BindingSource, the RadScheduler is invisible during runtime (however if you right click where it is supposed to be you still get a "New Appointment" menu.  It seems that all off the hard coded resources and all the properties set upon form load are not taking effect to the radscheduler ONLY if I am using the smart tag to bind the bindingSource.

    Any ideas of what I may be overlooking?
    Thanks!
  • Dess | Tech Support Engineer, Principal
    Telerik team
     answered on 16 Jun 2017
    3 answers
    267 views

    Hi,

    I need to localize the winforms rad grid view control and used the source code displayed on the following page to set up the initial localization

    http://docs.telerik.com/devtools/winforms/gridview/localization/localization

    There's a lot of strings in there and obviously I don't know which functions and parts of the grid trigger many of the strings but from my very brief experience

    1) The "RadGridStringId.NoDataText: return "No data to display";" case statement isn't called.

    2) If I activate the RadGridLocalizationProvider then the search box on the top left of the grid displays "SearchRowTextBoxNullText". If I don't activate the localization provider then the search box displays "Enter text to search".

    3) Looking at the code in the telerik document linked to above there's many strings returned that appear to be variable names rather than string. SearchRowTextBoxNullText is one example, but almost all the case statements beginning with "SearchRow...." appear to be variable names. The same with some of the "ConditionalFormattingPropertyGrid..." case statements.

    I did a dumb copy and conversion to return strings held in my resx files, but felt very uncomfortable about the strings that don't appear to be real english words.

    I can't plug this into production code until Im sure there's no problems and that Im understanding how it works.

    Can you help please.
    Hristo
    Telerik team
     answered on 16 Jun 2017
    6 answers
    270 views

    Hello.  I'm trying to style a series spline to have a thin borderwidth to set it apart from the other splines on the chartview, but no matter what value I set the BorderWidth property to, the spline is the same thickness.  Intellisense for BorderWidth mentions that BorderBoxStyle.FourBorders must be used, and the series is normally in SingleBorder, but setting it to FourBorders also didn't help.  I also tried to set the BorderDashStyle to dashes, just to see if other property changes would be respected, but the line is still solid.  The BorderColor and Spline properties appear to be respected.  Any ideas what I'm doing wrong?

    Here's the code to create and add the series, as well as a screenshot of the chart.  The series in question is to the top (high) red spline.

    Thanks!

     

        ScatterLineSeries x3PriceEnvelopeHighSeries = new ScatterLineSeries();
                            x3PriceEnvelopeHighSeries.XValueMember = "FaceWeight";
                            x3PriceEnvelopeHighSeries.YValueMember = "x3Price";
                            x3PriceEnvelopeHighSeries.DataSource = curvePointsHigh;
                            x3PriceEnvelopeHighSeries.BorderColor = Color.Red;
                            x3PriceEnvelopeHighSeries.BackColor = Color.Red;
                            x3PriceEnvelopeHighSeries.ShowLabels = false;
                            x3PriceEnvelopeHighSeries.Spline = true;
                            //x3PriceEnvelopeHighSeries.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders;
                            x3PriceEnvelopeHighSeries.BorderWidth = (float)0.25;
                            //x3PriceEnvelopeHighSeries.BorderLeftWidth = (float)0.25;
                            //x3PriceEnvelopeHighSeries.BorderTopWidth = (float)0.0;
                            //x3PriceEnvelopeHighSeries.BorderRightWidth = (float)0.0;
                            //x3PriceEnvelopeHighSeries.BorderBottomWidth = (float)0.0;
                            x3PriceEnvelopeHighSeries.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
                            chart.Series.Add(x3PriceEnvelopeHighSeries);
                            x3PriceEnvelopeHighSeries.IsVisibleInLegend = false;

    Hristo
    Telerik team
     answered on 16 Jun 2017
    7 answers
    249 views

    Dear, apologies for the case since I find myself using the google translate.

    I'm trying to export information from a gridview by adding to this headers and footer at the time of launching the xlsx, so following the thread http://docs.telerik.com/devtools/winforms/gridview/exporting-data/how -to / add-header-and-footer-to-the-exported-document, I have not been able to do it.

    Attached code, please give me a hand. Thank you

     

    Private Sub cmdExportarGestion_Click(sender As System.Object, e As System.EventArgs) Handles cmdExportarGestion.Click
            'Try
     
     
            Dim sfd As New FolderBrowserDialog()
            Dim ret As DialogResult
     
            With sfd
                .Reset()
                .Description = " Seleccionar una carpeta "
                .SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
                .ShowNewFolderButton = False
                ret = .ShowDialog()
            End With
     
            If ret = Windows.Forms.DialogResult.OK Then
                gbGeneral.Enabled = False
                Me.Cursor = Cursors.WaitCursor
                'For Each item In cboVendedores.Items
                'CargarFDetallePorcentaje(dgExportar, cboGestiones.Text, item("CODIGO").ToString)
                CargarFDetallePorcentaje(dgExportar, cboGestiones.Text, cboVendedores.Text)
                Select Case chkCabeceras.CheckState
                    Case CheckState.Checked
                        Dim spreadExporter As New GridViewSpreadExport(dgMaestroDetalle)
                        Dim exportRenderer As New SpreadExportRenderer()
                        AddHandler exportRenderer.WorkbookCreated, AddressOf exportRenderer.CreateWorkbook
                        spreadExporter.SheetName = "COMISION VENDEDOR 05"
                        spreadExporter.RunExport(sfd.SelectedPath & "\123.xlsx", exportRenderer)
     
                        Dim solidPatternFill As New PatternFill(PatternType.Solid, System.Windows.Media.Color.FromRgb(46, 204, 113), Colors.Transparent)
                        Dim textFormat As New CellValueFormat("@")
     
     
                        Dim workbook As New Workbook()
                        'Dim worksheet As Worksheet = workbook.Worksheets.Add("COMISION")
     
     
     
     
                        Dim worksheet As Worksheet = workbook.Sheets.Add(0) 'TryCast(workbook.Sheets(0), Worksheet)
                        Dim range As New CellRange(0, 0, 1, dgMaestroDetalle.Columns.Count - 4)
                        Dim header As CellSelection = worksheet.Cells(range)
                        If header.CanInsertOrRemove(range, ShiftType.Down) Then
                            header.Insert(InsertShiftType.Down)
                        End If
                        header.Merge()
                        header.SetFormat(textFormat)
                        header.SetHorizontalAlignment(Telerik.WinControls.UI.RadHorizontalAlignment.Center)
                        header.SetVerticalAlignment(Telerik.WinControls.UI.RadVerticalAlignment.Center)
                        header.SetFontFamily(New ThemableFontFamily("Rockwell"))
                        header.SetFontSize(24)
                        header.SetFill(solidPatternFill)
                        header.SetValue("Nortwind Products Details")
     
     
                    Case CheckState.Unchecked
                        'Dim spreadExporter As New ExportToExcelML(dgMaestroDetalle)
                        'spreadExporter.ExportHierarchy = True
                        'spreadExporter.ExportVisualSettings = True
                        'spreadExporter.RunExport(sfd.SelectedPath & "\Gestion_" & cboGestiones.Text & "_Vendedor_" & item("CODIGO").ToString & ".xls")
                End Select
     
                'Next
            Else
                Exit Sub
            End If
            Me.Cursor = Cursors.Default
            sfd.Dispose()
            MsgBox("Exportacion exitosa..", MsgBoxStyle.Information, MsgboxTitle)
            gbGeneral.Enabled = True
            'Catch ex As Exception
            '    MsgBox(ex.Message, MsgBoxStyle.Critical, MsgboxError)
            'End Try
        End Sub
    End Class
    Dimitar
    Telerik team
     answered on 16 Jun 2017
    7 answers
    247 views
    I need to modify the style of the group header but can't seem to do it. I can modify the font, but it also seems to modify the font of the appointments as well.
    Dim SchedElement As SchedulerDayViewGroupedByResourceElement = RadScheduler1.GetDayView.Scheduler.SchedulerElement.ViewElement
    SchedElement.Font = New Font("Segoe UI", 10, FontStyle.Regular, GraphicsUnit.Point)
    SchedElement.ForeColor = Color.White
    SchedElement.ResourceHeaderHeight = 35
    SchedElement.ResourcesHeader.BackColor = Color.FromArgb(0, 159, 60)
    SchedElement.ResourcesHeader.BackColor2 = Color.FromArgb(0, 159, 60)
     
    Anything that sets a "ResourceHeader" doesn't seem to do what I am expecting. The attached picture shows the header I am trying to modify as well as what RadControlSpy says about it.
    Dess | Tech Support Engineer, Principal
    Telerik team
     answered on 15 Jun 2017
    7 answers
    925 views

    I have a gridview with a gridviewcheckboxcolumn and an enabled headercheckbox as well.  I have Excel type filters enabled along with grouping.  What I want to do is get a running count of how many items are checked (say out of 1,000).

    Currently I am using a loop to get the checked cells by iterating through the RadGrid.MasterTemplate.DataView.ItemCount and checking each row checkbox value.  This works ok, but where I have a problem is with the header check/uncheck all button.  When I check the header button it will trigger the CellValueChanged event every time a cell changes.  For 1,000 records this gets pretty slow.

    So my questions are;

    1. Is there a CheckedCount method instead of iterating?  would have to work on Excel filtered grid
    2. Is there a way to 'wait' for the header toggle to finish so that the CellValueChanged could be set not to trigger until done?
    3. Is there a simpler, better way to get a count of Checked rows in a grid?
    Private Sub grdSales_CellValueChanged(sender As Object, e As GridViewCellEventArgs) Handles grdSales.CellValueChanged
        'count checked rows, enable process, set label
        If e.ColumnIndex > 0 Then Return    'only want checked col [0]
        Dim iCnt As Integer = fCountCheckedRows()
        btnProcess.Enabled = iCnt > 0
        lblCheckedRecords.Text = CStr(lblCheckedRecords.Tag) & iCnt
    End Sub
     
    Private Function fCountCheckedRows() As Integer
        Dim iCount As Integer = 0
        For i = 0 To grdSales.MasterTemplate.DataView.ItemCount - 1
            If Not IsDBNull(grdSales.Rows(i).Cells(0).Value) Then
                If grdSales.Rows(i).Cells(0).Value = True Then iCount += 1
            End If
        Next
        Return iCount
    End Function
    Dess | Tech Support Engineer, Principal
    Telerik team
     answered on 15 Jun 2017
    2 answers
    156 views

    In VB.net please,

     

    I need to open the default edit form for a an appointment in MyRadScheduler.Appointments, so I just need to simulate the double click on an appointment, but using only code.

    Bassel
    Top achievements
    Rank 1
     answered on 14 Jun 2017
    3 answers
    567 views
    Hello

    Help me!

    I have a RadSplitContainer, on RadSplitContainer located 5 splitPanels.
    When the program starts user resizes on RadSplitContainer, splitPanels.

    How can i save the settings, that are made by the user?
    Dimitar
    Telerik team
     answered on 14 Jun 2017
    7 answers
    1.2K+ views

    I have an application with multiple PDF viewers and the user can switch between the viewers on demand.

    When switching between viewers I do the following:

    • Reset the viewer by displaying a dummy document (so that the previous PDF is no longer visible and so that a template, etc. could be displayed as a placeholder if something goes wrong - previous developer's choice). This is done by calling LoadDocument() with the placeholder's physical file path
    • I then do a bunch of things and get the new desired content as a MemoryStream from the database and load it. This is done by calling LoadDocument() with the MemoryStream variable

    When this happens, the content of the MemoryStream is not displayed, instead only the placeholder content is shown. It's as though the load of the MemoryStream was never loaded (but I have confirmed that line of code is always reached).

    If I remove the placeholder code so that I'm only working with a MemoryStream then it works correctly.

    Calling UnloadDocument() before loading from the MemoryStream has no effect.

    What can be done to fix this?

    Dimitar
    Telerik team
     answered on 13 Jun 2017
    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
    Documentation
    SplitContainer
    Map
    DesktopAlert
    CheckedDropDownList
    ProgressBar
    TrackBar
    MessageBox
    Rotator
    SpinEditor
    CheckedListBox
    StatusStrip
    LayoutControl
    SyntaxEditor
    Wizard
    ShapedForm
    TextBoxControl
    CollapsiblePanel
    Conversational UI, Chat
    DateTimePicker
    TabbedForm
    CAB Enabling Kit
    GroupBox
    WaitingBar
    DataEntry
    ScrollablePanel
    ScrollBar
    ImageEditor
    Tools - VSB, Control Spy, Shape Editor
    BrowseEditor
    DataFilter
    FileDialogs
    ColorDialog
    Gauges (RadialGauge, LinearGauge, BulletGraph)
    ApplicationMenu
    RangeSelector
    CardView
    WebCam
    BindingNavigator
    Styling
    Barcode
    PopupEditor
    RibbonForm
    TaskBoard
    Callout
    NavigationView
    ColorBox
    PictureBox
    FilterView
    Accessibility
    VirtualKeyboard
    DataLayout
    Licensing
    ToastNotificationManager
    ValidationProvider
    CalculatorDropDown
    Localization
    TimePicker
    BreadCrumb
    ButtonTextBox
    FontDropDownList
    BarcodeView
    Security
    LocalizationProvider
    Dictionary
    SplashScreen
    Overlay
    Flyout
    Separator
    SparkLine
    TreeMap
    StepProgressBar
    ToolbarForm
    NotifyIcon
    DateOnlyPicker
    AI Coding Assistant
    Rating
    TimeSpanPicker
    Calculator
    OfficeNavigationBar
    TaskbarButton
    HeatMap
    SlideView
    PipsPager
    AIPrompt
    TaskDialog
    TimeOnlyPicker
    +? more
    Top users last month
    Rob
    Top achievements
    Rank 3
    Bronze
    Bronze
    Iron
    Sergii
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
    Dedalus
    Top achievements
    Rank 1
    Iron
    Iron
    Lan
    Top achievements
    Rank 1
    Iron
    Doug
    Top achievements
    Rank 1
    Want to show your ninja superpower to fellow developers?
    Top users last month
    Rob
    Top achievements
    Rank 3
    Bronze
    Bronze
    Iron
    Sergii
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
    Dedalus
    Top achievements
    Rank 1
    Iron
    Iron
    Lan
    Top achievements
    Rank 1
    Iron
    Doug
    Top achievements
    Rank 1
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?