Telerik Forums
UI for WPF Forum
6 answers
225 views
Hello,

I have an application with lot's of windows with grids to display data. I'm using both RadGridView and RadTreeListView controls.

I need to style grid rows in different ways: mostly it is coloring foreground based on data and alternate rows coloring. Color for alternate rows is the same over the application. But styles for foreground colors are different for every single grid and for different data. So I suppose that if I setup property AlternateRowBackground once in the root style of the grid and then I will specify only RowStyle for every grid based on specific data to display it will merge my specific RowStyle with AlternateRowBackground. Unfortunately, I can't do that because if I set AlternateRowBackground GridView will not merge it with RowStyle: it will only apply AlternateRowBackground for the Background property od GridViewRow and that's all!

I believe it's a bug, because in common cases there're one style for all rows and only background changes for alternates. But now I have to specify AlternateRowStyle basedon my specific row style with only one setter for background for every grid.

For example this thread is about the same problem.
Nick
Telerik team
 answered on 08 Dec 2014
4 answers
73 views
Currently we are working with scheduleview from the UI for WPF Q1 2014 release.

As long as we are working with a mouse everything is working as expected.

the problem we are facing is once we install the application on a touch enabled tablet, we would expect to be able to pan through the calendar (vertical) as we would on a list control or any other control really.

but the only way for scrolling seems to be to actually use the vertical scrollbar on the right of the screen.

is there any way to enable scrolling/panning on a touch device?

regards.
Johan Lollinga
Johan
Top achievements
Rank 1
 answered on 08 Dec 2014
1 answer
121 views
Hi, 

I'm using RadCartesianChart for displaying ScatterAreaSeries. Below you can find my TrackBallInfoTemplate for the series. The problem with the TrackBallInfoTemplate is, if there is more than Point on the same Xvalue with different Yvalues, it displays the values from the first Point. But I want to display values from both Points or I want to be able to choose which point to display on theTrackBallInfoTemplate.

Please advice,

Regards
Semih 

<telerik:ScatterAreaSeries.TrackBallInfoTemplate>
                                <DataTemplate>
                                    <Grid Margin="0,0,0,0">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                                            <ColumnDefinition Width="100*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition></RowDefinition>
                                            <RowDefinition></RowDefinition>
                                            <RowDefinition></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource statisticsTextStyle}" TextAlignment="Justify" Grid.ColumnSpan="2" Text="{Binding DataPoint.DataItem.Description}" />
                                        <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource statisticsTextStyle}" Text="Break:"  FontWeight="Bold"/>
                                        <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource statisticsTextStyle}" Text="{Binding DataPoint.DataItem.Xvalue, StringFormat=\{0\}. second}" Margin="3,0,0,0"/>
                                        <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource statisticsTextStyle}" Text="Saving:" FontWeight="Bold"/>
                                        <TextBlock Grid.Row="2" Grid.Column="1" Style="{StaticResource statisticsTextStyle}" Text="{Binding DataPoint.DataItem.Yvalue, StringFormat=\{0:0.00\}}" Margin="3,0,0,0" />
                                    </Grid>
                                </DataTemplate>
                            </telerik:ScatterAreaSeries.TrackBallInfoTemplate>
Peshito
Telerik team
 answered on 08 Dec 2014
5 answers
297 views
Hi,

Since RadDragAndDropManager is obsolete this causes problems for me. I can't get DragDropManager to work.

Is there a C# example where I can see how drag rows from one GridView to another GridView should be done?  I also need to know how to drag a row from GridView  to a "normal" WPF element like a button or Image.

Thanks!
Dimitrina
Telerik team
 answered on 08 Dec 2014
2 answers
441 views
HI, hello,
I am facing problem which should be fixed already (based post http://www.telerik.com/forums/gridview-vertical-scrollbar---last-item-not-fully-visible#V4PclbPjJkW3wbe7TUNsRg).

this is my code:
<Grid ScrollViewer.HorizontalScrollBarVisibility="Disabled"
          ScrollViewer.VerticalScrollBarVisibility="Disabled"
          MinWidth="300"
          MaxWidth="600"
          Height="500">
        <telerik:RadPanelBar ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
            <telerik:RadPanelBarItem Header="Bar1">
                some content
            </telerik:RadPanelBarItem>
            <telerik:RadPanelBarItem Header="Bar2">
                <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
                    <telerik:RadGridView
                        Style="{StaticResource DefaultRadGridView}"
                        ItemsSource="{Binding ItemList}"
                        SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                         
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                    IsSynchronizedWithCurrentItem="False"
 
                                    EnableRowVirtualization="True"
                        EnableColumnVirtualization="False">
 
                        <telerik:RadGridView.Columns>
                            <!-- Name -->
                            <telerik:GridViewDataColumn
                                DataMemberBinding="{Binding Name}"
                                Header="Name"
                                Width="Auto" />
 
                            <!-- Description -->
                            <telerik:GridViewDataColumn
                                DataMemberBinding="{Binding Description}"
                                Header="Description"
                                Width="*"
                                TextWrapping="Wrap" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </ScrollViewer>
            </telerik:RadPanelBarItem>
            <telerik:RadPanelBarItem Header="Bar3">
                some content
            </telerik:RadPanelBarItem>
        </telerik:RadPanelBar>
    </Grid>


I have gridview in radpanelbar and I use scrollviewer. When the gridview is resized and wrapping of the text gets working, last item is partially (or whole) hidden. When TextWrapping is set to NoWrap, last item is shown correctly.
I tried also approach where I used just gridview scrollbar. This worked little bit better (it means that last item was not hiding so dramatically), but problem was still present.

I prepared nice demo where you can reproduce problem. I am using Q3 2014.

Steps to reproduce:
- run demo
- expand Bar2
- scroll to last item
- reduce width of main window to start text wrapping
- watch last item

When can be this fixed? Or which workaround should I use to fix this bug?
I tried to hack it by hooking on LayoutUpdated event and computing correct height of gridview, which worked fine. But unfortunatelly, it caused infinite calling of LayoutUpdated event in some cases (which lead to troubles especially at customers PCs).

Thanks for help.

P.S. I can send you working demo. I was not allowed to add zip file as attached files of this post.
SCHUHFRIED
Top achievements
Rank 1
 answered on 08 Dec 2014
3 answers
102 views
Hi,

I am trying to set a visual effect on ClusterItem by depending on the child items properties. I sent the ClusterItem to an IValueConverter and while debugging i can't see the child items in my ClusterItem but on coding there is no any property named items.

here is my Cluster template :
                    <DataTemplate x:Key="ClusterTemplate">
                        <Grid x:Name="ParentRoot"
                              Width="40" Height="40"
                              telerik:MapLayer.Location="{Binding Path=Center}"
                              telerik:MapLayer.HotSpot="0.5,1"
                              
                              MouseLeftButtonUp="ClusterMouseClick"
                              MouseRightButtonUp="ClusterRightMouseClick">
                            <Path Data="M978.6509,491.334L958.6109,491.334L954.4549,500.874L949.9999,491.334L930.6259,491.334C928.4169,491.334,926.6259,489.543,926.6259,487.334L926.6259,433.272C926.6259,431.063,928.4169,429.272,930.6259,429.272L978.6509,429.272C980.8599,429.272,982.6509,431.063,982.6509,433.272L982.6509,487.334C982.6509,489.543,980.8599,491.334,978.6509,491.334z"
                                  StrokeStartLineCap="Flat"
                                  Stretch="Fill"
                                  StrokeEndLineCap="Flat"
                                  Stroke="{Binding Converter={StaticResource alarmIndicator}}"
                                  StrokeThickness="1"
                                  StrokeMiterLimit="10"
                                  StrokeLineJoin="Miter"
                                  Fill="#7F000000"/>
                            <!-- Title -->
                            <TextBlock HorizontalAlignment="Center"
                                       VerticalAlignment="Top"
                                       Margin="5"
                                       TextAlignment="Center"
                                       Foreground="White"
                                       FontSize="12"
                                       Width="36"
                                       TextWrapping="Wrap"
                                       Text="{Binding Path=Count}"/>
                        </Grid>
                    </DataTemplate>

And my Converter:
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null)
                return null;
            ClusterItem item = (value as ClusterItem);
            var items = item.Items; // this is not possible

........
return something;

        }

I can see and inspect the items while debugging and also i can reach that property through immediate window, but i cant get that property through coding.

How can i get child items properties? Any idea...

Thanks anyway.
Petar Mladenov
Telerik team
 answered on 08 Dec 2014
1 answer
72 views
    I created a custom class deriving from RadGridView and another from GridViewGroupPanel. My goal is to add new dependency properties which will allow me to update the GridViewGroupPanel styles and templates more easily, and in a manor which fits my needs. Even made sure to create default styles for

How can this be accomplished?
Keaire
Top achievements
Rank 1
 answered on 05 Dec 2014
3 answers
65 views
WPF feedback (http://feedback.telerik.com/Project/143) link there are always error, Please look screenshot.

https://mega.co.nz/#!lF8CHDKJ!Of1eAvJQ_wy1ijmP-_7NY4Gx0KUpRvOdatm5J-wDHes
Dimitrina
Telerik team
 answered on 05 Dec 2014
6 answers
252 views
Is there a "ShowGridlines" property I can't find? 

If not, is there any way to show the bounds of table cells when there are no borders set?  I would assume I could implement this via a Custom UI Layer - if this is the only way, any pointers welcome!
Rasmus
Top achievements
Rank 1
 answered on 05 Dec 2014
11 answers
253 views
Hello All,

Found another bug in the RadWindow control.  The attached exception is thrown once in a while due to an unchecked conidtion in the WindowHostBase class.

The fix is below but you will have to compile it yourself until they get around to fixing their code product. 

1) In the 'Telerik.Windows.Controls.InternalWindow.WindowHostBase' class you will see the BringToFront method defined as:
public virtual void BringToFront()
{
    // FindIndexToAdd finds an index for a new item, not for old which needs to be moved. That's why we subtract 1.
    var targetIndex = this.FindIndexToAdd() - 1;
    var currentIndex = hosts.IndexOf(this);
 
    if (targetIndex != currentIndex)
    {
        hosts.RemoveAt(currentIndex);
        hosts.Insert(targetIndex, this);
    }
}

replace this function with:
public virtual void BringToFront() {
 
    // FindIndexToAdd finds an index for a new item, not for old which needs to be moved. That's why we subtract 1.
    var targetIndex = this.FindIndexToAdd() - 1;
    var currentIndex = hosts.IndexOf(this);
 
    if (targetIndex != currentIndex && targetIndex > 0) {
        if (currentIndex > 0)
            hosts.RemoveAt(currentIndex);
        hosts.Insert(targetIndex, this);
    }
}

 and the issue goes away.

- Rashad Rivera, Omegus Prime, LLC

Vladi
Telerik team
 answered on 05 Dec 2014
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?