Question DataGrid Collapsible

alanguilas

New member
Joined
Oct 4, 2016
Messages
4
Programming Experience
Beginner
My Problem is that my professor wants to combine same name in 1 row and will collapse on click. but I dont have any Idea how to do it can you give me some headstart thanks! more power

this is my current view and my SP
HOW.PNGSP.PNG
 
Update! I have found this...

This what? You've provided a screenshot so we know what it looks like but that doesn't mean that we know what it is and thus it doesn't mean we know how you bind to it. Presumably you mean that it's a custom control but if we have no access to it or where to find it then how can we know how to use it?
 
This my XAML for the datagrid
C#:
        <DataGrid x:Name="workhistorygrid" CanUserResizeColumns="False" CanUserReorderColumns="False" Margin="10,20,10,100" BorderThickness="1" FontSize="15" FontWeight="Normal" IsSynchronizedWithCurrentItem="False" ColumnWidth="*" AutoGenerateColumns="False" RowHeight="NaN" EnableRowVirtualization="True" GridLinesVisibility="Horizontal" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" RowDetailsVisibilityMode="Visible"  VerticalAlignment="Top" SelectedItem="{Binding ChosenItem}" Grid.Row="1" SelectionChanged="workhistorygrid_SelectionChanged">


            <DataGrid.Columns>


                <DataGridTemplateColumn Width="40">
                    <DataGridTemplateColumn.Header>
                        <CheckBox x:Name="headerCheckBox" />
                    </DataGridTemplateColumn.Header >
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox Name="chkSelectAll" HorizontalAlignment="Center" IsChecked="{Binding IsChecked, ElementName=headerCheckBox, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>


                <DataGridTextColumn Header="Applicant Name" Binding="{Binding FullName}" Width="240"/>


                <DataGridTextColumn Header="Start Date" Binding="{Binding StartDate, StringFormat=\{0:MM/dd/yyyy\}}"/>
                <DataGridTextColumn Header="End Date" Binding="{Binding EndDate, StringFormat=\{0:MM/dd/yyyy\}}"/>
                <DataGridTextColumn Header="Company" Binding="{Binding Company}"/>
                <DataGridTextColumn Header="Position" Binding="{Binding Position}"/>
                <DataGridTextColumn Header="Current" Binding="{Binding [Current]}" Width="SizeToHeader"/>


                <DataGridTemplateColumn x:Name="edit" Width="50">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Hyperlink Click="Edit">
                                    <TextBlock Text="Edit" />
                                </Hyperlink>
                            </TextBlock>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                
                <DataGridTemplateColumn x:Name="delete" Width="50">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Hyperlink Click="Delete">
                                    <TextBlock Text="Delete" />
                                </Hyperlink>
                            </TextBlock>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                
            </DataGrid.Columns>
 
Last edited by a moderator:

Latest posts

Back
Top Bottom