Telerik Forums
UI for WPF Forum
2 answers
275 views
I am trying to bind a collection of workspaces to the RadTabControl and use a DataTemplateSelector to choose the DataTemplate for the content based on which type of workspace is being rendered but the RadTabItem does not appear to use the DataTemplateSelector that I set. Here is an example of my code:

        <telerik:RadTabControl ItemsSource="{Binding Workspaces}"
            <telerik:RadTabControl.Resources> 
                <Style TargetType="{x:Type telerik:RadTabItem}"
                    <Setter Property="ContentTemplateSelector"
                        <Setter.Value> 
                            <local:TabItemContentTemplateSelector /> 
                        </Setter.Value> 
                    </Setter> 
                </Style> 
            </telerik:RadTabControl.Resources> 
        </telerik:RadTabControl> 

I put a breakpoint in the SelectTemplate method but it never reaches it.

Has anyone got this to work?
Miroslav
Telerik team
 answered on 29 Aug 2009
4 answers
234 views
Hello

I am using the wpf tab control and want the tabs to be on the left hand side with my content on the right hand side.  I was looking into the documentation at (http://www.telerik.com/help/wpf/radtabcontrol-appearance.html) and saw that you can set the property "TabStripPlacement" to left.  When I do this, the tab goes across the screen with my content below the tab.

I also look at the following page for silverlight (http://demos.telerik.com/Silverlight/#TabControl/TabStripOrientation) and your getting the same effect by setting the same property.

Example of what I want:
[tab1]   content display for selected tab
[tab2]
[tab3]
...

Here is what I am getting:
[tab1]
[tab2]
[tab3]
Content below tabs

Where am I going wrong?

Thanks
Miroslav
Telerik team
 answered on 28 Aug 2009
2 answers
202 views
I just started using Telerik Grid instead of MS based Grid.
I just tried to Add and clear columns dynamically into the grid but I couldn't find the appropirate functions in intellisense.
I tried "this.radResult.Columns.Add(dyncol)" but, I Couldn't find "Add" in intellisense, couldn't find "Clear" method in intellisense as either.

<UserControl    x:Class="SolutionQ.Eclipse.Silverlight.Content.Search.xxxx.xxxx.xxxxxxxx" 
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
                xmlns:dg="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
                xmlns:RadNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
                xmlns:controls="clr-namespace:SolutionQ.Eclipse.Silverlight.Content.Controls"            
                xmlns:RadGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
                xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"   
> 
    <Grid x:Name="LayoutRoot" Background="White">  
        <Grid.RowDefinitions> 
            <!--xmlns:Ra=""--> 
            <RowDefinition Height="Auto" /> 
            <RowDefinition Height="1*" /> 
        </Grid.RowDefinitions> 
 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="1*" /> 
        </Grid.ColumnDefinitions> 
 
        <!-- Filtering ToolBar --> 
        <RadNav:RadToolBarTray Grid.Row="0" Grid.Column="0" Style="{StaticResource style_DataGridRadToolBarTray}">  
            <RadNav:RadToolBar x:Name="rtb_Filter" Style="{StaticResource style_RadToolBar}">  
                <!-- New Clause Button --> 
                <Button x:Name="btn_ExportToExcel" Tag="btn_ExportToExcel" Click="btn_Menu_Click" ToolTipService.ToolTip="Export to Excel Format">  
                    <controls:IconAndLabelControl Icon="Icons/PlaceHolderIcon.xaml" Label="Export To Excel" /> 
                </Button> 
                <Button x:Name="btn_ViewResults" Tag="btn_ViewResults" Click="btn_Menu_Click" ToolTipService.ToolTip="View Results">  
                    <controls:IconAndLabelControl Icon="Icons/PlaceHolderIcon.xaml" Label="View Results" /> 
                </Button> 
            </RadNav:RadToolBar> 
        </RadNav:RadToolBarTray> 
          
        <!--<dg:DataGrid x:Name="Result" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" ItemsSource="{Binding Path=Items, Mode=TwoWay}" Style="{StaticResource style_GenericDataGrid}" CellStyle="{StaticResource style_GenericDataGridCell}" ColumnHeaderStyle="{StaticResource style_GenericDataGridColumnHeader_LeftAligned}" RowHeaderStyle="{StaticResource style_GenericDataGridRowHeader}" RowStyle="{StaticResource style_GenericDataGridRow}">  
        </dg:DataGrid>--> 
        <RadGrid:RadGridView x:Name="radResult" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" > 
        <!--ItemsSource="{Binding Path=Items, Mode=TwoWay}"--> 
        </RadGrid:RadGridView> 
    </Grid> 
 
</UserControl> 
 

 

 

 

 

 

At code behind side I am using following namespaces:

 

 

 

 

 

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Net;  
using System.Windows;  
using System.Windows.Controls;  
using System.Windows.Documents;  
using System.Windows.Input;  
using System.Windows.Media;  
using System.Windows.Media.Animation;  
using System.Windows.Shapes;  
 
// Telerik using     
using Telerik.Windows;  
using Telerik.Windows.Data;  
using Telerik.Windows.Controls;  
using Telerik.Windows.Controls.GridView;  
using Telerik.Windows.Controls.GridView.Cells;  
 
// add using     
using System.Collections.ObjectModel;  
using System.Windows.Browser;  
using System.ComponentModel;  
using System.Collections;  
using System.Windows.Controls.Primitives;   

 

 

 

 

void tabPreview_Loaded(object sender, RoutedEventArgs e)   
{  
    BuildColumns();   
}   
 
private void BuildColumns()   
{  
   this.radResult.Columns.Clear(); //<-- This method doesnt show in intellisense, neither Add method will show up here   
}  
 

Am I doing anything wrong here?

 

om
Top achievements
Rank 1
 answered on 28 Aug 2009
2 answers
130 views
Hello telerik,

I have tried to implement pagination using RadGridview, i have downloaded the latest WPF Q2 SP1 samples.. and looked into the example in GridView -> Performance - > Server page, sort etc...

When i tried to group the columns by dragging the column header on to the header droppable zone, items have been grouped.
but when i tried to  change the current page to some other page by clicking any number on the Pagination control and after that when i tried to group the columns, it is throwing exception...

Is this a bug?

Reproduce steps:
1) Launched the C# Samples from Start -> Programs -> Telerik
2) Select Grid View control -> Performance -> Server page, sort etc...Now able to see the radgrid view with pagination on the right panel
3) Click on second page ("2") on the pagination control
4) Drag any column header to group, I have dragged "Company Name" column.. Now error is thrown...

When i tried to debug i fournd the following as the inner exception:
"Unable to cast object of type 'Telerik.Windows.Examples.Customer' to type 'Telerik.Windows.Data.IGroup'."

Thanks,
Kranthi
Rossen Hristov
Telerik team
 answered on 28 Aug 2009
1 answer
102 views
the predefined themes for q2 is broken.  We installed Q2 and themes no longer display for the grid.  We uninstalled Q2 and went back to Q1 and themes display fine.  Have not tried the work around for winforms of setting the theme from code in the initialize event.  Will let you know.
Missing User
 answered on 28 Aug 2009
1 answer
102 views
I want to use the RadDatePicker and RadTimePicker together but bound to one datetime object. Do you have an example of how to do this?

Thanks,

Billy Jacobs
Kaloyan
Telerik team
 answered on 28 Aug 2009
1 answer
124 views
Hello Telerik,

I am using RadPanelBar in one of my application, Now i need to expand one of the panelbaritems from one of my function in the code-behind.

for example i need to expand the third item in panel bar when i click on a button.

Consider I am binding a list of "Car" objects to a panelbar, now when i am looping through the items of panelbar i am getting each car item.. 

In this case how to i expand the "n-th" item of panelbar..
expecting a solution asap...

thanks,
- Kranthi
Kiril Stanoev
Telerik team
 answered on 27 Aug 2009
1 answer
91 views
Hello
I want to filter my child grid
when I watch the DateView dv it is filtered
but in the child grid I still see all the rows and not only the filtered rows
this is my code

 private void OnChildGridLoaded(object sender, RoutedEventArgs e)  
        {  
            // Pull data from the detail table based on the relation.  
            var dataRowView = (DataRowView)((RadGridView)sender).ParentRow.DataContext;  
            var ds = dataRowView.DataView.Table.DataSet;  
            var childData = dataRowView.CreateChildView(ds.Relations["BudgetRelation"]);  
            if (((ComboBoxValues.ComboValues)cmbActivityType.SelectedValue).Id != 0)  
            {  
                dv = new DataView(childData.ToTable(), "ActivityTypeID=" + ((ComboBoxValues.ComboValues)cmbActivityType.SelectedValue).Id, "", DataViewRowState.CurrentRows);  
                ((RadGridView)sender).DataContext = dv;  
            }  
            else   
                ((RadGridView)sender).DataContext = childData;  
 
            ((GridViewComboBoxColumn)((RadGridView)sender).Columns["ActivityTypeName"]).ItemsSource = ComboBoxValues.GetComboValues(dtActivityType);  
        } 

Thanks

By the way, I'm still waiting for an answer about second child hierarchy.
Rossen Hristov
Telerik team
 answered on 27 Aug 2009
2 answers
480 views
Is there a way to iterate through the records in a bound grid and highlight (set background color?) for a particular row?

Is there any solution to do this? 
Brandmuscle
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
140 views
Hi everyone,

If found something strange about the way setDate behaves when passing a date object in parameter.

I use the fonction like this:
var date = new Date();
alert(date); // Tue Aug 25 2009 16:58:26 CTU+0800
$('#datepicker).datepicker('setDate', date);
alert(date); // Tue Aug 25 2009 16:58:57 CTU+0800

Why does the setDate function modifies the date object? Is this normal?
How to modifiy format of the date ,eg 'yy-MM-dd'?
I didn't find anything about this subject on the website.

Thanks a lot
Veli
Telerik team
 answered on 27 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?