Telerik Forums
UI for WinForms Forum
4 answers
228 views
Hello,
   I am using RADScheduler Q3-2012 and find the text color of the resource headers hard to read on the dark background when grouped. I found the code to change the color of the header on timeline view in this forum(thanks) and figured out how to change day, week and month but I would also like to change the header that shows the name of the weekdays in monthview since that is also too dark to read when grouped.
Any help in how to address these colors would be greatly appreciated.
Here is what I have so far: 
Private Sub adjustGroupHeader()
    If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Timeline Then
        Dim element As TimelineGroupingByResourcesElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, TimelineGroupingByResourcesElement)
        element.Font = New Font("Arial", 22)
        element.ForeColor = Color.Yellow
    End If
    If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Day Then
        Dim element As SchedulerDayViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement)
        element.Font = New Font("Arial", 16)
        element.ForeColor = Color.Yellow
    End If
    If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Week Then
        Dim element As SchedulerDayViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement)
        element.Font = New Font("Arial", 16)
        element.ForeColor = Color.Yellow
    End If
    If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Month Then
        Dim element As SchedulerMonthViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerMonthViewGroupedByResourceElement)
        element.Font = New Font("Arial", 16)
        element.ForeColor = Color.Yellow
        'code needed to change forecolor/backcolor of weekday names
    End If
End Sub
Stephen
Top achievements
Rank 1
 answered on 15 Jan 2013
2 answers
141 views
Hi,

I have downloaded the Winforms Controls Trial.

Where can I find the examples?

Thanks.
Stefan
Telerik team
 answered on 15 Jan 2013
7 answers
95 views

Hello Telerik Team


Small introduction:

I plan to use a RadCalendard on a project for display and edit the public holiday over a year. The list of public holiday is stored in a SQL database (one row is one day) and the data are fetch with EntityFramework. These days are also listed on a listview (with a filter based on the current year displayed on the calendard) for a different point of view. To add a new public holiday, has to doubleclick on the corresponding date in the calendar.

My RadYearCalendar is called YearCalendar

The public holiday are store in an entity called Jourferie with the following properties :

  • ID As Integer
  • Jour As Date
  • Description As String
  • IsPaid As Boolean

The ToString() Function have an override for displaying the date and the description of a Jourferie

My Radlistview is called ListJourFerie

I use a modal forms Add_Jourferie to get the description and the IsPaid properties when a new public holiday is added.

On this project I use Aqua theme (Not the best choice I agree, but my end-users love Appel's Stuff so...)

I appologize for the frenchy comments on my code !

Okay, so what I have done (could help someone else):

  • A multiview calendard which display 12 month from january to december, with a correct year navigation.
  • Fetch the data in my database, populate the special date and my listview.
Private Sub View_Calendrier_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    'We do not want to bind to database in design mode !
    If Not Me.DesignMode Then
        _datactx = New IconEntities(ConnectionManager.GetConnection())
        'Charge les données des jours feriés
        Me.ListJourFerie.DataSource = _datactx.Jourferie.OrderBy(Function(c) c.Jour)
        Me.YearCalendar.SpecialDays.Clear()
        For Each holidayDay As JourFerie In _datactx.Jourferie
            Me.YearCalendar.SpecialDays.Add(New RadCalendarDay(holidayDay.Jour))
        Next
        'Déplace le calendrier sur l'année courante
        Me.YearCalendar.FocusedDate = New Date(Today.Year, 1, 1)
    End If
End Sub
  • Filtering my listview using the period displayed on the calendard
Private Sub YearCalendar_ViewChanged(sender As System.Object, e As System.EventArgs) Handles YearCalendar.ViewChanged
    If Not Me.YearCalendar.IsLoaded Then Exit Sub
    Try
        'Active le filtrage si nécessaire
        If Not Me.ListJourFerie.EnableFiltering Then Me.ListJourFerie.EnableFiltering = True
        'Supprime les filtres actifs
        Me.ListJourFerie.FilterDescriptors.Clear()
        'Filtre la liste afin d'afficher les enregistrements selon l'affichage du calendrier
        Me.ListJourFerie.FilterDescriptors.Add("Jour",
                                               Telerik.WinControls.Data.FilterOperator.IsGreaterThanOrEqualTo,
                                               Me.YearCalendar.DefaultView.Children(0).ViewStartDate)
        Me.ListJourFerie.FilterDescriptors.Add("Jour",
                                               Telerik.WinControls.Data.FilterOperator.IsLessThanOrEqualTo,
                                               Me.YearCalendar.DefaultView.Children(11).ViewEndDate)
    Catch ex As Exception
        MsgBox(ex.Message, MsgBoxStyle.Exclamation, ex.GetType.ToString)
    End Try
End Sub
  • Creation of a new public holiday on doubleclick over a date
    Private Sub YearCalendar_DoubleClick(sender As System.Object, e As Windows.Forms.MouseEventArgs) Handles YearCalendar.MouseDoubleClick
            Dim cell As CalendarCellElement = TryCast(Me.YearCalendar.ElementTree.GetElementAtPoint(e.Location), CalendarCellElement)
      
            If cell IsNot Nothing AndAlso Not cell.VisualState.Contains("Header") Then
                Dim formAddJour As New Add_Jourferie()
                formAddJour.Jour.Text = cell.Date.ToShortDateString
                If formAddJour.ShowDialog() = DialogResult.OK Then
                    Dim newrecord As New JourFerie() With {.Jour = cell.Date,
                                                                   .Description = formAddJour.Description.Text,
                                                                   .IsPaid = formAddJour.IsPaid.Checked}
                    _datactx.Jourferie.AddObject(newrecord)
                    Try
                        _datactx.SaveChanges()
                        Me.YearCalendar.SpecialDays.Add(New RadCalendarDay(newrecord.Jour))
                        Me.ListJourFerie.DataSource = _datactx.Jourferie.OrderBy(Function(c) c.Jour)
                    Catch ex As UpdateException
                        MsgBox(String.Format("{0}{1}{2}", ex.Message, vbNewLine, ex.InnerException.Message), MsgBoxStyle.Exclamation, ex.GetType.ToString())
                        _datactx.Jourferie.DeleteObject(newrecord)
                    End Try
      
                End If
            End If
        End Sub
  • But I need some help for :

     

    • To hidde CellEment (also SpecialDays) in a CalendarTableElement when the day don't belong to the month. The default theme show a different style for theses days, but not Aqua theme. Also some specials days are displaying twice (on two CalendarTableElement) and this make the calendar not very clear. My boss will thinks that's there are too much public holiday and will make a heart attack.
    • The focused date and today should display as other date because these informations are usless (in my case of course) and could hide a public holiday.
    • Adding bold to month name.
    • Change style on the weekend's CellElement
    • Change style on the specialDay's CellElement (I don't really like the dark blue)

     

    By the way... : 

    • Having a fast CalendardDayCollection.AddRange(IEnumerable Of Date) function would be great ! I haven't find something else than than an old "For Each Next Loop" for adding SpecialDays from my datasource. Each date takes 200 ms to add. It's not really fast.
    • The listview do not update when it's databound to a ObjectSet (even with a datasource = Nothing and datasource = ObjectSet !). I have to use ObjectSet.Tolist() for a correct update. I Don't know if it is a correct behavior?

    .

     

    Ivan Petrov
    Telerik team
     answered on 15 Jan 2013
    2 answers
    149 views
    In addition to the options of group by Year, Quarter, Month or Day; I would like to be able to group by week.
    Jos
    Top achievements
    Rank 1
     answered on 15 Jan 2013
    2 answers
    188 views
    Hi,

    I would like to have three split panels in a split container, where I will be able to move the middle split panel as if it was a spliter , i.e. the middle split panel has a fixed size and moving it up or down, changes the size of the top and bottom split panels. The reason that I want to work this way, is that I want to added controllers to the middle split container ,such as drop down combo box.
    How can this be done?

    Thanks
    Meir
    Adiel
    Top achievements
    Rank 1
     answered on 14 Jan 2013
    1 answer
    115 views
    We are trying to make our WinForrm app look better and support touch in Win8. Will the Telerik theme support do this for us? Will it work with normal WinForm controls or do we have to change everything over to Telerik controls?

    Thanks,
    David
    Ivan Petrov
    Telerik team
     answered on 14 Jan 2013
    1 answer
    155 views
    Is it possible to make vertical scrollbar visible in panorama?.. because I have elements bigger than its workspace height.. and it needed vscrollbar.. i cant find a way to make vscrollbar visible..
    Ivan Todorov
    Telerik team
     answered on 14 Jan 2013
    11 answers
    149 views
    Hello,

    I have crated a RadRibbonBar in a RadRibbonForm and changed WindowState property to Maximized but my auto-hide task-bar will not appeared by the mouse. how could I correct it?

    Regards
    Ivan Todorov
    Telerik team
     answered on 14 Jan 2013
    1 answer
    152 views
    Hello Team

    I got a strange problem with winform  gridview  when exported to .csv , it exported the gridview data to .csv with enclosed quotes,

            "1"     "12.01" "22.01" "33.768"        "2.12344"       "5655.34"
            "1"     "13.01" "23.01" "34.768"        "2.12344"       "5656.34"
            "1"     "14.01" "24.01" "35.768"        "2.12344"       "5657.34"
            "1"     "15.01" "25.01" "36.768"        "2.12344"       "5658.34" 


     i observed that in ASP.NET AJAX gridview there is an option called EncloseDataWithQuotes =True/False, with this we can eliminate the enclosed quotes in the csv

    if winforms gridview also have the same property please tell me where i need to set it???, i checked in the below link, but there is no option to set

    http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-csv.html

    due to the quotes in the data, i couldnt import to mySql database, please suggest the way to eliminate the quotes in .csv file
    here is my code to export to .csv

                     ExportToCSV exporter = new ExportToCSV(this.radGridView1);              
                     string fileName = "C:\\ExportedData.csv";              
                    exporter.RunExport(fileName);



    Plamen
    Telerik team
     answered on 14 Jan 2013
    4 answers
    97 views
    Hello Telerik Team,
    I have a radgridview in my winforms application and i have a requirement where user will copy some fields of data from excel and pastes in the gridview, its is working perfect upto 1000 records pasting with a performance speed up to 40 sec, but when tried to paste more than 1000 it is taking time in minutes, after tried of pasting rows  more than 8000 , the form is not responding and application has hanged

    i need the feature exactly how excel interacts with clipboard, but is there any limitation in clip board copy and pasting to radgird ??? i have checked the below possible threads, but couldn't find the answer

    http://www.telerik.com/community/forums/winforms/gridview/paste-from-excel.aspx

    http://www.telerik.com/support/kb/winforms/gridview/copy-pasting-rows-in-and-between-radgridviews-csv-format.aspx

    can you please help
    Sree
    Top achievements
    Rank 1
     answered on 14 Jan 2013
    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
    CheckedDropDownList
    ProgressBar
    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
    NavigationView
    VirtualKeyboard
    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?