Bug Report Q587424
Visible to All Users
Duplicate

ResourcesPopupCheckedListBoxControl lost binding

created 11 years ago

Hello,

I'm using ShedulerControl with ResourcesPopupCheckedListBoxControl for filtering resources.
But it works only once. If i update AppointmentStorage datasource, ResourcesPopupCheckedListBoxControl does not work anymore.

When my function Load() is called the first time ResourcesPopupCheckedListBoxControl works, if i call for a second time, the control lost binding and
i can't filter resources.

XAML
<dxsch:ResourcesPopupCheckedListBoxControl Name="filter" SchedulerControl="{Binding ElementName=scheduler}" Margin="89,0,0,0" MinHeight="25" HorizontalAlignment="Left" VerticalAlignment="Top" Width="200" /> <dxb:BarManager Name="barManager1" ToolbarGlyphSize="Small" Margin="0,30,0,0" Grid.RowSpan="3"> <dxb:BarManager.Bars> <dxb:Bar Caption="View Selector" Name="barViewSelector"> <dxb:Bar.DockInfo> <dxb:BarDockInfo ContainerType="Top" /> </dxb:Bar.DockInfo> <dxb:Bar.ItemLinks> <dxb:BarCheckItemLink BarItemName="biSwitchToDayView" /> <dxb:BarCheckItemLink BarItemName="biSwitchToWorkWeekView" /> <dxb:BarCheckItemLink BarItemName="biSwitchToWeekView" /> <dxb:BarCheckItemLink BarItemName="biSwitchToMonthView" /> <dxb:BarCheckItemLink BarItemName="biSwitchToTimelineView" /> </dxb:Bar.ItemLinks> </dxb:Bar> <dxb:Bar Caption="Group By" Name="barGroupBy"> <dxb:Bar.DockInfo> <dxb:BarDockInfo ContainerType="Top" /> </dxb:Bar.DockInfo> <dxb:Bar.ItemLinks> <dxb:BarCheckItemLink BarItemName="biSwitchToGroupByNone" /> <dxb:BarCheckItemLink BarItemName="biSwitchToGroupByDate" /> <dxb:BarCheckItemLink BarItemName="biSwitchToGroupByResource" /> </dxb:Bar.ItemLinks> </dxb:Bar> </dxb:BarManager.Bars> <dxb:BarManager.Items> <dxb:BarCheckItem Command="{Binding Path=SwitchToDayView, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToDayView" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToWorkWeekView, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToWorkWeekView" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToWeekView, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToWeekView" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToMonthView, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToMonthView" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToTimelineView, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToTimelineView" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToGroupByNone, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToGroupByNone" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToGroupByDate, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToGroupByDate" /> <dxb:BarCheckItem Command="{Binding Path=SwitchToGroupByResource, Mode=OneTime, Source={StaticResource commands}}" CommandParameter="{Binding ElementName=scheduler}" Name="biSwitchToGroupByResource" /> </dxb:BarManager.Items> <dxsch:SchedulerControl Name="scheduler" PopupMenuShowing="scheduler_PopupMenuShowing" AppointmentDrop="scheduler_AppointmentDrop" BarManager="{Binding ElementName=barManager1, Mode=OneTime}" ActiveViewType="Timeline" GroupType="Resource" Margin="6,6,6,0"> <dxsch:SchedulerControl.AppointmentMenuCustomizations> <dxb:BarButtonItem Name="customButtonItem" Content="Modifier Statut" dxb:BarItemLinkActionBase.ItemLinkIndex="1" ItemClick="customButtonItem_ItemClick"/> <dxb:BarButtonItem Name="customButtonItemRDV" Content="Fixer RDV" dxb:BarItemLinkActionBase.ItemLinkIndex="1" ItemClick="customButtonItem_ItemClick"/> </dxsch:SchedulerControl.AppointmentMenuCustomizations> <dxsch:SchedulerControl.Storage> <dxsch:SchedulerStorage Name="ShedulerStorage" > <dxsch:SchedulerStorage.AppointmentStorage> <dxsch:AppointmentStorage> <dxsch:AppointmentStorage.Mappings> <dxsch:AppointmentMapping ResourceId="IdIntervenant" Subject="NumCommande" Description="Type" Start="DateCalendrier" AllDay="True" Label="LabelId" /> </dxsch:AppointmentStorage.Mappings> </dxsch:AppointmentStorage> </dxsch:SchedulerStorage.AppointmentStorage> <dxsch:SchedulerStorage.ResourceStorage> <dxsch:ResourceStorage > <dxsch:ResourceStorage.Mappings> <dxsch:ResourceMapping Id="IdIntervenant" Caption="CodeIntervenant" /> </dxsch:ResourceStorage.Mappings> </dxsch:ResourceStorage> </dxsch:SchedulerStorage.ResourceStorage> </dxsch:SchedulerStorage> </dxsch:SchedulerControl.Storage> <dxsch:SchedulerControl.DayView> <dxsch:DayView ResourcesPerPage="8"> </dxsch:DayView> </dxsch:SchedulerControl.DayView> <dxsch:SchedulerControl.WorkWeekView> <dxsch:WorkWeekView ResourcesPerPage="8"> </dxsch:WorkWeekView> </dxsch:SchedulerControl.WorkWeekView> <dxsch:SchedulerControl.WeekView> <dxsch:WeekView ResourcesPerPage="8"> </dxsch:WeekView> </dxsch:SchedulerControl.WeekView> <dxsch:SchedulerControl.MonthView> <dxsch:MonthView ResourcesPerPage="8"> </dxsch:MonthView> </dxsch:SchedulerControl.MonthView> <dxsch:SchedulerControl.TimelineView> <dxsch:TimelineView ResourcesPerPage="8"> </dxsch:TimelineView> </dxsch:SchedulerControl.TimelineView> </dxsch:SchedulerControl> </dxb:BarManager>
C#
private void Load() { try { this.scheduler.Storage.AppointmentStorage.DataSource = null; if (this.scheduler.Storage.ResourceStorage.DataSource == null) { this.scheduler.Storage.ResourceStorage.DataSource = IntervenantStoreSQLServer.ReturnIntervenantTable(string.Empty, string.Empty, string.Empty); } List<Commande> MesCommandesFiltres = new List<Commande>(); for (int i = 0; i < GridCommande.VisibleRowCount; i++) { object dataRow = GridCommande.GetRow(GridCommande.GetRowHandleByVisibleIndex(i)); MesCommandesFiltres.Add((Commande) dataRow); } this.scheduler.Storage.AppointmentStorage.DataSource = MesCommandesFiltres; var IndispoCompteurs = IndisponibiliteStoreSQLServer.ReturnIndisponibilite(""); if (IndispoCompteurs != null) { foreach (var indispo in IndispoCompteurs) { Appointment apt = scheduler.Storage.CreateAppointment(AppointmentType.Normal); apt.Start = indispo.DateDebut; apt.AllDay = true; apt.End = indispo.DateFin; apt.Subject = "INDISPONIBLE"; apt.LabelId = 4; apt.ResourceId = indispo.idIntervenant; ShedulerStorage.AppointmentStorage.Add(apt); } } scheduler.ShowBorder = true; } catch (Exception ex) { } }
Show previous comments (2)

    I have replace Tabcontrol by DXTabcontrol it doesn't change anything.

      I have found a temporary solution, ResourcesPopupCheckedListBoxControl have not to be in the Tabcontrol.
      And then it always works.

      DevExpress Support Team 11 years ago

        Hello David,
        Thank you for your sample.
        I have successfully reproduced the behavior you described and passed this ticket to our developers' team for further research. Please bear with us.
        We will notify you as soon as we make any progress.

        Answers approved by DevExpress Support

        created 11 years ago (modified 11 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Show previous comments (4)
          DevExpress Support Team 11 years ago

            I am happy to hear that the issue has been resolved. Thank you for informing us of that.

            MA MA
            Matthias Adloff 9 years ago

              Guys, this is broken again since v15.1.8 or maybe earlier (didn't test this for a some time).
              Just try the sample that CARGO provided and after selecting the other tab and back, the binding between the ResourcesPopupComboBox and the scheduler is lost. Happens with any container.

              DevExpress Support Team 9 years ago

                Hello Matthias,
                You are right, in version 15.1.8, a binding between the ResourcesPopupCheckedListBoxControl and a current SchedulerControl is lost after changing the SchedulerControl's visibility.
                I have created a separate ticket for version 15.1.8 and passed it to our developers for further research:
                Binding between ResourcesPopupCheckedListBoxControl and a current SchedulerControl is lost after changing SchedulerControl's visibility (15.1.8)
                Please bear with us. We will update the status of that ticket once we have any results.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.