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
3455
Valuelists Column
posted

Hi,

I have two Valuelists column in a wingrid and the second valuelists column must be populated according to the first valuelists column selected value. Is this possible in wingrid. If it is possible please give some code samples in c#

 

  • 3455
    Verified Answer
    posted

    I found the solution 

     

    this.ultraGrid1.DisplayLayout.ValueLists.Add("ListTest");

    this.ultraGrid1.DisplayLayout.ValueLists["ListTest"].ValueListItems.Add(1, "A");

    this.ultraGrid1.DisplayLayout.ValueLists["ListTest"].ValueListItems.Add(2, "B");

    this.ultraGrid1.DisplayLayout.ValueLists["ListTest"].ValueListItems.Add(3, "C");

    this.ultraGrid1.DisplayLayout.ValueLists["ListTest"].ValueListItems.Add(4, "D");

    this.ultraGrid1.DisplayLayout.ValueLists["ListTest"].DisplayStyle =

    ValueListDisplayStyle.DisplayText;this.ultraGrid1.Rows[row - 2].Cells[2].ValueList = this.ultraGrid1.DisplayLayout.ValueLists["ListTest"];

     

    this.ultraGrid1.Rows[row - 2].Cells[2].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;

     

     This can be setted at run time