datagridview datetimepicker C# help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oceantrain
    New Member
    • Feb 2010
    • 11

    datagridview datetimepicker C# help

    I have a datagridview with 10 columns. Every month the user will update new info in the grid. I would like to have a datetimepicker next to the binding navigator. The purpose of the datetimepicker is to scroll forward or backward month by month. If scrolling forward the datagridview creates a new datagridview with the same 10 columns populated with certain data. Then the user can just add the necessary data for the new month. if the user scrolls backward a month, the datagridview shows past gridviews and columns the user has already updated in the past. This is sort of a hybrid of a datagridview and a monthly calendar sort of thing. I've looked everywhere and cannot find any ideas on how to add this datetimepicker control with functionality.
    Any idea would be really helpful.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    So you're saying to want to react just to the scrolling of the calendar portion of the DateTImePicker. .. not to the selection of a date? I don't think there are any events thrown that you can react to.

    What about a DomainUpDown control, with the Items collection filled with a list of the months? You can react to the SelectedItemCha nged event

    Comment

    • oceantrain
      New Member
      • Feb 2010
      • 11

      #3
      re:

      I just want to use the datetime picker as a way to move forward to a new grid with a fresh set of 10 columns in it. or the user could move backwards to review previous grids with the same 10 columns. much like an outlook scheduler. please see image to get a visual idea.

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        much like an outlook scheduler
        And much like an Outlook scheduler it is not a generic DateTimePicker control. You'll either have to make your own control much like the Outlook developer team did, or if you don't want to make your own you'll have to use one that has events already rolled into it you can use.

        As I said and I might be wrong, but a DTP does not raise events when scrolling through the months so there is nothing to hook in to. It sends an event when a new date is selected. That's not what you want.

        Comment

        Working...