Telerik Forums
UI for WPF Forum
10 answers
305 views
My item source to grid is a class has about 20 columns. I have two bool columns.

public bool IsPassed {get;set;}
public bool HasPassport {get;set;}

when the grid is loaded or searhced these two cols display an image icon when the value is true.
while exporting to excel if IsPassed = true..then I have to show "Yes" in the excel else empty
if HasPassport = true, then I have to display some string value like "hdgfjhgh"

can anyone give me an example how to do it ?


Stefan
Telerik team
 answered on 18 May 2016
0 answers
76 views
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);
        }
    }
}

Minh
Top achievements
Rank 1
 asked on 18 May 2016
1 answer
95 views

Hello,

 

I'm using a RadRibbonDropDownButtonInside, I'm using a RadRibbonDropDownButton.DropDownContent. Inside it, I had put some differents controls.

You can see the begining of my code in '1' attached file.

 

For example, when I had clicked in a comboBox item, the DropDownContent is closing. But if I click on a radioButton, DropDownContent stays here (is that I want).

 

Do you know if there is a property who can avoid to close the DropDownContent ?

 

Thanks you.

 

Valentin.

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 18 May 2016
1 answer
122 views

Hello all, 

wonder if someone can help me to find the solution for get 'PropertyAggregateDescription' into a 'ColumnGroupDescriptions'. This is my code:

    <Window.Resources>
        <pivot:LocalDataSourceProvider x:Key="LocalDataProvider" AggregatesPosition="Rows">
            <pivot:LocalDataSourceProvider.RowGroupDescriptions>
                <pivot:PropertyGroupDescription PropertyName="Product Line"  />
            </pivot:LocalDataSourceProvider.RowGroupDescriptions>
            <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                <pivot:PropertyGroupDescription PropertyName="Value:Net Revenue - Total"  />
            </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
            <pivot:LocalDataSourceProvider.AggregateDescriptions>
                <pivot:PropertyAggregateDescription PropertyName="Net Revenue - Total" StringFormat="C" AggregateFunction="Sum" />
                <pivot:PropertyAggregateDescription PropertyName="Cost Total" StringFormat="C" AggregateFunction="Sum"/>
                <pivot:PropertyAggregateDescription PropertyName="GM $" StringFormat="C" AggregateFunction="Sum"/>
                <pivot:PropertyAggregateDescription PropertyName="GM %" StringFormat="P" AggregateFunction="Sum"/>
            </pivot:LocalDataSourceProvider.AggregateDescriptions>
        </pivot:LocalDataSourceProvider>
    </Window.Resources>

 

And if you see 'Problem.png' image is what i get. But I want something like the send image 'ThisIsWhatIWant.png', I can do it if I modify my Pivot with the FieldList in run time, just draggin the Values item into 'Column Labels', I need to have this in XAML or C# code, I think that it's something simple, but I just can't do it ):

 

Can someone help me?

Polya
Telerik team
 answered on 18 May 2016
1 answer
85 views

For a given property of type Vector3 (struct). If I set a custom EditorAttribute on the property, the binding with the custom editor's Value will be properly set to TwoWay:

[Editor(typeof(Vector3Editor), "Value")]
public Vector3 Position
{
    ...
}

If on the other hand use a DataTemplateSelector on the property grid (to avoid having to specify the Editor attribute on every Vector3 property) with the AutoBindBehavior in the DataTemplate, the binding will be OneWay. Looking in ILSpy (PropertyGridEditorFactory.GetBindingMode) it looks to only support TwoWay with primitive types.

I would expect the same BindingMode whether I use the EditorAttribute or a DataTemplateSelector with the AutoBindBehavior.

Thanks!

Yoan
Telerik team
 answered on 18 May 2016
3 answers
689 views

Hi,
I'm using LayoutControl with DisplayMode="Expander", but when I collapse a group, its content doesn't resize, controls disappear but LayoutControl height doesn'tchange.

I tried to use a WrapPanel to contains controls but it's the same behavior.

Am I missing something ?


This is my XAML

<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="550"/>
            </Grid.RowDefinitions>
            <telerik:RadLayoutControl  Grid.Row="0" Grid.Column="0" Orientation="Vertical">
                <telerik:LayoutControlGroup DisplayMode="Expander" IsExpanded="True" IsExpandable="True" Header="{DynamicResource layTabAccAccountCausalsFlags}">
                    <WrapPanel>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.GeneralUse}" Content="{DynamicResource labTabAccAccountCausalsGenericUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.IVAUse}" Content="{DynamicResource labTabAccAccountCausalsIVAUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.CustomersUse}" Content="{DynamicResource labTabAccAccountCausalsCustomersUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.SuppliersUse}" Content="{DynamicResource labTabAccAccountCausalsSuppliersUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.ThirdPartsUse}" Content="{DynamicResource labTabAccAccountCausalsThirdPartsUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.INTRAUse}" Content="{DynamicResource labTabAccAccountCausalsINTRAUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                    </WrapPanel>
                </telerik:LayoutControlGroup>
                <telerik:LayoutControlGroup DisplayMode="Expander" Margin="3" IsExpanded="True" IsExpandable="True" Header="{DynamicResource layTabAccAccountCausalsIVA}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150"/>
                            <ColumnDefinition Width="150*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                        </Grid.RowDefinitions>
                        <Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource labTabAccAccountCausalsSign}" Style="{StaticResource styleLabels}"/>
                        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="1">
                            <telerik:RadRadioButton IsChecked="{Binding Causal.Sign, Converter={StaticResource boolToStringConverter}, ConverterParameter=D}" Content="{DynamicResource valGive}" Margin="3" Width="50" />
                            <telerik:RadRadioButton IsChecked="{Binding Causal.Sign, Converter={StaticResource boolToStringConverter}, ConverterParameter=A}" Content="{DynamicResource valHave}" Margin="3" Width="50"/>
                        </StackPanel>
                        <Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource labTabAccAccountCausalsIVABookID}" Style="{StaticResource styleLabels}"/>
 
                        <Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource labTabAccAccountCausalsIVASign}" Style="{StaticResource styleLabels}"/>
                        <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1">
                            <telerik:RadRadioButton IsChecked="{Binding Causal.IVASign, Converter={StaticResource boolToStringConverter}, ConverterParameter=+}" Content="{DynamicResource valPlus}" Margin="3" Width="35" />
                            <telerik:RadRadioButton IsChecked="{Binding Causal.IVASign, Converter={StaticResource boolToStringConverter}, ConverterParameter=-}" Content="{DynamicResource valMinus}" Margin="3" Width="35"/>
                        </StackPanel>
                    </Grid>
                </telerik:LayoutControlGroup>
                <telerik:LayoutControlGroup DisplayMode="Expander" Margin="3" IsExpanded="True" IsExpandable="True" Header="{DynamicResource layTabAccAccountCausalsCounterpart}">
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.GeneralUse}" Content="{DynamicResource labTabAccAccountCausalsGenericUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.IVAUse}" Content="{DynamicResource labTabAccAccountCausalsIVAUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.CustomersUse}" Content="{DynamicResource labTabAccAccountCausalsCustomersUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                        <CheckBox HorizontalAlignment="Left" Margin="5,0,0,0" Height="20"  IsChecked="{Binding Causal.CustomersUse}" Content="{DynamicResource labTabAccAccountCausalsCustomersUse}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"></CheckBox>
                </telerik:LayoutControlGroup>
            </telerik:RadLayoutControl>
        </Grid>

Aldo
Top achievements
Rank 2
 answered on 18 May 2016
1 answer
111 views

Hi,

Is it possible to have different DragDropHighlightStyles on a ScheduleView.  I have two distinct types of appointments a user can drag onto the scheduleview and for one of those types - I don't want the standard yellow (with time) highlight style being used - but I do want it on the other type of appointment.  Is there any way I could achieve this behaviour?

Thanks.

Yana
Telerik team
 answered on 18 May 2016
2 answers
99 views

Hi,

I'm loading over a command (Async BackGroungWorker deleagte)  a view in a ContentControl via prisim regionmanager. 

I have to load some data in the view and want show a busy indicator. But it seems not so easy. I assume there's a pitfall with the sta thread. I must do the navigation request over the dispatcher thread. I use the InvokeOnUIThread() approach from the telerik example.

 

 

Sueleyman
Top achievements
Rank 1
 answered on 18 May 2016
1 answer
177 views

hi my friends

I have radbutton that send many emails with attachment to gmail

I put in radbutton click event

RadBusyIndicator.isBusy=true;

 

but not showing the RadBusyIndicator

I don't know why

 

Yana
Telerik team
 answered on 18 May 2016
8 answers
633 views

Hi,

I have the following scenario. I have a RadGridView with a ToolBar above, where the ToolBar contains a TextBox (Filter). The textbox is inside the tool bar's focus scope which is different from the main focus scope of the grid.

If I select a row, go to the filter text box in the tool bar and click on the grid without beginning edit or changing selection (for example on the selected row header) the keyboard focus is not transfered back to the gridview. This is programmed this way in GridViewRow.OnMouseLeftButtonDown.

On the other hand if I look at the TreeListViewRow instead of GridViewRow there is an explicit OnMouseDown-Handler which solves the problem for TreeListViews.

My question ist, why is it implemented this way for GridViewRows? A keyboard focus should always transfer on mouse down, even if the target element is the focused element in its focus scope.

Arthur

Maya
Telerik team
 answered on 18 May 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?