Let's say I use data binding as follows:
List<Entity> Entities = <some data> entityBinding.DataSource = Entities; lstEntities.DisplayMember = "Description";
which works great. However, I want to manipulate the string that returns as the Entity Description. How can I call a function in DisplayMember?
You cannot call a function in this field, but you can create a new property in your entity called MyDescription , which does Description what you want to do, and then use this new property as your DisplayMember
MyDescription
Description
DisplayMember
Source: https://habr.com/ru/post/1308541/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1308536/attached-properties-to-avoid-custom-controls&usg=ALkJrhg9WgZQYGhwTzIiSjDYOmW48t8rhAHow to connect and send data in Bluetooth AS3 format? - actionscript-3Adding a column to the model at runtime (without additional tables) in rails - ruby | fooobar.comRails Architecture Issues - oopHow to determine: scroll up or down? - c #The correct way to write "ID" in SQL columns - sqlWhy is toInteger :: Int → Integer lazy? - haskellHow to change the font of the main objects in Delphi? - delphiWhich libraries use design patterns implemented using metaprogramming techniques at compile time? - c ++Problem loading RTF file in windows richTextBox - c #All Articles