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
380
Another Hierachical Data and Field Layout / Binding question
posted

I have a Custom object that represents inventory items and looks similar to this:

 public class InvItem {

        public string ItemID {

            get;

            set;

        }

  public string UPC_SKU {

            get;

            set;

   }

   public string StockingUM {

            get;

            set;

   }

public decimal Price {

            get;

            set;

 }

 public decimal Weight {

            get;

            set;

 }

public ObservableCollection<InvCategory> AttachedCategories {

            get { return _categories; }
            set { _categories = value; }
}
public ObservableCollection<InvDocument> Documents {
            get { return _documents; }
            set { _documents = value; }
}
public ObservableCollection<string> Tags {
            get { return _tags; }
            set { _tags = value; }
}

public InvItem() { }

}

The InvItem class is stored in an ObservableCollection<InvItem> 
which is populated with a call to my database. I then bind the 
collection to my XamDataGrid. Allowing the XamDataGrid to 
AutoGenerate Fields and Layout, it discovers the Hierachical 
data structure between ObservableCollection<InvItem>  
and it's child collections, <AttachedCategories>, 
<Documents>, etc, 

But, I am trying to build a manual field layout very similar 
to the 'Record Layout Customization' sample in the Feature 
Browser. For the child collections, I would like to use a 
ComboBox or XamComboEditor, both of which I have 
been able to embed in the XamDataGrid, but I have been 
unable to bind either to the child  collections. 

Any help would be greatly appreciated.

Rob

 

Parents
  • 12875
    posted

    Hi Rob,

     

    I've been working on your question but I could use some clarification.

     

    You mentioned embedding a XamComboEditor into the xamDataGrid but you also mentioned the “Record Layout Customization” sample which is causing me a little confusion in the direction you are going.

     

    If you want to show hierarchical data in your grid, you may just need to define multiple layouts.

     

    If you are trying to define a column within the parent row as a XamComboEditor to show a collection within the InvItem then you will need to add an unbound field for the XamComboEditor.

     

    I’m working on a sample that will show you both scenarios but it would be helpful if you could clarify your requirement in the UI.

Reply Children