Telerik Forums
UI for WPF Forum
1 answer
108 views
Hi,
I have a gridView with RowDataTemplate which has a UserControl:
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                    <CptyManagement:CptyView DataContext="{Binding}"/>
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>

I'm trying to get the UserControl instance of the selected row.
I get the selected row by
var row = (GridViewRow) gridView.ItemContainerGenerator.ContainerFromItem(gridView.SelectedItem);
But I couldn't get the UserControl from the Template.

Can someone help?
Thx,
Oren
Vanya Pavlova
Telerik team
 answered on 29 Apr 2011
3 answers
59 views
Hello,

I am using your (great) RadWindow. The problem is when i set its Flow property to 'RightToLeft', when i try to drag it to the right for example, it 'flies' real quickly and vanishes to the left, without the possiblity of focusing it again. When removing the RightToLeft , everything is back to normal.

Please help!

Thanks,
Oran
Tsvyatko
Telerik team
 answered on 29 Apr 2011
7 answers
110 views
I'm trying to create an effect where sometimes elements of a RadChart are hidden, but I'm having problems on the Axes (X and Y). I would like to hide everything BUT the title on the Y Axis, and hide only the title on the X axis.

My problem is that this seems impossible to do through XAML, and the examples seem convinced that I'm using Expression and codebehind. I'm not, and I'm not, because charts may not be instantiated when this effect occurs, and will miss the event.  I'm bewildered by the various properties and classes for supporting an Axis. What is the difference between AxisYStyle, AxisY.Styles, and AxisYItemLabelStyle? The RadCharts' Axes seem to ignore whatever style I place on them, and the only way I'm seeing to achieve my effect is to hardcode it into the XAML, which is not what I want because this effect is supposed to be conditional.
Sia
Telerik team
 answered on 29 Apr 2011
1 answer
85 views

Hi,

 

I have a Pie Chart and the following code:

 

DataSeries series = new DataSeries();
series.Definition = new PieSeriesDefinition();
series.Definition.InteractivitySettings.SelectionMode = ChartSelectionMode.Single;
series.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Item;
 
series.Add(new DataPoint(1));
series.Add(new DataPoint(2));
series.Add(new DataPoint(3));
series.Add(new DataPoint(4));
radChart.DefaultView.ChartArea.DataSeries.Add(series);
radChart.DefaultView.ChartArea.SelectItem(0);

 

What I would like to do is to “pre-select” an item immediately after generating the chart. However, the SelectItem in my code doesn’t work because it seems the SelectItem needs the chart to first be rendered. If I call the SelectItem from a timer (and then the chart has been rendered), then it works. Is there a way to call the SelectItem when the chart hasn’t been rendered? Or is there a way to know when the chart and the different elements  have been generated so that the SelectItem will work?

 

Thanks!

Tsvetie
Telerik team
 answered on 29 Apr 2011
1 answer
79 views
Regarding grid view control, the "First Look" example shows a tab control for each row. We can also have a hierarchical grid as shown in "Custom Hierarchy" example. Can we have a grid for both functionalities together? Like we can goto 3rd level hierachy and on this level, we provide a tab for each record.
Vlad
Telerik team
 answered on 29 Apr 2011
1 answer
103 views
Hello!
Found one problem with radgridviev, which I dont know how to fix.

My scenario:

WPF app for .NET Framework 4
Windows 7 (x64) Ultimate
Version of Telerik dll's: 2011.1.419.40

Here's a structure of document that i'm querying from data source:
Client 
-- Animals
----- Receptions 
(there's other relations like Client - Contacts and so on...)

I show the data to user using the following hierarchy:

RadGridView (showing clients)
-- TabControl
----- RadGridView (showing animals)
---------- TabControl
--------------- RadGridView (showing receptions)


Now, for the problem:

Every RadGridView in hierarchy has handlers for: SelectionChanged, Deleted, RowEditEnded. 
When i add any of SelectionChanged, Deleted, RowEditEnded handler to receptions RadGridView my app shows only the clients grid (the topmost one) with "+" that's not expandable.
Without handlers everything (in leaf RadGridView) works as expected.
If i use a debugger it shows that i have exception: NullReferenceException that's throwed from GridViewRow.OnIsExpandedChanged.

Here's a part of xaml i use :
http://pastebin.com/84hQ9rAP

Any suggestions about what am i doing wrong?

EDIT: 

if i delete "RowStyleSelector="{StaticResource ReceptionRowStyleSelector}" and add handlers to my nested grid - then all seems to work again an there's no exception. But i have no row styling for grid.

That's my ReceptionRowStyleSelector code:

public class ReceptionRowStyleSelector : StyleSelector<br>  
{
  
public override Style SelectStyle(object item, DependencyObject container)
  {            
if (item is Reception)   
{  
            var reception = (Reception)item;
            if (reception.IsCompleted) return CompletedReception;
            
if (reception.IsCanceledByClient) return CanceledReception;
    
if (reception.IsClientNotified) return NotifiedReception;
 }
return DefaultStyle;
 }

...

Styles i use a very simple:

<local:ReceptionRowStyleSelector x:Key="ReceptionRowStyleSelector">
            <local:ReceptionRowStyleSelector.DefaultStyle>
                <Style TargetType="telerik:GridViewRow"></Style>
            </local:ReceptionRowStyleSelector.DefaultStyle>
            <local:ReceptionRowStyleSelector.CompletedReception>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="#4502FF49"/>
                </Style>
            </local:ReceptionRowStyleSelector.CompletedReception>
            <local:ReceptionRowStyleSelector.CanceledReception>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="#40000000"/>                
                </Style>
            </local:ReceptionRowStyleSelector.CanceledReception>
            <local:ReceptionRowStyleSelector.NotifiedReception>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="#4FA4B700"/>
                </Style>
            </local:ReceptionRowStyleSelector.NotifiedReception>
        </local:ReceptionRowStyleSelector>

Thanks, Alex Yakimaskiy

Vlad
Telerik team
 answered on 29 Apr 2011
3 answers
166 views
    <DataTemplate x:Key="CustomToolTipDataTemplate2" x:Name="toolTipTemplate2">
        <StackPanel Margin="10,5">
            <TextBlock FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='NAME', StringFormat=County: {0}}" />
            <TextBlock x:Name="KPITip" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='PAT_EST', StringFormat='Percentage of Paternity Established: {0:0.##}'}" />
        </StackPanel>
    </DataTemplate>
</Grid.Resources>


How can I programmatically change the ConvertParameter in those TextBlocks and also change the Colorizer ExtendedPropertyName? I can't seem to figure out how to get to them.

Andrey
Telerik team
 answered on 29 Apr 2011
1 answer
120 views
Hi,

If a user double clicks on any element in the RadGridView the RowActivated event fires... This is especially annoying as you double click the text box in the filter options to select all text in the textbox (standard windows things) but this triggers the event.

Thanks,
Maya
Telerik team
 answered on 29 Apr 2011
1 answer
208 views
Is it possible to have a multiple column GridViewComboBoxColumn where the dropdown shows multiple columns - almost like another grid?

I've got a dropdown that concatenates 3 data points and it would be cool if the dropdown rendered a mini-grid of values instead of a list of concatenated string values.  Even cooler would be sorting and filtering within the min-grid...
Maya
Telerik team
 answered on 29 Apr 2011
5 answers
172 views
I'm trying to get a handle to the Grouping Event but I'm not having any luck.
Please Help.
Yavor Georgiev
Telerik team
 answered on 28 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?