Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Different context menu for Hierarchical Grids
posted

Hi,

 I want to add two different context menus for a single grid (for hierarchical data). I have two different layouts in xamdatagrid. For each layout I want to have a context menu. My xaml code is as below:

   <DataPresenter:XamDataGrid x:Name="grdMilestone"  DataSource="{Binding Source={StaticResource odpObjectDataProvider1}}"

                                   Margin="293.675,84.287,-116.079,0" VerticalAlignment="Top"

                                   ContextMenu="{StaticResource ctxMilestoneMenu}" >

 

 

            <DataPresenter:XamDataGrid.FieldLayouts>

                <DataPresenter:FieldLayout Key="master">

                    <DataPresenter:FieldLayout.Fields>

 

                        <DataPresenter:Field Name="Milestone" Label="Milestone"  >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings CellMinWidth="210" AllowEdit="False"/>

                            </DataPresenter:Field.Settings>

                       </DataPresenter:Field>

                        <DataPresenter:Field Name="DueDate" Label="Due Date"  >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings CellMinWidth="60" AllowEdit="False" />

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="Status" Label="Status">

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings CellMinWidth="100" AllowEdit="False"/>

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="Deliverables" Label="Deliverables">

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings CellMinWidth="160" AllowEdit="False" />

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                    </DataPresenter:FieldLayout.Fields>

 

                </DataPresenter:FieldLayout>

 

 

                <DataPresenter:FieldLayout Key="detail">

                    <DataPresenter:FieldLayout.Fields>

                        <DataPresenter:Field Name="Task" Label="Task" >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings AllowEdit="False"/>

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="DueDate" Label="Due Date" >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings AllowEdit="False"/>

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="CustomerInvolved" Label="Customer Involved" >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings AllowEdit="False"/>

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="Email" Label="E-mail Reference" >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings AllowEdit="False"/>

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="OwnerStatus" Label="Owner Status" >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings AllowEdit="False" />

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                        <DataPresenter:Field Name="IsPrivate" Label="Is Private" >

                            <DataPresenter:Field.Settings>

                                <DataPresenter:FieldSettings  AllowEdit="False" />

                            </DataPresenter:Field.Settings>

                        </DataPresenter:Field>

                    </DataPresenter:FieldLayout.Fields>

                </DataPresenter:FieldLayout>

            </DataPresenter:XamDataGrid.FieldLayouts>

           

        </DataPresenter:XamDataGrid>

 

 

Parents Reply Children
No Data