0

I have a datagrid populated with some data. It looks something like this----

Security RegisterDate CUSIP ISC Source Employee

INVESCO 12/3/2007 G4921P105 818216804 Disk Ram

INVESCO 11/1/2011 G4921P106 818216805 Disk Shyam

Here, in the third column named CUSIP i actually wanted a column of buttons where the CONTENT property of the button is to be bound with the CUSIP property. So, for eg, first row 3rd column should display a button with "G4921P105" written over it. I was wondering if this could be done. Also, this button when clicked is supposed to open another window.

I am attatching the XAML code for this view.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="auto"></RowDefinition>
        <RowDefinition Height="auto"></RowDefinition>
        <RowDefinition Height="*" ></RowDefinition>
    </Grid.RowDefinitions>
    <Label Grid.Row="0" FontWeight="ExtraBold" FontSize="25" Content="{Binding CompanyCUSIPChangeData[0].Security}"></Label>
    <Label Grid.Row="1" FontWeight="ExtraBold">Previous Registers</Label>
    <DataGrid Grid.Row="2" ItemsSource="{Binding Path=CompanyCUSIPChangeData}" HorizontalAlignment="Left" CanUserAddRows="False">            
        <DataGrid.ColumnHeaderStyle>
            <Style TargetType="{x:Type DataGridColumnHeader}">
                <Setter Property="FontWeight" Value="Bold" />                    
            </Style>                                                    
        </DataGrid.ColumnHeaderStyle>

    </DataGrid>
</Grid>

I did a lot of research but still could not find much to solve this problem of mine. Also, I am pretty new to WPF and XAML and this is my project using these technologies.

Any help would be really appreciated. Thanks.

discoverAnkit
  • 1,141
  • 1
  • 11
  • 25

0 Answers0