none
display short result in datagridview column RRS feed

  • Question

  • so i am getting data from dataset and displaying it in datagridview  using this code

            objdsOrders.Tables(0).Columns(6).Expression = "[CT] * [QTN CONT]"
            objdsOrders.Tables(0).Columns(8).Expression = "[QTN CONT] * [UNIT PRICE]"
            objdsOrders.Tables(0).Columns(9).Expression = "[CT] * [CONT COST]"

    now lets imagine that one of the rows i got the following details

    unit price=22.26

    qtn cont=780

    column 8 will get the following result 17362.800000000003

    my question is how to make the result 17362.80 instead of 17362.800000000003

    the code can affect the column in either dataset.datatable.column or datagridview.column as long as i get the result i want

    thanks


    I am A Medical Doctor

    Tuesday, February 6, 2018 5:02 AM

All replies