Telerik Forums
UI for WPF Forum
2 answers
262 views
Hi,

I'm trying to use the RadPanelBar control for a binding source which contains a list of lists. I mean I have an object containing a list of sections, and each section contains a list of commands.

I'm creating the control using this XAML:

<

 

 

telerikNavigation:RadPanelBar ItemsSource="{Binding Path=Sections}"

 

 

 

    ItemTemplate="{StaticResource SectionsTemplate}"/>

And I have the two following templates:

 

 

 

 

 

<

 

 

DataTemplate x:Key="CommandsTemplate">

 

 

 

 

 

 

 

 

    <StackPanel Orientation="Vertical" Margin="5">

 

 

 

 

 

 

 

 

        <TextBlock Margin="2,6">

 

 

 

 

 

 

 

 

            <Hyperlink Command="{Binding Path=Command}">

 

 

 

 

 

 

 

 

                <TextBlock Text="{Binding Path=DisplayName}" />

 

 

 

 

 

 

 

 

            </Hyperlink>

 

 

 

 

 

 

 

 

        </TextBlock>

 

 

 

 

 

 

 

 

    </StackPanel>

 

 

 

 

 

 

 

 

</DataTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

 


<
DataTemplate x:Key="SectionsTemplate">

 

 

 

 

 

 

 

 

    <telerikNavigation:RadPanelBarItem ItemsSource="{Binding Path=Commands}" ItemTemplate="{StaticResource CommandsTemplate}">

 

 

 

 

 

 

 

 

        <telerikNavigation:RadPanelBarItem.Header>

 

 

 

 

 

 

 

 

            <TextBlock Text="{Binding Path=SectionName}" />

 

 

 

 

 

 

 

 

        </telerikNavigation:RadPanelBarItem.Header>

 

 

 

 

 

 

 

 

    </telerikNavigation:RadPanelBarItem>

 

 

 

 

 

 

 

 

</DataTemplate>

The result is that there is like an other control in the sections bars, and I have to click on it (the arrow is not working) to see the list of commands, but instead of the commands being simple links, they appear as a RadPanelBar, with an arrow on the right which is doing nothing.

What am I doing wrong?

Best regards,
Daniel Varrin

 

Daniel Varrin
Top achievements
Rank 1
 answered on 19 Dec 2009
2 answers
195 views

I have placed the following in my radgrid:

            <telerikGrid:RadGridView.Columns>
                <telerikGrid:GridViewToggleRowDetailsColumn MouseUp="GridViewToggleRowDetailsColumn_MouseUp" />
            </telerikGrid:RadGridView.Columns>

When I click on the + sign to expand the row details, the GridViewToggleRowDetailsColumn_MouseUp event handler does not fire. Is there something I'm missing?
Jeffrey
Top achievements
Rank 1
 answered on 19 Dec 2009
1 answer
136 views

Hi team,

Below is the xaml code
I have tried to bind and update data using RowDetailsView
Except Datepicker, other controls are working fine
can you please check what's wrong in code....

    <Grid.Resources> 
            <Style TargetType="telerik1:ChildDataControlsPresenter"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="telerik1:ChildDataControlsPresenter"
                            <telerik:RadGridView x:Name="radGridView1" RowDetailsVisibilityMode="VisibleWhenSelected" Height="400" > 
                                <telerik:RadGridView.RowDetailsTemplate> 
                                    <DataTemplate> 
                                        <Grid Margin="31,22,24,419" Name="grid1"
                                            <Grid.RowDefinitions> 
                                                <RowDefinition Height="32"/> 
                                                <RowDefinition Height="56*"/> 
                                            </Grid.RowDefinitions> 
                                            <Grid.ColumnDefinitions> 
                                                <ColumnDefinition Width="95" /> 
                                                <ColumnDefinition Width="201" /> 
                                                <ColumnDefinition Width="75" /> 
                                                <ColumnDefinition Width="352" /> 
                                            </Grid.ColumnDefinitions> 
                                            <Label Name="lblStartDate" Foreground="White" Content="Start Date :" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="79" /> 
                                            <Label Name="lblStatus" Foreground="White"  Content="Status :" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="60" /> 
                                            <TextBox Name="txtStatus" Grid.Column="3" Grid.Row="0" Height="25" BorderThickness="2" Text="{Binding status }" /> 
                                            <telerik1:RadDatePicker Height="24" Name="txtStartDate" Width="138" SelectionChanged="txtStartDate_SelectionChanged" Grid.Column="1" SelectedDate="{Binding createdDate}" Grid.Row="0" /> 
 
                                            <Label Name="lblDueDate" Content="Due Date :" Foreground="White"  Grid.Row="1" Margin="6,6,19,21" /> 
                                            <telerik1:RadDatePicker Height="24" Name="txtDueDate" DisplayMode="MonthView"  Width="138" Grid.Column="1" Grid.Row="1" SelectedDate="{Binding dueDate}" Margin="10,5,10,20" /> 
                                            <Label Name="lblPriority" Content="Priority :" Foreground="White" Grid.Row="1" Grid.Column="2" Margin="1,2,14,24" /> 
                                            <TextBox Name="txtPriority" Grid.Column="3" Height="25" Grid.Row="1" Width="100" Text="{Binding priority}" HorizontalAlignment"Left" BorderThickness="2" Margin="5,4,0,22" /> 
                                            <Label Name="lblComplete" Content="% Complete :"  Foreground="White" Grid.Row="1" Grid.Column="3" Margin="125,4,0,20" HorizontalAlignment="Left" Width="78" /> 
                                            <TextBox Name="txtCompletedPercentage" Width="70" Height="25" Grid.Column="3" Grid.Row="1" Margin="200,4,0,20" Text="{Binding percentageCompleted}" HorizontalAlignment="Left"/> 
                                        </Grid> 
                                    </DataTemplate> 
                                </telerik:RadGridView.RowDetailsTemplate> 
                            </telerik:RadGridView> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </Grid.Resources> 
        <telerik:RadGridView x:Name="radGridView1" RowDetailsVisibilityMode="VisibleWhenSelected" Height="435" Margin="3,76,12,12" Width="990" /> 
        

Kaloyan
Telerik team
 answered on 19 Dec 2009
3 answers
116 views
Would it be possible to have the TimePicker work where when you pick Hour then Minutes?

For example, you click the drop down and you see a list of hours, you click an hour, then you are presented with a list of minutes.  Whiile adding an extra click, I think this would make it easier for users and developers by allowing the user to select and EXACT time versus just showing them a list based on a time interval.
Kaloyan
Telerik team
 answered on 19 Dec 2009
10 answers
180 views
When you have EditTriggers="CellClick, Default, F2" on a RadGridView the SelectedItem does not change when you click to edit another row unless you click on a read only row
See the attached picture to see what I mean
Milan
Telerik team
 answered on 18 Dec 2009
6 answers
404 views

Hi team,

Can u pls suggest me some sample to programatically create nested gridview with relations

var qry1 = (from p in obaData.tblProjects 
                        select p); 
            this.DemoGridView.ItemsSource = qry1.ToList(); 
 
            tblProject project = new tblProject(); 
            GridViewTableDefinition d = new GridViewTableDefinition(); 
            var qry2 = (from r in obaData.tblTasks 
                        select r); 
            d.Relation = new Telerik.Windows.Data.PropertyRelation("projectId"); 
            d.DataSource = qry2.ToList(); 
            d.IsReadOnly = true
            this.DemoGridView.ChildTableDefinitions.Add(d); 

Or tell me whats wrong with the above code,
using this code, child table records are not avaiable
shadhan
Top achievements
Rank 1
 answered on 18 Dec 2009
2 answers
380 views
I want to have a column wich contains values 1 - n and 'N/A'. I can use a nullable int and TargetNullValue.

DataMemberBinding="{Binding Difference, TargetNullValue=N/A}" 
but then i cant filter by writing 'N/A' i must write 'null' wich is not acceptable. Also the null value (N/A) is not listed in the select filter dialog.

I could also instead of a nullable int use a string, but then the sorting is done in ascii order and not natural order, so if i sort i will get a list with 1, 10, 127, 2 and so on. I would suggest that strings should be sorted in the natural order by default with a option to sort by ascii order. If i do a custom sort the filter dialog is not sorted the same way wich makes it look wierd.

so my question is, how can i make the column and the filter dialog sort the way i want?
Robert
Top achievements
Rank 1
 answered on 18 Dec 2009
3 answers
143 views
I built a simple app with only a grid with four columns (Id, Name, Gender and Active). After I got my app running I clicked on the Id column and the checkbox of the active column, wich is the GridViewSelectColumn, got selected too. Is this a bug or something? Can anyone provide an application that´s working so I can see what the problem is?

WPF version : I´m using the latest trial version of RadControls for WPF
OS: Win 7 Ultimate
Preferred programming language: C#

Thanks in advance.
Milan
Telerik team
 answered on 18 Dec 2009
1 answer
82 views
Due to some errors I was having in Q2, I thought I would upgrade to Q3. Now my Grid's hierarchy doesn't work anymore. I installed the update, removed my references from my project, then added the new ones. The plus signs load but they don't actually expand when clicked.

I looked at the examples and made one change to reflect the example but still no luck.

<Window x:Class="WTSCGCAppInterface.Header" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:TelerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
    Title="Header" Height="600" Width="800" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    <Grid> 
        <telerik:RadWrapPanel Height="60" Name="radPnlFilter" VerticalAlignment="Top"
            <Label Grid.Row="0" Grid.Column="0">Cust#:</Label> 
            <TextBox x:Name="txtCustNum" Width="50" Grid.Row="0" Grid.Column="0"></TextBox> 
            <Label Grid.Row="0" Grid.Column="0">Week Ending#:</Label> 
            <TelerikInput:RadMaskedTextBox x:Name="txtWeekEnding" Mask="##/##/####" Grid.Row="0" Grid.Column="0"></TelerikInput:RadMaskedTextBox> 
            <Label Grid.Row="0" Grid.Column="0">Job#:</Label> 
            <TextBox x:Name="txtJobNum" Width="50" Grid.Row="0" Grid.Column="0"></TextBox> 
            <Label Grid.Row="0" Grid.Column="0">Sub Job#:</Label> 
            <TextBox x:Name="txtSubJobNum" Width="50" Grid.Row="0" Grid.Column="0"></TextBox> 
            <Button x:Name="btnFilter" Click="btnFilter_Click">Apply Filter</Button> 
        </telerik:RadWrapPanel>        
        <telerik:RadGridView Margin="0,58,0,0" Name="radGrdVwHeader" AutoGenerateColumns="False" ColumnsWidthMode="Fill" RowLoaded="radGrdVwHeader_RowLoaded"
            <telerik:RadGridView.Columns>    
                <telerik:GridViewDataColumn Header="HSTAT" UniqueName="HSTAT" IsVisible="False" /> 
                <telerik:GridViewDataColumn Header="HCONO" UniqueName="HCONO" IsVisible="False" /> 
                <telerik:GridViewDataColumn Header="HDVNO" UniqueName="HDVNO" IsVisible="False" /> 
                <telerik:GridViewDataColumn Header="HSEQ" UniqueName="HSEQ" IsVisible="False" /> 
                <telerik:GridViewDataColumn Header="HCUST" UniqueName="HCUST" IsVisible="False" /> 
                <telerik:GridViewDataColumn Header="Job #" UniqueName="HJBNO" /> 
                <telerik:GridViewDataColumn Header="Sub Job #" UniqueName="HSJNO" /> 
                <telerik:GridViewDataColumn Header="Week Ending" UniqueName="HDTTK" /> 
                <telerik:GridViewDataColumn Header="HDSCD" UniqueName="HDSCD" IsVisible="False" /> 
                <telerik:GridViewDataColumn Header="Ticket#" UniqueName="HNUM0" /> 
                <telerik:GridViewDataColumn Header="Crew#" UniqueName="HDES0" /> 
                <telerik:GridViewDataColumn Header="District" UniqueName="HDES1" /> 
                <telerik:GridViewDataColumn Header="FMC#" UniqueName="HDES2" /> 
                <telerik:GridViewDataColumn Header="Division" UniqueName="HDES3" /> 
                <telerik:GridViewDataColumn Header="Local#" UniqueName="HDES4" /> 
                <telerik:GridViewDataColumn Header="Crew Type" UniqueName="HDES5" /> 
                <telerik:GridViewDataColumn Header="Zone" UniqueName="HDES6" />                                                                                                               
            </telerik:RadGridView.Columns> 
            <telerik:RadGridView.ChildTableDefinitions> 
                <telerik:GridViewTableDefinition/> 
            </telerik:RadGridView.ChildTableDefinitions> 
            <telerik:RadGridView.HierarchyChildTemplate> 
                <DataTemplate> 
                    <telerik:RadGridView x:Name="ProdData" AutoGenerateColumns="False"
                        <telerik:RadGridView.Columns> 
                            <telerik:GridViewDataColumn Header="PCWNO" UniqueName="PCWNO" /> 
                        </telerik:RadGridView.Columns> 
                    </telerik:RadGridView> 
                </DataTemplate> 
            </telerik:RadGridView.HierarchyChildTemplate> 
        </telerik:RadGridView>                
    </Grid> 
</Window> 
 

private void btnFilter_Click(object sender, RoutedEventArgs e) 
        { 
            string sWeekEnding = txtWeekEnding.MaskedText; 
            string sAlteredFormat = sWeekEnding.Substring(6, 4) + sWeekEnding.Substring(0, 2) + sWeekEnding.Substring(3, 2); 
             
            radGrdVwHeader.ItemsSource = _headerRecs.GetHeaderRecs(1, 0, Convert.ToDecimal(txtCustNum.Text), Convert.ToDecimal(sAlteredFormat), txtJobNum.Text, txtSubJobNum.Text, nullnull"");             
 
            radGrdVwHeader.ChildTableDefinitions.Clear(); 
            GridViewTableDefinition proddataDefinition = new GridViewTableDefinition(); 
            proddataDefinition.Relation = new PropertyRelation("ProddataRecs"); 
            //this.radGrdVwHeader.TableDefinition.ChildTableDefinitions.Add(proddataDefinition); 
            this.radGrdVwHeader.ChildTableDefinitions.Add(proddataDefinition); 
                      
        } 






Vlad
Telerik team
 answered on 18 Dec 2009
4 answers
248 views
Is it possible to display the grid contents in column-row format instead of row-column format without programmatically loading the data in column-row format? What I am looking for is a setting (property) in the grid that I can change that will switch the rows and columns around. 
Jorge Gonzalez
Top achievements
Rank 1
 answered on 18 Dec 2009
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?