<Grid Height="115">
<telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding PatientMedications}">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Width="2*" HeaderText="Name" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Drug_.Name}" UniqueName="{x:Null}"/>
<telerik:GridViewDataColumn Width="3*" HeaderText="Dosage" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Dosage}" UniqueName="{x:Null}" />
<telerik:GridViewDataColumn Width="85" HeaderText="Started" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=StartTime}" UniqueName="{x:Null}" />
<telerik:GridViewDataColumn Width="85" HeaderText="Ended" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=EndTime}" UniqueName="{x:Null}" />
<telerik:GridViewDataColumn Width="*" HeaderText="Comments" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Comments}" UniqueName="{x:Null}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
Hello,
First of all, sorry for my english ...
My application looks like your example "firstlook".
I have a master table, one child table on a tabitem and a chart on the other tabitem.
I succeed to create a column-button for the master table :
<telerik:RadGridView.Columns >
<telerik:GridViewColumn IsVisible="True" Width="30">
<telerik:GridViewColumn.CellStyle>
<Style TargetType="{x:Type telerik:GridViewCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:GridViewCell}">
<Grid>
<Button Width="18" Height="18" Click="AjoutFiche_Click" >
<!-- Dessin de la croix -->
<Button.Content>
<Grid Width="8" Height="8" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path Fill="{x:Null}" Stretch="Fill" Stroke="#FF000000" Margin="0.083,0.664,0,0" Data="M0.50001547,0.5 L6.5000797,6.5000169 M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="2"/>
<Path Fill="#FFCE3527" Stretch="Fill" Stroke="#FFCD3527" Margin="0,0,0.083,0.664" Data="M0.50001547,0.5 L6.5000797,6.5000169 M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="2"/>
</Grid>
</Button.Content>
</Button>
<Rectangle Width="{TemplateBinding VerticalLineThickness}"
Fill="{TemplateBinding VerticalLineFill}" HorizontalAlignment="Right"
Visibility="{TemplateBinding VerticalLineVisibility}" SnapsToDevicePixels="True" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</telerik:GridViewColumn.CellStyle>
</telerik:GridViewColumn>
1)For the child table, I want the same thing :
a)Is it possible to create 2 columns-button (type button) ?
Each line of the child table has a column-button (type button) and a click on this button opens a window with the information of the line select
The purpose of the other column-button is to delete the line select.
b)Is it possible to create the columns in the XAML part and not in code behind ?
I hope that the description of my problem is clear
Thanks.
Steph