Need RadDateTimePicker in RadRibbonBarButtonGroup

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    15 posts
    Member since:
    Jun 2009

    Posted 29 Jun 2009 Link to this post

    Hi,

    i have updatet from Verson 8.1.0.0 to 2009.1.9.414. WinForms Control

    With 8.1.0.0 i use this Code to get 2x RadDateTimePicker in my RibbonBar:


    RadDateTimePicker dtPickerEnd = new RadDateTimePicker(); 
    RadDateTimePicker dtPickerStart = new RadDateTimePicker(); 
     
    dtPickerStart.Name = "dtPickerStart"
    dtPickerStart.ThemeName = "Office2007Blue"
    dtPickerEnd.Name = "dtPickerEnd"
    dtPickerEnd.ThemeName = "Office2007Blue"
     
    RadHostItem hostItem1 = new RadHostItem(dtPickerStart); 
    hostItem1.MinSize = new Size(150, 22); 
    hostItem1.MaxSize = new Size(150, 22); 
    radRibbonBarButtonGroupDTStart.Items.Add(hostItem1); 
     
    RadHostItem hostItem2 = new RadHostItem(dtPickerEnd); 
    hostItem2.MinSize = new Size(150, 22); 
    hostItem2.MaxSize = new Size(150, 22); 
    radRibbonBarButtonGroupDTEnd.Items.Add(hostItem2); 
     

    Now, it dosen't work, can you help me please?
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 01 Jul 2009 Link to this post

    Hi Daniel,

    Thanks for contacting us. Please, set the MinimumSize property of RadDateTimePicker control instead of the MinSize of the RadHostItem. Take a look at the code snippet below:

    RadDateTimePicker dtPickerStart = new RadDateTimePicker();  
    RadHostItem hostItem1 = new RadHostItem(dtPickerStart);  
    dtPickerStart.MinimumSize = new Size(150, 22);  
    this.radRibbonBarButtonGroup1.MinSize = dtPickerStart.MinimumSize;  
    this.radRibbonBarButtonGroup1.Items.Add(hostItem1); 

    I hope this is helpful. Do not hesitate to write back if you have further questions.

    All the best,
    Deyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top