Home Forums WinForms controls Xceed Grid for WinForms Remove None Button from Calendar Control

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16132 |

    Is there a way to remove the None button from the calendar control?

    Imported from legacy forums. Posted by Walter (had 896 views)

    User (Old forums)
    Member
    Post count: 23064

    You can set the button Visible property to false, and center the Today button. 

    e.g.: 

           winCalendar1.NoneButton.Visible = false;

           winCalendar1.TodayButton.Location = new Point( 32, winCalendar1.TodayButton.Location.Y );

    If you do this in the designer, the None button will still be visible at design time, but will not appear at runtime.

    Imported from legacy forums. Posted by André (had 408 views)

    User (Old forums)
    Member
    Post count: 23064

    I apologize for the poorly worded question, let me try again.

    I am refering to the DateEditor as it is applied to the Grid.Columns(0).CellEditorManager.

    Example: Grid.Columns(“StartDate”).CellEditorManager = DateEditor

     How do I remove the None button from the DateEditor control?

    Imported from legacy forums. Posted by Walter (had 601 views)

    User (Old forums)
    Member
    Post count: 23064

    It is basically the same thing , since the dropdown control of the DatePicker is a WinCalendar underneath.  The DateEditor is in fact a WinDatePicker, so if you cast the DateEditor, you can access the DropDownControl of the WinDatePicker, thus the WinCalendar.

     e.g.:

     WinDatePicker datePicker = ( WinDatePicker )gridControl1.Columns[ “StartDate” ].CellEditorManager.TemplateControl;

    datePicker.DropDownControl.NoneButton.Visible = false;

    datePicker.DropDownControl.TodayButton.Left = 34;

    Imported from legacy forums. Posted by André (had 333 views)

    User (Old forums)
    Member
    Post count: 23064

    Worked perfectly!

    Thanks,

    Imported from legacy forums. Posted by Walter (had 1881 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.