Friday, June 3, 2016

Value List Bind in UltraWinGrid

//UltraWinGrid
private void UltGrdEmpMast_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
        {
            ValueList vl;
            if (!e.Layout.ValueLists.Exists(“MyValueList”))
            {
                vl = e.Layout.ValueLists.Add(“MyValueList”);
                vl.ValueListItems.Add(1, “A”);
                vl.ValueListItems.Add(2, “B”);
                vl.ValueListItems.Add(3, “C”);
            }
            e.Layout.Bands[0].Columns[“Emp_Name”].ValueList = e.Layout.ValueLists[“MyValueList”];
        }

No comments: