Telerik Forums
UI for WPF Forum
2 answers
173 views
Hello,

here is my problem. I created a RadGriewView in my form and I have to use my own filters with it, so I use the following method:

        private void majradgridviewglobale()
        {
            if (this.filtresactifs.Count.Equals(0))
            {
                this.radGridView1.ItemsSource = TableResult;
            }
            else
            {
                DataTable tablevide = new DataTable();
                foreach (DataTable table in this.filtresactifs)
                {
                    tablevide.Merge(table);
                }
                this.radGridView1.ItemsSource = tablevide;
            }
        }

where filtresactifs is a datatablecollection and tableresult the datatable filled with the "unfiltered" data.

What happens is when I use the GridView filters (the checkboxes to select rows), then my own filter methods, everything works fine. When I uncheck the filters (the ones from the gridview) to cancel the gridview filter, my data is stuck to what it was when the filters from the grid view where active (even when nothing is checked!).

I did try to debug it and it seems that the DataTable given to radGridView1.ItemsSource are correct so I'm afraid I don't have much clue about this.

Can you give me a hint about this? Thanks.

PS: Excuse if my English is not that good, but I'm not a native speaker so I'm doing my best.

PS2: It looks like only the checkboxes are a problem, when I use the option "filters", looks like it works.
Yannick Lurot
Top achievements
Rank 1
 answered on 31 Jul 2009
3 answers
781 views
Hi

I noticed that the default RadGridView style does not provide a gray row when a Row is selected but not active; window with both textbox and gridView; select line in gridView; line is blue; activate textbox (click or tab); selected line is still blue.

I tried to modify this behavior inside a GridViewRow style using a Multitrigger but it seems that Selector.IsSelectionActive is always false.

This is my current GridViewRow template : 

   <Style TargetType="{x:Type telerik:GridViewRow}">
           
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:GridViewRow}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <Border x:Name="SelectionBackground"
                                    Grid.Column="2"
                     Background="{TemplateBinding Background}"
                     MinHeight="{TemplateBinding MinHeight}"
                     BorderBrush="{TemplateBinding BorderBrush}"
                     BorderThickness="{TemplateBinding BorderThickness}"
                     Margin="{TemplateBinding Margin}"
                     Padding="{TemplateBinding Padding}" />

                            <Rectangle x:Name="BackgroundRectangle"
                                       Grid.Column="2" Opacity="0"
                        Fill="{DynamicResource telerik.GridViewRowSelectedBackground}"
                        Stroke="{DynamicResource telerik.GridViewRowSelectedBorderBrush}"
                        StrokeThickness="1" />

                            <telerik:IndicatorPresenter x:Name="PART_IndicatorPresenter" 
                                                        Visibility="{TemplateBinding RowIndicatorVisibility}" Grid.Column="0"
                              Background="{TemplateBinding Background}"
                              BorderBrush="BlueViolet"
                              BorderThickness="1,0,1,1">

                                <Path x:Name="NavigatorIndicator"
          Fill="#FF000000" Stretch="Fill" Width="5" Height="8" Data="M254.5,183.75 L254.5,193.33333 260.75,188.16682 z"
          Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center" />

                            </telerik:IndicatorPresenter>
                            <telerik:IndentPresenter x:Name="PART_IndentPresenter" 
                                                     IndentLevel="{TemplateBinding IndentLevel}"
                                                     Grid.Column="1"
                                                     Background="{TemplateBinding Background}" />
                            <telerik:DataCellsPresenter  Height="Auto"
                                                         x:Name="PART_DataCellsPresenter"
                                                         Grid.Column="2"
                     MinHeight="{TemplateBinding MinHeight}" />

                            <Rectangle Width="Auto" Height="Auto"
                                       x:Name="InvalidBorder"
                                       Margin="0"
                                       Visibility="Collapsed"
                                       Stroke="Red"
                                       StrokeThickness="2"
                                       Grid.Column="0" Grid.ColumnSpan="3" />

                        </Grid>
 
                        <ControlTemplate.Triggers>
                           
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="Fill"
                                        TargetName="BackgroundRectangle"
                                        Value="{DynamicResource telerik.GridViewRowSelectedInactiveBackground}"/>
                                <Setter Property="Stroke"
                                        TargetName="BackgroundRectangle"
                                        Value="{DynamicResource telerik.GridViewRowSelectedInactiveBorderBrush}"/>
                            </MultiTrigger>

                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Opacity" TargetName="BackgroundRectangle" Value="1"/>
                            </Trigger>
                           
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" TargetName="SelectionBackground" Value="{DynamicResource telerik.GridViewRowMouseOverBackgroundBrush}"/>
                            </Trigger>
                           
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="False" />
                                    <Condition Property="IsMouseOver" Value="True" />
                                </MultiTrigger.Conditions>
                                <Setter Property="Opacity" TargetName="BackgroundRectangle" Value=".5"/>
                            </MultiTrigger>
                           
                            <Trigger Property="IsCurrent" Value="True">
                                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible" />
                            </Trigger>
                           
                            <Trigger Property="IsContentValid" Value="False">
                                <Setter TargetName="InvalidBorder" Property="Visibility" Value="Visible" />
                            </Trigger>
                           
                        </ControlTemplate.Triggers>
                       
                    </ControlTemplate>
                </Setter.Value>
            </Setter>

            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="BorderBrush" Value="{DynamicResource telerik.GridViewRowBorderBrush}" />
            <Setter Property="BorderThickness" Value="0,0,0,0" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="MinHeight" Value="18" />
            <Setter Property="FontSize" Value="11" />
            <Setter Property="FontFamily" Value="Verdana" />
            <Setter Property="FontWeight" Value="Normal" />
            <Setter Property="Foreground" Value="#FF000000" />

             <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Path=IsAlternating, RelativeSource={RelativeSource Self}}" Value="true"/>
                        <Condition Binding="{Binding Path=UseAlternateRowStyle, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type telerik:RadGridView}}}" Value="true"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Background" Value="{DynamicResource telerik.GridViewRowAlternatingRowBackground}" />
                </MultiDataTrigger>
            </Style.Triggers>

        </Style>

Do you have any idea how to solve this ?

Kalin Milanov
Telerik team
 answered on 31 Jul 2009
1 answer
157 views
Hi,

I am using the chart control with SeriesMappings.  Once I define a custom layout, like below, the chart no longer shows data.
        <telerik:RadChart x:Name="RadChart1" UseDefaultLayout="False">  
            <Grid> 
                <Grid.RowDefinitions> 
                    <RowDefinition Height="Auto" /> 
                    <RowDefinition Height="*" /> 
                    <RowDefinition Height="Auto" /> 
                </Grid.RowDefinitions> 
 
                <chart:ChartArea x:Name="ChartArea1" LegendName="ChartLegend1" 
                      Grid.Row="0" /> 
                <chart:ChartTitle Content="Sample Report" Grid.Row="1" 
                       VerticalAlignment="Top" HorizontalAlignment="Center" 
                       TextElement.FontWeight="Bold" TextElement.FontSize="24" /> 
                <chart:ChartLegend x:Name="ChartLegend1" Header="Legend:" 
                        Grid.Row="2" 
                        VerticalAlignment="Top" /> 
            </Grid> 
        </telerik:RadChart> 

Are SeriesMappings not possible with custom layouts?

Thanks,
Pauly
Ves
Telerik team
 answered on 30 Jul 2009
1 answer
136 views
Hi

I cannot change the font size of Chart Title in code. The following code does not work.
Is there any way to chhange the font size?

radChart1.DefaultView.ChartTitle.FontSize = 8;

Thanks in advance.

Hyong

 

Vladimir Milev
Telerik team
 answered on 30 Jul 2009
4 answers
243 views
Does the Grid support RadioButtons?
Pavel Pavlov
Telerik team
 answered on 30 Jul 2009
1 answer
213 views

When I scroll combobox (not using up-down arrow, but the bar in combobox Vertical Scrollbar).

The combobox item cannot be selected using mouse click and not closing if I click outside combobox area.

Boyan
Telerik team
 answered on 30 Jul 2009
2 answers
121 views
I'm trying to bind data using XmlDataProvider to image item in radcarousel but it didn't work . i think that am doing something wrong or i miss something . what should i use to read xml file .
 

 

 

 

<Grid.DataContext>   
    <XmlDataProvider x:Name="objectDataProvider" Source="People.xml" XPath="/People/Person" />    
</Grid.DataContext> 
<telerik:RadCarousel Margin="12,30,12,34" Name="radCarousel1" >    
   <telerik:RadCarousel.ContextMenu>   
        <ContextMenu AllowDrop="True" HasDropShadow="True" IsTabStop="True" />   
   </telerik:RadCarousel.ContextMenu>   
      <Image Source="{Binding XPath=ImageFile}"></Image>   
</telerik:RadCarousel>   
 

 

 

i would appreciate any help, thanks in advance. 

 

 

 

 

 

 

Beesh
Top achievements
Rank 1
 answered on 29 Jul 2009
0 answers
148 views
Hi,

I just made a new blog about how to (easily) use telerik WPF controls in a SketchFlow project.
Maybe it's helpfully for some of you:
http://manni-at.spaces.live.com/blog/cns!82CF2A6C0D0C6F3C!204.entry

Regards

Manfred
ManniAT
Top achievements
Rank 2
 asked on 29 Jul 2009
1 answer
158 views
Hi there.
I'm using a (2009Q2) Combobox.
When utilizing the "isEditable"-autocompletion i am experiancing a small Problem: After typing someting the Backspace key isn't working anymore. Delete however is working fine.
Someone else experiancing this ?

Nils
Boyan
Telerik team
 answered on 29 Jul 2009
2 answers
133 views
Environment: 
WPF - XBAP style deployment
Version 2009.2.701.35

I'm trying to use the RadWindow to create a dynamic modal dialog from the code behind.

I'm creating the RadWinow as such:

 

var window = new RadWindow

 

{

WindowStartupLocation =

WindowStartupLocation.CenterOwner,

 

CanClose =

true,

 

CanMove =

true,

 

ResizeMode =

ResizeMode.NoResize,

 

Content =

new UnhandledError(),

 

Height = 300,

Width = 500

};

window.ShowDialog();

The problem is that the UserControl doesn't get displayed at all in the content.

The UserControl is pure XAML as:

 

<

 

UserControl x:Class="PCSWeb.WPFShell.Views.UnhandledError"

 

 

 

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

 

 

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

 

 

 

 

Height="300" Width="300" Name="window" Loaded="window_Loaded" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">

 

 

 

 

 

 

 

<Grid Background="AliceBlue" Height="Auto" Width="Auto">

 

 

 

 

 

 

 

<Grid.RowDefinitions>

 

 

 

 

 

 

 

<RowDefinition />

 

 

 

 

 

 

 

<RowDefinition />

 

 

 

 

 

 

 

</Grid.RowDefinitions>

 

 

 

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

 

 

 

<ColumnDefinition Width="*" />

 

 

 

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

 

 

 

<Border Grid.Row="0" BorderBrush="#feca00" CornerRadius="0,10,20,40"

 

 

 

 

 

 

BorderThickness="2" Height="Auto">

 

 

 

 

 

 

 

<StackPanel>

 

 

 

 

 

 

 

 

<TextBlock Text="Error">adafdfasdf</TextBlock>

 

 

 

 

 

 

 

</StackPanel>

 

 

 

 

 

 

 

</Border>

 

 

 

</Grid>

 

</

 

UserControl>

 

 

 


 

Hristo Borisov
Telerik team
 answered on 29 Jul 2009
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?