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
1940
UltraDropDown CultureInfo Binding
posted

EDIT: SOLVED BY MYSELF, NEVERMIND!

The bound Column Name was "Name" instead of "DisplayName"...  :(

Blue

 

Hello everybody and happy new year.

Today I came across some surprising and unexpected behavior with my UltraDropDown, with is used in an unbound Column inside an UltraGrid.

I was going to bind the List of CultureInfos to the UltraDropDown so I set the UltraDropDown's DisplayMember to "DisplayName" and the ValueMember is set to "LCID", which are both properties of CultureInfo.

I then bind the list to the UltraDropDown in code like this:

this.ultraDropDownWorldLanguage.SetDataBinding(new List<CultureInfo>(CultureInfo.GetCultures(CultureTypes.SpecificCultures)), null, true);

the grids layout initiation looks like this:

 

e.Layout.Bands[0].Columns[@"CultureInfo"].Style = ColumnStyle.DropDownList;

e.Layout.Bands[0].Columns[@"CultureInfo"].ValueList = this.ultraDropDownWorldLanguage;

 

Nothing unusal so far, it all works.

But if I run the program and watch the ~200 Items in the List, not the DisplayMember is displayed, but the string representation is. Futhermore the DisplayMember is shown after selecting any item. huh?

I had no issues with this kind of binding so far, I use it quite often in almost identical situations.

Any hints?

Blue

  • 20872
    Offline posted

    Hello Blue,

    Thank you for the provided feedback.

    Please feel free to contact us, if you have any other questions in the future.