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
20
UltraGrid with UltraTree in UltraTextEditor
posted

I currently have an UltraGrid bound to a custom object:

public class Person

{

   public string FirstName { get; set;}

   public string LastName { get; set; }

   public int CategoryId { get; set; }

}

 

The UltraGrid's Category column's ValueList property is set to a UltraDropDown like so:

 

 

 

 

 

uddCategories =

new Infragistics.Win.UltraWinGrid.UltraDropDown();

 

uddCategories.ValueMember =

"CategoryId";

uddCategories.DisplayMember =

"Code";

uddCategories.DataSource = categories; // this is a list of category objects

 

 

ugContent.DisplayLayout.Bands[0].Columns[

"CategoryId"].ValueList = uddCategories;

 

 

Now our categories are going to be grouped into Super Categories and the we wish to display them in a hierarchical  manner.

SuperCategoryA

     Category1

     Category2

SuperCategoryB

     Category3

     Category4

and so on...

 

I wish to accomplish this using an UltraTextEditor and an UltraTree.  So far I have managed to get the categories in the Tree and the Tree into the UltraTextEditor and into the appropriate cell of the grid. 

Now I need to get the Category code into the UltraTextEditor's text property based on the CategoryId of the row.  I also need to select the appropriate Node in the UltraTree based on the CategoryId of the row.  Is there a way to bind these values through existing properties?

 

Any guidance or advice is appreciated,

Thanks.