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

Caliburn Micro, RadGridView and Button in a template

0 Answers 165 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 22 Nov 2011, 02:49 PM

Hello,

I've developed a RadGridView as follow :

 <telerik:RadGridView Grid.Row="1" ItemsSource="{Binding SecuritiesNoteResult}" AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
             <!-- some other grid-->
                <telerik:GridViewDataColumn UniqueName="FileOpen" Header="Visualizza" x:name="test">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Button HorizontalContentAlignment="Center" Click="Button_Click" >
                                <Button.Content>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/DOME;component/Media/pdfDocument.png" Height="20" Width="20" />

                                    </StackPanel>
                                </Button.Content>
                            </Button>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>       
        </telerik:RadGridView>

and in the viewmodel I've :

        public void test()
        {
            _windowManager.ShowWindow(new ReportViewModel(_repository));
        }

The event is not fired... I've tried both to put x:name on the Button and in the GridViewDataColumn...
What am I doing wrong?

Thanks

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Michele
Top achievements
Rank 2
Share this question
or