Telerik Forums
UI for WPF Forum
4 answers
1.3K+ views

Hi Telerik team,

I am  trying to change the colour of the row border conditionally by following style settings. But I am unable to view the coloured border unless I change the value of the row border thickness to some value greater than 0. But increasing the row border thickness , increases the gray colored gap between rows.

Is there any other approach than can help change the colour of the gidview row border without changing the row border thickness i.e using the default border settings.

 

<telerik:RadGridView x:Name="radgvActivity" 
                             Grid.Row="2"
                             Margin="0" 
                             IsReadOnly="False"   RowIndicatorVisibility="Visible"                                                             
                             ScrollMode="RealTime" AutoGenerateColumns="False" 
                             EnableRowVirtualization="True"
                             CanUserFreezeColumns="False" CanUserResizeColumns="True" Width="780" Height="600"
                             BeginningEdit="radgvActivity_BeginningEdit"
                             RowEditEnded="radgvActivity_RowEditEnded">   
            <telerik:RadGridView.Resources>
                <Style TargetType="{x:Type telerik:GridViewRow}">
                    <Setter Property="BorderThickness" Value="1"></Setter>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=ActType}" Value="4">
                            <DataTrigger.Setters>
                                <Setter Property="BorderBrush" Value="Red" />
                            </DataTrigger.Setters>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </telerik:RadGridView.Resources>

 

Many Thanks !!

Regards,
Mausami

Mausami
Top achievements
Rank 1
 answered on 29 Jun 2011
1 answer
271 views
Hi,

i'm using a RadGridView and now i want to use a RadDataPager like this:

 <telerik:RadDataPager PageSize="100" Grid.Row="1" Source="{Binding Items, ElementName=GridView}" IsTotalItemCountFixed="True" DisplayMode="FirstLastPreviousNextNumeric, Text" />

but i get the message:
..RadDataPager ist not found...

but why?

THanks
REgards
Rene
Milan
Telerik team
 answered on 29 Jun 2011
1 answer
101 views
Hi - I have followed the Tree View styles customization from http://www.telerik.com/help/wpf/radtreeview-styles-and-templates-templated-nodes.html and it works just great.

I've now introduced a DataTemplateSelector that picks between one of the two HierarchicalDataTemplate that I have in my control's resources.

My problem is that once I introduce the DataTemplateSelector none of the styles or control templates that I have set up are applied. Is this a known issue? I tried putting

template.ItemContainerStyle = frameworkElement.FindResource("TreeViewItemStyle") as Style;
into my template selector but it did not seem to have any effect. Note that if I set ItemTemplate="{StaticResource blah}" instead of ItemTemplateSelector="{StaticResource selector" things works fine. Thanks
Petar Mladenov
Telerik team
 answered on 29 Jun 2011
1 answer
107 views
I am using a bar chart where I need to show a unit bar if a certain value is 1 and nothing if a value is 0. The ticks need to show a categorical label Present or Not Present. How can I achieve this?

Thanks.
Nikolay
Telerik team
 answered on 29 Jun 2011
3 answers
290 views
My Requirement is I want add Image for RadComboBoxItem from static folder.
The following was my code.

<
telerik:RadComboBox Name="Salutaion" Grid.Column="4" Width="75" Grid.Row="0" HorizontalAlignment="Left"
 IsEditable="True" IsReadOnly="True"  telerik:StyleManager.Theme="Office_Blue"
 ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Clear">
<telerik:RadComboBoxItem Content="Male"/>
<telerik:RadComboBoxItem Content="Female"/>
</telerik:RadComboBox> Thanks and Regards Naresh Mesineni
Yana
Telerik team
 answered on 28 Jun 2011
0 answers
75 views
Hi,

GridView with XML works fine...

                                                                <Grid.Resources>
                                                                    <XmlDataProvider x:Key="MODSource" Source="settings\module.xml" XPath="//Attributes/Attribute[@AttributeGroup='Template']"></XmlDataProvider>
                                                                </Grid.Resources>
                                                                <telerik:RadGridView Visibility="Visible" Name="radGridView1" AutoGenerateColumns="False" ItemsSource="{Binding Source={StaticResource MODSource}}" ShowGroupPanel="False">
                                                                    <telerik:RadGridView.Columns>
                                                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Name] }" Header="Name">
                                                                            <telerik:GridViewDataColumn.CellTemplate>
                                                                                <DataTemplate>
                                                                                    <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Name\']}">
                                                                                    </ContentControl>                                                                                       
                                                                                </DataTemplate>
                                                                            </telerik:GridViewDataColumn.CellTemplate>
                                                                        </telerik:GridViewDataColumn>                                                                      
                                                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Version] }" Header="Version">
                                                                            <telerik:GridViewDataColumn.CellTemplate>
                                                                                <DataTemplate>
                                                                                    <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Version\']}">
                                                                                    </ContentControl>
                                                                                </DataTemplate>
                                                                            </telerik:GridViewDataColumn.CellTemplate>
                                                                        </telerik:GridViewDataColumn>
                                                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\beschr] }" Header="Beschreibung" Width="*">
                                                                            <telerik:GridViewDataColumn.CellTemplate>
                                                                                <DataTemplate>
                                                                                    <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'beschr\']}">
                                                                                    </ContentControl>
                                                                                </DataTemplate>
                                                                            </telerik:GridViewDataColumn.CellTemplate>
                                                                        </telerik:GridViewDataColumn>
                                                                    </telerik:RadGridView.Columns>
                                                                </telerik:RadGridView>

But how can i add a boolean Column out of my xml file: <ContentAttribute AttributeName="Aktiv">Ja</ContentAttribute>


Thanks
Regards
Rene
ITA
Top achievements
Rank 1
 asked on 28 Jun 2011
0 answers
132 views
Hi,

i have a working RadGridView with an XML-File which is bind by XMLDataProvider. I want to use a Telerik RadButton with a Command to insert, delete or edit Rows. But it does not work:

CODE:
                                                        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="left" Margin="0,5,0,0">
                                                            <telerik:RadButton Width="100" Content="Delete selected rows" Margin="0,0,5,0"
                                                                                Command="telerikGrid:RadGridViewCommands.Delete" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                            <telerik:RadButton Width="100" Content="Add new row" Margin="0,0,5,0"
                                                                                Command="telerikGrid:RadGridViewCommands.BeginInsert" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                            <telerik:RadButton Width="100" Content="Save insert/edit" Margin="0,0,5,0"
                                                                                Command="telerikGrid:RadGridViewCommands.CommitEdit" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                            <telerik:RadButton Width="100" Content="Cancel insert/edit"
                                                                                Command="telerikGrid:RadGridViewCommands.CancelRowEdit" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                        </StackPanel>
                                                        <Grid Grid.Row="1">                                                           
                                                            <Grid.Resources>
                                                                <XmlDataProvider x:Key="MADSource" Source="settings\mandanten.xml" XPath="//Attributes/Attribute[@AttributeGroup='Mandant']"></XmlDataProvider>
                                                            </Grid.Resources>
                                                            <telerik:RadGridView Visibility="Visible" x:Name="radGridView2" AutoGenerateColumns="False" ItemsSource="{Binding Source={StaticResource MADSource}}"
                                                                                 CanUserDeleteRows="True" CanUserInsertRows="True" IsReadOnly="False" ShowGroupPanel="False" SelectionMode="Extended">
                                                                <telerik:RadGridView.Columns>
                                                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Name] }" Header="Name" Width="120">
                                                                        <telerik:GridViewDataColumn.CellTemplate>
                                                                            <DataTemplate>
                                                                                <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Name\']}">
                                                                                </ContentControl>
                                                                            </DataTemplate>
                                                                        </telerik:GridViewDataColumn.CellTemplate>
                                                                    </telerik:GridViewDataColumn>
                                                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Host] }" Header="Host" Width="100">
                                                                        <telerik:GridViewDataColumn.CellTemplate>
                                                                            <DataTemplate>
                                                                                <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Host\']}">
                                                                                </ContentControl>
                                                                            </DataTemplate>
                                                                        </telerik:GridViewDataColumn.CellTemplate>
                                                                    </telerik:GridViewDataColumn>
                                                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Port] }" Header="Port" Width="50">
                                                                        <telerik:GridViewDataColumn.CellTemplate>
                                                                            <DataTemplate>
                                                                                <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Port\']}">
                                                                                </ContentControl>
                                                                            </DataTemplate>
                                                                        </telerik:GridViewDataColumn.CellTemplate>
                                                                    </telerik:GridViewDataColumn>
                                                                </telerik:RadGridView.Columns>
                                                            </telerik:RadGridView>
CODEBEHIND:
    Public Sub New()

        Dim deleteCommand As ICommand = RadGridViewCommands.Delete
        Dim beginInsertCommand As ICommand = RadGridViewCommands.BeginInsert
        Dim cancelRowEditCommand As ICommand = RadGridViewCommands.CancelRowEdit
        Dim commitEditCommand As ICommand = RadGridViewCommands.CommitEdit

        InitializeComponent()
    End Sub

I get no errors, but the buttons do not work and i can't edit the Columns. HELP!!!
Rene
ITA
Top achievements
Rank 1
 asked on 28 Jun 2011
4 answers
183 views
Hi,

How can I format time to display it in 24 format ?
ThomasJ
Top achievements
Rank 2
 answered on 28 Jun 2011
1 answer
137 views
Hello All,

I use Schedule view. After creating an appointment when I want to resize it using the mouse, the resize animation is not visible, say I dont see till which point I dragged it. But  in examples it is available. Can any one help me getting this particular behaviour

Dheena
Konstantina
Telerik team
 answered on 28 Jun 2011
3 answers
121 views
Searching for a WPF property grid I found this forum. I'm implementing a solution, where I need a property grid soon.

How long will it take until you release it?

Greets
Rossen Hristov
Telerik team
 answered on 28 Jun 2011
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
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
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?