Telerik Forums
UI for WPF Forum
5 answers
177 views
Hello,

I'm not sure how to go about this. I'd like my child Grids to group together, by that i mean I would like it when one is gouped by a specified value i'd like each GridView bound to that DataTemplate to group as well. I'm just not sure where to get started.

below is an example of my RadGridView.

<telerik:RadGridView x:Name="rgv" AutoGenerateColumns="False" RccControls:GridViewHeaderContextMenu.IsEnabled="True" >
                        <telerik:RadGridView.ChildTableDefinitions>
                            <telerik:GridViewTableDefinition />
                        </telerik:RadGridView.ChildTableDefinitions>
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Header="Value 1" DataMemberBinding="{Binding Path=Value1}" />
                            <telerik:GridViewDataColumn Header="Value 2" DataMemberBinding="{Binding Path=Value2}" />
                        </telerik:RadGridView.Columns>
                        <telerik:RadGridView.HierarchyChildTemplate>
                            <DataTemplate>
                                <telerik:RadGridView
                                    CanUserFreezeColumns="False"
                                    AutoGenerateColumns="False"
                                    ItemsSource="{Binding ChildItems}"
                                    IsReadOnly="True"
                                    RccControls:GridViewHeaderContextMenu.IsEnabled="True"
                                    Grouped="RadGridView_Grouped">
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ChildValue1}" Header="Child Value 1" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ChildValue2}" Header="Child Value 2" />
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>
                            </DataTemplate>
                        </telerik:RadGridView.HierarchyChildTemplate>
                    </telerik:RadGridView>

Any suggestions or a starting point would be great.

Thanks Again,
~Boots
Yavor Georgiev
Telerik team
 answered on 03 Sep 2010
4 answers
669 views
Hi guys,

I'm using the MVVM pattern and I've got my RadGridView bound to a BindingList of business objects, within the business objects there are various strings and a binding list of decimals. Below is a stripped down version of the set up I have:

public class ARow
{
string column1;
string column2;
BindingList<decimal> values;
}

BindingList<ARow> allRows;

XAML:
<telerik:RadGridView ItemsSource = "{Binding allRows, Mode=TwoWay}">

The columns are manually added and have two way binding set up in the code behind.

I would like to implement two way data binding whereby changes to values in the BindingList<decimal> values will be reflected in the grid itself. I am able to successfully change the underlying data source however this is not reflected in the grid itself.

I have also tried, instead of using "decimal" using a custom class "ValueObject" I created which contains a decimal property as follows, but to no avail. The code is as follows:

public class ValueObject : INotifyPropertyChanged
{
    _private decimal _value;
    public decimal Value
    { 
        get { return _value; } set { _value = value; OnPropertyChanged("Value"); }
    }
}

Any help would be great!

Cheers,

Tim.
Vlad
Telerik team
 answered on 03 Sep 2010
1 answer
887 views
2010 Q2 SP1
I have the following XAML which formats the value of a number to a %. So .25 will display 25%. However when the value is 0 it just shows % with no numbers. I want it to display 0%. How do I format it so that I will get my desired result?

<telerik:GridViewDataColumn Width="70" IsReadOnly="True" Header="Fit Plus" DataMemberBinding="{Binding FitPercentage}" DataFormatString="{}{0:#%}">

Thanks,

Billy Jacobs
Maya
Telerik team
 answered on 03 Sep 2010
4 answers
187 views
Hello,
May I ask for example how to create custom template for RadWindow.
I wont to create window with standard buttons and icons.  I know how to do this using normal Window Class, but RadWindow is already templated. I saw template structure for RadWindow, but I need also working example.
George
Telerik team
 answered on 03 Sep 2010
2 answers
234 views
Hi,
I'm trying to change the color for the header.
I can change the GridViewHeaderCell background but the GridViewHeaderRow remains the same (OfficeBlack Theme).
Can you tell me what's wrong.

Thanks

   Maximilien

 

 

 

<Window.Resources>

 

 

 

 

<LinearGradientBrush x:Key="GridViewHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

 

<GradientStop Color="Blue" Offset="0"/>

 

 

 

 

<GradientStop Color="Red" Offset="1"/>

 

 

 

 

<GradientStop Color="Green" Offset="0.4"/>

 

 

 

 

<GradientStop Color="Yellow" Offset="0.4"/>

 

 

 

 

</LinearGradientBrush>

 

 

 

 

<Style x:Name="GridViewHeaderCellStyle" TargetType="telerik:GridViewHeaderCell" >

 

 

 

 

<Setter Property="Background" Value="{StaticResource GridViewHeaderBackground}" />

 

 

 

 

<Setter Property="BorderBrush" Value="#FFF40505"/>

 

 

 

 

</Style>

 

 

 

 

<ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="telerik:GridViewHeaderRow">

 

 

 

 

<Border x:Name="PART_GridViewHeaderRowBorder" SnapsToDevicePixels="True" Background="{StaticResource GridViewHeaderBackground}">

 

 

 

 

<Grid>

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition Width="Auto" />

 

 

 

 

<ColumnDefinition Width="Auto" />

 

 

 

 

<ColumnDefinition Width="Auto" />

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<Border BorderBrush="#FFEEEEEE" Grid.ColumnSpan="3" BorderThickness="0,0,0,1" SnapsToDevicePixels="True" Background="{StaticResource GridViewHeaderBackground}" />

 

 

 

 

<telerik:IndicatorPresenter x:Name="PART_IndicatorPresenter" Grid.Column="0" />

 

 

 

 

<telerik:IndentPresenter x:Name="PART_IndentPresenter" Grid.Column="1" />

 

 

 

 

<telerik:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="2" />

 

 

 

 

</Grid>

 

 

 

 

</Border>

 

 

 

 

</ControlTemplate>

 

 

 

 


<
Style x:Name="GridViewHeaderRowStyle" TargetType="telerik:GridViewHeaderRow">

 

 

 

 

<Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}" />

 

 

 

 

<Setter Property="Background" Value="{StaticResource GridViewHeaderBackground}" />

 

 

 

 

<Setter Property="BorderBrush" Value="#FFF40505"/>

 

 

 

 

</Style>

 

 

 

 

 

</Window.Resources>

 

 

 

 



<
Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

 

 

 

 

<telerikGrid:RadGridView x:Name="radGridView" >

 

 

 

 

<telerikGrid:RadGridView.Columns>

 

 

 

 

<telerikGrid:GridViewDataColumn Header="Film" >

 

 

 

 

<telerikGrid:GridViewDataColumn.CellTemplate >

 

 

 

 

<DataTemplate>

 

 

 

 

<TextBlock FontWeight="Bold" FontSize="18" Text="{Binding FilmNumber}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn>

 

 

 

 

<telerikGrid:GridViewDataColumn Header="Regiment" >

 

 

 

 

<telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<TextBlock FontWeight="Bold" FontSize="18" Text="{Binding RegimentNumber}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn>

 

 

 

 

<telerikGrid:GridViewDataColumn Header="Date" >

 

 

 

 

<telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<TextBlock FontWeight="Bold" FontSize="18" Text="{Binding InfractionDate, StringFormat=d}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn>

 

 

 

 

</telerikGrid:RadGridView.Columns>

 

 

 

 

</telerikGrid:RadGridView>

 

 

 

 

 

</Grid>

 

Madovi
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
83 views
I am working on a project currently where I need to be able to bind a combobox column to a list of classes, and I am unable to get the data to display. I had this working in Winforms but for the life of me, I can't get it to work in WPF.

Here is what I have so far.

List<OrganizationNameType> orgTypeList = new List<OrganizationNameType>();
            orgTypeList = hub.OrganizationNameType.ToList();
 
            Telerik.Windows.Controls.GridViewComboBoxColumn gvc = new Telerik.Windows.Controls.GridViewComboBoxColumn();
            gvc.Header = "New Data Types";
            gvc.ItemsSource = orgTypeList;
            gvc.DisplayMemberPath = "TypeName";
            gvc.SelectedValueMemberPath = "TypeName";

In the class OrganizationNameType I am trying to recover the variable "TypeName" of each OrganizationNameType and have it displayed as a column in my RadGrid.

Any ideas/help would be much appreciated.

Thanks!
Erik Van Norstrand

Erik Van Norstrand
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
131 views
Hi,

a) how can i disable resizing of floating window?
b) Docking to only selected position like top. Don't want left, right, bottom position for floating panel.

Thanks,
Pravesh
Konstantina
Telerik team
 answered on 02 Sep 2010
2 answers
114 views
Hi Telerik Team,

I'm using a WPF form with telerik rad controls which is displayed in Outlook's custom Folder.
The form and control works fine on the machines with Windows XP, Outlook 2007 and .NET 3.5 SP1.
But the same form makes outlook to hang and crash when the RadComboBox is clicked to drop down, in some machines where Windows 7, Outlook 2007 and .NET 3.5 SP1 are installed. At first we thought that this might be the issue with .NET Framework in Win 7 (which is the beta version) so we updated the framework to 3.5 SP1 (3.5.30729) by installing SQL Express 2008 (Since Windows 7 does not allows direct updat of .NET Framework 3.5). But after that also, the WPF form crashes outlook. The combo box control is operative using keyboard but when we drop down using mouse then the application hangs. I then created a sample WPF standalone application with various rad combo controls and similar controls with drop down actions such as calendar, date picker etc. Every thing works fine in the stand alone applications. The only difference between the form used in Outlook and Stand alone application is, the combo box is bound to static data source in stand alone where as it is dynamic in Outlook Forms.

I'm very confused about the issue, whether the error is caused by OS or Outlook 2007 or .Net Framework.
OS : Win 7 Enterprise x64 Bit version.

Can you please suggest me on this ?

thanks in advance,
Yenkay
Robert
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
102 views

Hi!

I'm very interested to know how to do to make tab be styled like VS2005 or VS2008 as you show figured in help in ms-help://telerik.windows.controls/telerik.windows.controls.tabcontrol/radtabcontrol-getting-started.html.

I'll appreciate any sample

thanks

Dimitrina
Telerik team
 answered on 02 Sep 2010
5 answers
115 views
Hi,
I am searching a possibility to synchronize an external Texbox (in a 2-way manner, entries in the Textbox should appear in a selected cell and vice-versa) with a gridcell selected by an user.

Thank you,
Juergen.
juergen
Top achievements
Rank 1
 answered on 02 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?