Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Re: Insertion Row on Details in Master Detail Grid

  •  04-30-2008, 9:10 AM

    Re: Insertion Row on Details in Master Detail Grid

    Hi Henry,

    The InsertionRow's DataContext is the System.Data.DataRow (assuming you are using DataTables, otherwise use whatever the type of your data item is). Therefore, you could handle the DetailConfiguration.InitializingInsertionRow event and get the data item there. Something like this:

    <xcdg:DataGridControl.DetailConfigurations>
      
    <xcdg:DetailConfiguration InitializingInsertionRow="OnInitializingInsertionRow"
                                            
    RelationName="Employee_Orders">
         
    <xcdg:DetailConfiguration.Headers>
            
    <DataTemplate>
               
    <xcdg:InsertionRow />
            
    </DataTemplate>
         
    </xcdg:DetailConfiguration.Headers>
      
    </xcdg:DetailConfiguration>
    </xcdg:DataGridControl.DetailConfigurations>

    private void OnInitializingInsertionRow( object sender, InitializingInsertionRowEventArgs e )
    {
       System.Data.
    DataRow row = e.InsertionRow.DataContext as System.Data.DataRow;
    }


    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
    Filed under:
View Complete Thread
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.