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
85
DisplayMember on Ultragrid drop down
posted

Hi

How do you set the display member on the Ultragrid drop down when using value list?

I would like to set my diplay member to "i" on the below code sample.

 

 

 

 

 

 

 

 

ValueList vlPeriod = e.Layout.ValueLists.Add("Period"

);

 

 

 

for (int

i = 0; i <= 18; i++)

{

 

 

 

if

(i == 0 || i >= 12)

vlPeriod.ValueListItems.Add(i,

 

 

"Annual Financials"

);

 

 

 

else

vlPeriod.ValueListItems.Add(i, i.ToString());

}

 

e.Layout.Bands[0].Columns[

 

 

"Period"].ValueList = e.Layout.ValueLists["Period"

];

Thanks

Staggga

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello Staggga,

    You could try setting the 'DisplayStyle' property of your valuelist:

    vlPeriod.DisplayStyle = ValueListDisplayStyle.DataValue;

    Please do not hesitate to ask if something comes up.

Children
No Data