This is a migrated thread and some comments may be shown as answers.

Child table with column button

2 Answers 52 Views
GridView
This is a migrated thread and some comments may be shown as answers.
invivo
Top achievements
Rank 1
invivo asked on 12 May 2009, 03:01 PM

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

 

 

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 14 May 2009, 07:34 AM
Hello Steph,

I've made small demo application to illustrate you how to define CellTemplate for desired grid column and how to declare columns in xaml.

Please check the attached project and let me know how it goes.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
invivo
Top achievements
Rank 1
answered on 15 May 2009, 04:40 PM

Hello Vladimir,

Thanks a lot for your answer.
It works for my application. Now, the button in the child table opens a new window.

Now the second step for me is to update the grid according the informations seizeds in the window.

Thank you again.

Best wishes.

Steph

Tags
GridView
Asked by
invivo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
invivo
Top achievements
Rank 1
Share this question
or