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

Re: Linq Master Detail grid: Insert on Detail level

  •  04-25-2008, 9:01 AM

    Re: Linq Master Detail grid: Insert on Detail level

    IBindingList implements IEnumerable; therefore, as long as you are returning an IBindingList and its AllowNew property returns true you should have no issues inserting items in details.

    Take a look at the Creating a Custom Detail Description example in the documentation. In the GetDetailsForParentItem, I return a new BindingList as such (using the GetNewBindingList method):

           object details = foundProperty.GetValue( parentItem, null );
           Type detailsType = details.GetType();
           MethodInfo getNewBindingList = detailsType.GetMethod(
    "GetNewBindingList" );

           
    return ( IEnumerable )getNewBindingList.Invoke( details, null );

    Even if it is cast as an IEnumerable, I am still able to insert new data items.

     


    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.