Telerik Forums
UI for WPF Forum
2 answers
56 views
I ported this silverlight example to WPF and it stopped working. I'm talking about the first project provided by Ross. I didn't change any code (other than the wpf/silverlight stuff) and it doesn't load any row in any of the child tables anymore.

I also took this other example, which is a WPF project already (ticketid-243249-hierarchychildtemplate.zip), switched the dll's for the Q3 release and it stopped working. Same problem, doesn't load any row.

My situation is simple, I wanna be able to create a hierarchy of .NET Objects like the following:

Clients
Offices
Contacts

I need to be able to define each column, I tried this code, which seems the most straight forward approach, but it doesn't let me define any column:

           <telerik:RadGridView.ChildTableDefinitions> 
                <telerik:GridViewTableDefinition AutoGenerateFieldDescriptors="False"
                    <telerik:GridViewTableDefinition.Relation> 
                        <data:PropertyRelation ParentPropertyName="Offices" /> 
                    </telerik:GridViewTableDefinition.Relation> 
                </telerik:GridViewTableDefinition> 
            </telerik:RadGridView.ChildTableDefinitions> 

I've tried many other approaches and samples, so far no luck. Any ideas?
Luis
Top achievements
Rank 1
 answered on 13 Nov 2009
1 answer
98 views
Hi Guys,

I found a bug in treeview when pressing F2 to edit the name. Here is the scenario:

On my screen, left side is a treeview, right side is a textbox. Treeview is bound to an observablecollection. When selecting an item in the treeview, the tree node name is showing on the textbox of right side.

1. Select a treenode (Item1),  Textbox shows Item1's name (Item1).
    press F2,
    do not change anything, press enter key.
   
2. click the textbox of right side, change Item1 to Item2. Since it is bound to ObservableCollection, once it is changed to Item2, treenode is changed accordingly.

3. Select treenode Item2(the same node as Item1 but now named Item2) , hit F2, the treenode displays Item1 instead of Item2

If you don't Press F2 in step1, it works fine. It looks like although the source is changed, when you hit F2, the content showing in F2 box is not refreshed. Please investigate.

Thanks,
Bobi
Telerik team
 answered on 13 Nov 2009
1 answer
157 views
Hi,
      I am facing a problem which i am demonstrating in the following steps:

a) I take a telerik wpf grid like this:

<

 

gridviewcontrols:RadGridView local:RadialPanel.ZIndex="0" Name="grdPendingEncounters" AutoGenerateColumns="False"

 

 

ShowGroupPanel="False"

 

 

CanUserSortColumns="True" ShowColumnFooters="False"

 

 

ColumnsWidthMode="Fill"

 

 

AreRowDetailsFrozen="True" RowDetailsVisibilityMode="VisibleWhenSelected" RowIndicatorVisibility="Collapsed"

 

 

UseAlternateRowStyle="True" Margin="5,1,0,0" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" Opacity="1">

 

 

 

<gridviewcontrols:RadGridView.Resources>

 

 

 

<local:StatusToColorConverter x:Key="MyConverter" />

 

 

 

</gridviewcontrols:RadGridView.Resources>

 

 

 

<gridviewcontrols:RadGridView.RowAppearance>

 

 

 

<gridviewcontrols:RowAppearanceSettings UseAlternateRowStyle="True" RowStyle="{StaticResource GridViewRowStyle}" AlternateRowStyle="{StaticResource GridViewAlternateRowStyle}" />

 

 

 

</gridviewcontrols:RadGridView.RowAppearance>

 

 

 

<gridviewcontrols:RadGridView.Columns>

 

 

 

<gridviewcontrols:GridViewColumn HeaderCellStyle="{StaticResource FirstHeaderCellStyle}" Width="30" IsFilterable="False">

 

 

 

<gridviewcontrols:GridViewColumn.CellTemplate>

 

 

 

<DataTemplate x:Name="checkBoxDataTemplate">

 

 

 

<CheckBox Name="chkBoxTemplate" Checked="chkBoxTemplate_Checked" Unchecked="chkBoxTemplate_Checked" IsChecked="{Binding isChecked}"></CheckBox>

 

 

 

</DataTemplate>

 

 

 

</gridviewcontrols:GridViewColumn.CellTemplate>

 

 

 

</gridviewcontrols:GridViewColumn>

 

 

 

<gridviewcontrols:GridViewDataColumn Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=Date}" HeaderCellStyle="{StaticResource HeaderCellStyle}" DataMemberBinding="{Binding EncounterDate}" IsFilterable="True">

 

 

 

</gridviewcontrols:GridViewDataColumn>

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=Patient}" DataMemberBinding="{Binding Patient}" IsReadOnly="True" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=ID}" DataMemberBinding="{Binding EncounterID}" IsReadOnly="True" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=Type}" DataMemberBinding="{Binding EncounterType}" IsReadOnly="True" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=Provider}" DataMemberBinding="{Binding Provider}" IsReadOnly="True" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=Location}" DataMemberBinding="{Binding Location}" IsReadOnly="True" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=ClaimNo}" DataMemberBinding="{Binding ClaimNo}" IsReadOnly="True" Width="110" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=FinalizedBy}" DataMemberBinding="{Binding FinalizedBy}" Width="130" IsReadOnly="True" IsFilterable="True" />

 

 

 

<gridviewcontrols:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderCellStyle}" Header="{Resx ResxName=PMS.UserInterface.Resources.UIResource, Key=Status}" DataMemberBinding="{Binding Status}" IsReadOnly="True" IsFilterable="True" >

 

 

 

<telerik:GridViewDataColumn.CellStyle>

 

 

 

<Style TargetType="telerik:GridViewCell">

 

 

 

<Setter Property="Foreground" Value="{Binding Status, Converter={StaticResource MyConverter}}" />

 

 

 

</Style>

 

 

 

</telerik:GridViewDataColumn.CellStyle>

 

 

 

</gridviewcontrols:GridViewDataColumn>

 

 

 

</gridviewcontrols:RadGridView.Columns>

 

 

 

</gridviewcontrols:RadGridView>

 


2) Then i set the item source of this grid to null and then to the collection like this:

grdPendingEncounters.ItemsSource =

null;

 

grdPendingEncounters.ItemsSource = GetObservableObjectData(encountersCollection);


3) Then i am adding the Checkbox in the header of the first column like this dynamically

grdPendingEncounters.Columns[0].Header =

null;

 

CheckBox checkBox = null;

checkBox =

new CheckBox();

 

checkBox.Width = (

double)15;

 

checkBox.Checked +=

new RoutedEventHandler(CheckBox_Checked);

 

checkBox.Unchecked +=

new RoutedEventHandler(CheckBox_Checked);

 

 

grdPendingEncounters.Columns[0].Header = checkBox;


4) but it runs successfully in first go and then in second go it is not showing the check box of the first header.

5) and in third go it shows an error like "Specified element is the logical child of another element .Disconnect it first"

Please Help me out.
Thanks in advance
Shreya
Vlad
Telerik team
 answered on 12 Nov 2009
6 answers
241 views
I have a horizontal path that my RadCarouselPanel follows.  When there are only 1 or 2 items bound to my ListBox (where the RadCarouselPanel is), I want the items to appear in the center of my path instead of on the left side.  Is there a way to tell an item to appear in the center of the path?
Maria Im
Top achievements
Rank 1
 answered on 12 Nov 2009
1 answer
65 views
Hi,
  I have a window created in wpf. The window has 3 tabs: input , home, output. The 'input ' tag has radgrid control. I can edit the cells of the grid, but I want to get new value whatever I have changed in radgrid in ' home' tab.. I do not want to store in database and then acces. i want to modify the collection whatever is binded to grid and access that collectiob value to 'home' tab. please help me in this. it is
Milan
Telerik team
 answered on 12 Nov 2009
1 answer
129 views
Hi Guys,

I am new to Telerik TreeView control. If I try to drag a node to itself I can see the 'Stop' Icon which means it is a invalid target. What I am trying to do is to set certain nodes to be invalid targets so that when people drag nodes to these targets, they will see the Stop icon. Which event can I catch the drag movement or where else can I do this and how?

Thanks for the help in advance.
Kiril Stanoev
Telerik team
 answered on 12 Nov 2009
1 answer
91 views
It seems that wpf accesskeys do not work when a NumericUpDown field has focus.  I was able to reproduce this in a new project with just a label and an NumericUpDown control.  Can you offer a work around or bug fix?  Please let me know if you need more detail.

Thanks,

Alex

<Window x:Class="AccessKeySample.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Height="125" Width="75" 
        xmlns:d="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
    <StackPanel> 
        <Label x:Name="_label" Target="{Binding ElementName=_textBox}"
            tes_t 
        </Label> 
         
        <TextBox x:Name="_textBox"/> 
        <d:RadNumericUpDown/> 
    </StackPanel> 
</Window> 
 

Valeri Hristov
Telerik team
 answered on 12 Nov 2009
1 answer
356 views
Hi Guys,

Sometimes my gridview has ItemSource count = 10, but items.count = 0. Sometimes the counts are same. I remembered someone has posted some similar issue but I can't find it any more. Any answers? Also, when should I use grid.Rebind() function?

Thanks,
Milan
Telerik team
 answered on 12 Nov 2009
1 answer
102 views
There is a rendering artifact when you place a menu inside a toolbar like so
<t:RadToolBar DockPanel.Dock="Top" Height="25"
            <TextBlock Text="Select Job:" Margin="2,2,5,0"/> 
 
            <t:RadComboBox x:Name="cmbJobs" Width="200" IsTabStop="False" IsEditable="True" StaysOpenOnEdit="True" /> 
            <t:RadMenu Background="Transparent"
                <t:RadMenuItem Header="Filter"
                    <t:RadMenuItem Header="Show All Jobs" Checked="MenuItem_Checked_All" Name="mnuShowAllJobs" IsCheckable="True"/> 
                    <t:RadMenuItem Header="Show Unfinished" Checked="MenuItem_Checked_Unfinished" Name="mnuShowUnfinishedJobs" IsCheckable="True"/> 
                </t:RadMenuItem> 
            </t:RadMenu> 
        </t:RadToolBar> 

Look above the Filter MenuItem above the attached picture
Ivan
Telerik team
 answered on 11 Nov 2009
2 answers
71 views
I was wondering if there was a way to get all the selected items in the grid. Both main grid and Hierarchy Details? I am coming from an Xceed background where they have GlobalSelectedItems. How can I accomplish this with telerik's WPF DataGridView?
MiddleTommy
Top achievements
Rank 1
 answered on 11 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?