This is a migrated thread and some comments may be shown as answers.

AutocompleteBox within EditAppointmentDialog

0 Answers 62 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 18 May 2016, 02:26 PM
Hi, I was successfully able to create and populate an autocompletebox using the styles provided in your SDK's for Custom Appointments. But the SelectedAttendees is sort of a dictionary so the setter is never trigger. Any thoughts on how I get around this?


<telerik:RadAutoCompleteBox Margin="6 0"
                        x:Name="AttendeeAutoCompleteBox"
                        Grid.Column="1"
                        ItemsSource="{Binding Path=AdditionalData.Atts, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                        SelectedItems="{Binding Occurrence.Appointment.SelectedAttendees, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        DisplayMemberPath="DisplayName"
                        TextSearchPath="Search"
                        Style="{StaticResource MultiAutoBox}"
                        WatermarkContent="Search ..."
                        MinHeight="55" VerticalContentAlignment="Top" Padding="5">
    <telerik:RadAutoCompleteBox.DropDownItemTemplate>
        <DataTemplate>
            <Grid Background="#F7F7F7" Margin="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding PersonName}" FontWeight="Bold" FontSize="14"/>
                <TextBlock Text="{Binding SubName}" FontWeight="Bold" FontSize="14" Grid.Column="2"/>
                <TextBlock Text="{Binding RType}" Grid.Column="1"/>
                <TextBlock Text="{Binding SubType}" Grid.Column="3" Grid.Row="0"/>
            </Grid>
        </DataTemplate>
    </telerik:RadAutoCompleteBox.DropDownItemTemplate>
</telerik:RadAutoCompleteBox>

 

public ObservableCollection<AttendeeSearchDTO> SelectedAttendees
{
    get
    {
        return this.Storage<CustomAppointment>().selectedAttendees;
    }
    set
    {
        CustomAppointment storage = this.Storage<CustomAppointment>();
        if (storage.selectedAttendees != value)
        {
            storage.selectedAttendees = value;
            this.OnPropertyChanged(() => this.SelectedAttendees);
        }
    }
}

No answers yet. Maybe you can help?

Tags
ScheduleView
Asked by
Minh
Top achievements
Rank 1
Share this question
or