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)
{
}
}
Hello David,
I have built your markup into a sample project and tried to reproduce the issue, but have not managed to replicate the issue.
Please check the attached sample.
If I have missed anything important, modify the attached sample so that it illustrates the issue in action and send it to me.
I will investigate it and do my best to help you.
I have find how to reproduce the issue.
I have just add a Tabcontrol with two TabItems.
SchedulerControl is on the first tabitem with the ResourcesPopupCheckedListBoxControl and there is nothing on the second tabitem.
For reproduce the bug you have just to click on the second tabitem and then to click on the first tabitem.
Try to filter resources with ResourcesPopupCheckedListBoxControl, it doesn't work !
I have attached the modified dample to reproduce the issue.
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.
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.