sql - Combining two values from different columns into one column in Datagridwiev -
i using ms sql server , visual basic.
i want combine calculated column , column add units calculation. (for example "200 m2")
dgwnewlayout.columns(5).defaultcellstyle.format = "0.00 " & "'" & dgwnewlayout.currentrow.cells(9).value & "'" this code first entered unit? how can each column?
you use cellformatting event.
private withevents dgwnewlayout datagridview  private sub dgwnewlayout_cellformatting(sender object,     e datagridviewcellformattingeventargs ) handles dgwnewlayout.cellformatting      if e.columnindex = 5         e.value = cdbl(e.value).tostring("0.00") &             " " & cstr(dgwnewlayout.rows(e.rowindex).cells(9).value)         e.formattingapplied = true     end if end sub as dom sinclair says, have poor performance.
Comments
Post a Comment