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
385
Set Wingrid cell value that not in value list
posted

Hi. I need to set value to cell that not in value list, it sets but it shows in cell myValue.ToString() string , is it possible to handle what cell will show if value not in value list?

so, my goal is to show value in cell but don't allow user to chose it from dropdown. Please advice.

Parents
No Data
Reply
  • 21795
    Offline posted

    Hello Kyril,

    Thank you for contacting Infragistics Support.

    I suppose your column is of type “object” and you are trying to set its value to an instance of some class. If this is your case what you need to do is to override the ToString() method of your class. Actually if the cell is of type “object” it calls ToString method of the underling object in order to display its string representation.

    Please find attached a sample solution implementing UltraGrid with cell of type “object”. Please note if you set the value of a cell to an instance of MyValue class it will display UltraGridValueListItem.MyValue. However if you uncomment ToString() method in MyValue class the cell will show correct value.

    Please let me know if this is what you are looking for or if I am missing something.

    CAS-147324-P6M5F7.zip
Children