Telerik Forums
UI for WPF Forum
10 answers
136 views
Hi,

We cutover to the 2010 version (2010.1.309.35).

The combo box columns are not displaying as they were (in non edit mode the values are showing, not the display path value).

We are using collection view sources pointing to datatables as the source.

e.g:
 
...  
    <UserControl.Resources> 
        <CollectionViewSource x:Key="EmployeeSkillSource" Source="{Binding DataSet.Tables[Roster.EmployeeSkill]}"/>  
        <CollectionViewSource x:Key="Roster.Station" Source="{Binding DataSet.Tables[Roster.Station].DefaultView}"/>  
    </UserControl.Resources> 
 
...  
    <telerik:GridViewComboBoxColumn   
        Header="Station" 
        DataMemberBinding="{Binding StationID}" 
        UniqueName="Station" 
        ItemsSource="{Binding Source={StaticResource Roster.Station}}" 
        SelectedValueMemberPath="StationID" 
        DisplayMemberPath="StationName" 
        IsReadOnly="True" 
        /> 
 
 

I noticed the samples that came with the latest version does not have a single instance of GridViewComboBoxColumn in the code so I cannot verify any changes.

Can you please provide a demo project veerifying that this usecase is still supported.

Thanks,
Nic

Frank Bubenik
Top achievements
Rank 1
 answered on 14 Apr 2010
5 answers
270 views

Hi

I am using a PanelBar with HierarcicalDataTemplate, and would like to define different ItemTemplates, and use them based on some data bound to the control.

XAML:

<Border Margin="0">
<Border.Resources>
<DataTemplate x:Key="CheckItem">
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Margin="0 0 5 0" Click="Checkbox_Click" />
<TextBlock Name="txtCriteria" Text="{Binding Description}" HorizontalAlignment="Left" MouseDown="TextBlock_MouseDown" Cursor="{Binding LinkCursor}" />
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="TextItem">
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="{Binding Description}" HorizontalAlignment="Left" />
<TextBox Width="50" HorizontalAlignment="Right" />
</StackPanel>
</DataTemplate>
<HierarchicalDataTemplate x:Key="Category" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource CheckItem}">
<StackPanel Orientation="Horizontal" Margin="0">
<CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" IsThreeState="True" Margin="0 4 5 6" Click="CategoryCheckbox_Click" />
<TextBlock Text="{Binding Description}" Height="13" Margin="5 4 5 6" HorizontalAlignment="Left"/>
</StackPanel>
</HierarchicalDataTemplate>
</Border.Resources>
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="10">
<telerik:RadComboBox Name="rcbDefinition" Margin="0,0,0,0" Height="20"
HorizontalAlignment="Stretch" VerticalAlignment="Top"
SelectionChanged="rcbDefinition_SelectionChanged" FontSize="12" />
<telerik:RadPanelBar BorderThickness="1" BorderBrush="#FF6699CC" Name="rpbSearchCategories" Margin="0,80,0,0" Width="250" HorizontalAlignment="Left"
ExpandMode="Single" ItemTemplate="{StaticResource Category}" Expanded="rpbSearchCategories_Expanded" Background="White" />
</Grid>
</Border>

codebehind:
...

rcbDefinition.ItemsSource = SearchConfig.Items;
...

        private void rcbDefinition_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            SearchDefinition srchDef = (SearchDefinition)rcbDefinition.SelectedItem;
            if (srchDef.Items == null)
                srchDef.LoadItems();
            rpbSearchCategories.ItemsSource = srchDef.DisplayItems;
            txtSubHeader.Text = srchDef.Instructions;
            UpdateQuery();
        }

 

I defined two DataTemplates, one called CheckItem and one TextItem.
What I would like to accomplish is to define which one to use, based on a field on the SearchDefinition.DisplayItem class.

Taking a wild shot, I would write something like this:

<HierarchicalDataTemplate x:Key="Category" ItemsSource="{Binding Items}" ItemTemplate="{Binding CategoryType}">

But realizing this was too wild a shot.

The "CategoryType" field on the Categories in the list Items would then return either "CheckItem" or "TextItem", depending on whether the underlying items should have a checkbox or a textbox for input by the user.

I hope my question i clear enough for someone to give me a hint on how to do this!

Regards
Jonas

Rappen
Top achievements
Rank 1
 answered on 13 Apr 2010
1 answer
153 views
Hi.

I have an question about the focus of Cell.
Immediately after adding a new line, It does not work, although he would like to move the focus of Cell to the specified column of added line.
For example, item will be null in The following codes.

(at Button1_Click method)
radGridView.UnselectAll();
radGridView.SelectedItem = radGridView.Items[insertingRowIndex];
radGridView.CurrentItem = radGridView.Items[insertingRowIndex];

var m_ColumnIndex =1;
var item = (GridViewRow)radGridView.ItemContainerGenerator.ContainerFromIndex(insertRowIndex);
// item is null
item.Cells[m_ColumnIndex].Focus();
// NullReferenceException

Version:
Telerik RadControls for WPF 2010 Q1 309 Trial
Visual Studio:2010 RC

Please help me.

Regards,
athasian.
Nedyalko Nikolov
Telerik team
 answered on 13 Apr 2010
1 answer
66 views
Hi,
i want to use the new Q1 2010 RadMap for WPF in a winforms project. Is this possible?
Can you give me a little step-by-step tutorial, because in my project i get no map.

I have use the same code in a wpf project, and there everything is alright.

Regards
Benjamin
Andrey
Telerik team
 answered on 13 Apr 2010
2 answers
123 views
I have GridViewComboColumn in a GridView. How can I programatically set focus the combox in the current row and open it?
I have button on a form that addes a new row... so I want to set focus to the combobox so the user can begin entereing.... thanks again

<
telerikPresentation:GridViewComboBoxColumn DisplayMemberPath="prod_name" SelectedValueMemberPath="prod_name" DataMemberBinding="{Binding comm_name}" Header="Product" Width="175" />
Jon
Top achievements
Rank 1
 answered on 12 Apr 2010
3 answers
153 views
I created a TreeView by programmatically adding items.

I try to remove an item like this:

 

 

Dim item = treDataSources.GetItemByPath(entiyPath)

 

treDataSources.Items.Remove(item)

The item is found.
But not removed from the tree.
Items.Count does no decrease after the .Remove.

What am I doing wrong.

Tina Stancheva
Telerik team
 answered on 12 Apr 2010
19 answers
402 views
With the assemblies after 27-11-2009 I get the following errors under visual studio 2008:

Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

I can build and run the project without problems, but I can't load the xaml designer.

Any ideas?

Thomas

Valentin.Stoychev
Telerik team
 answered on 12 Apr 2010
3 answers
86 views
Hi
    I have 3 tilesviewitems and by expanding 1 tiles 2 move to small, that is fine but the small height adjust itself and cover the height as the height of RadTileView

How can we adjust the small tilesItems to a specific heights?
Valentin.Stoychev
Telerik team
 answered on 12 Apr 2010
5 answers
94 views
I am experimenting with the book control as a replacement for a "rival" book control. The items in this case is a collection of UserControls.

I tried using a simple ItemsControl in a scroll viewer, and all works fine - I have a setup page at the start which queries data that is displayed in subsequent pages and all works properly - in the standard ItemsControl, but not in RadBook. If I simply put an unbound CheckBox on the setup (or any other) page, I find that I can not even click it to change its state, though you do see the mouse-over visual effect.

Help!

James S

Kiril Stanoev
Telerik team
 answered on 12 Apr 2010
3 answers
205 views
As the title says, the item exists within the RadTreeViewItem.Items, yet it returns null, even when searching by index, see the following screen shot:


The RadTreeView is data bound using several HierarchyDataTemplates, I tried this with regular items like so:

        <telerik:RadTreeView> 
            <telerik:RadTreeViewItem x:Name="firstTelerikItem" Header="Item 1" IsExpanded="True"
                <telerik:RadTreeViewItem Header="Item 1.1" x:Name="containerTelerik1_1" /> 
                <telerik:RadTreeViewItem Header="Item 1.2" x:Name="containerTelerik1_2" /> 
                <telerik:RadTreeViewItem Header="Item 1.3" x:Name="containerTelerik1_3" /> 
            </telerik:RadTreeViewItem> 
            <telerik:RadTreeViewItem Header="Item 2" /> 
            <telerik:RadTreeViewItem Header="Item 3" /> 
        </telerik:RadTreeView> 

And in there it works fine, but not with the databound ones.

Lmk, thanks!
Valentin.Stoychev
Telerik team
 answered on 12 Apr 2010
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?