Infragistics ultrawingrid cell-level formatting -


i have infragistics ultrawingrid bound datasource contains amount (decimal) , currency (string). need display amount , currency formatted:

data source:          grid contents:  amount   currency     amount 12.34    eur          eur 12.34 22.33    usd          usd 22.33 

i thinking 3 options:

  1. populate "amount" column in grid formatted string. don't option because mess sorting of decimal values.
  2. set editor on each cell (cell, not column!) in initializerow event. however, don't know editor suitable - ideas?
  3. format amount column (column level!) in initializelayout method somehow dependant on currency column (the currency column exists in grid hidden column) - don't know if possible - know how? or there other suggestions?

i have done using option 2 using editorwithtext. have 2 columns in row - decimal value column , string formatstring column. here's did have independent formatting in value column.

grid.initializerow += (sender, e) => {     defaulteditorownersettings settings = new defaulteditorownersettings();     settings.datatype = typeof(decimal);     settings.format = (string)e.row.cells["formatstring"].value;     editorwithtext editor = new editorwithtext(new defaulteditorowner(settings));     e.row.cells["value"].editor = editor;   } 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -