none
building table in visual studio

    Question

  • Greetings all,

    I am trying to create an app in visual studio based on an excel spreadsheet. For one of the computed fields in visual studio, I am finding it difficult to recreate a formula for a column that calculates a cumulative difference between differences in data entries on data from an adjacent  column on a daily basis. In excel the formula is =ROUND(IF(B5<NOW(),U4+T5,0),2). Does anyone know how to edit the method for the computed field in Visual Studio to achieve this?

    Any help will be much appreciated

    Regards

    Monday, April 3, 2017 6:32 AM

Answers

  • You didn't specify how you're build your table. Are you using a type to represent the data that you're showing in a row or a DataRow or what? In most cases I'd say use a computed property. If you're using a DataRow then you'd use a computed column. However the issue you are going to have is that you appear to be referencing other rows (eg. U4). You're not going to be able to do that sort of thing with a computed property (or probably a computed row) easily.

    Michael Taylor
    http://www.michaeltaylorp3.net

    Monday, April 3, 2017 2:09 PM
    Moderator

All replies

  • You didn't specify how you're build your table. Are you using a type to represent the data that you're showing in a row or a DataRow or what? In most cases I'd say use a computed property. If you're using a DataRow then you'd use a computed column. However the issue you are going to have is that you appear to be referencing other rows (eg. U4). You're not going to be able to do that sort of thing with a computed property (or probably a computed row) easily.

    Michael Taylor
    http://www.michaeltaylorp3.net

    Monday, April 3, 2017 2:09 PM
    Moderator
  • Thanks Michael, that helps
    Tuesday, April 4, 2017 7:50 AM