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
275
Changing text of the Cell.
posted

Is there any way to change the text of the ultraGridCell without changing its underlined value? i.e i want to change the cell.Text which should not change the cell.Value.

Thanks in advance,

Ujwal

 

 

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    Yes, you can do this with a ValueList. If you assign a ValueList to the associated column, that list is used to have the cell display one thing while its value is something else. For example, assuming the cell's value is 1, and you want to display "One", you might have a ValueList to which you add items in the following manner:

    ValueList vl = new ValueList();
    vl.ValueListItems.Add( 1, "One" );
    vl.ValueListItems.Add( 2, "Two" );
    vl.ValueListItems.Add( 3, "Three" );

    If you assign this ValueList instance to an UltraGridColumn, cells in that column whose value is 1, 2, or 3 will show "One", "Two" or "Three", respectively.

Children
No Data