I have a grid that contains a date field column. Depending on some business rules, I need to display one of three dates in that date field.
The grid is bound to a DataSet that I get back from a web service call in the NeedDataSource call. The dataset contains the 3 date fields, along with other relevant data.
Where is the proper place to put the logic to determine which date field to display? I can put it in the NeedDataSource call and do something like dynamically add a new column to the dataset and bind to that column, but I'm wondering if that's the best place to do it. I thought about doing it in the ItemDataBound event, but it doesn't appear that I have access to the non-bound columns in the dataset at that point (do I? how?).
Is there another, better place to do it? It's simple logic, I just need to know the correct place to do it - that is, the most efficient, and one that will not mess up autosorting or filtering - and also have access to the underlying data source and/or columns that I need.
The grid is bound to a DataSet that I get back from a web service call in the NeedDataSource call. The dataset contains the 3 date fields, along with other relevant data.
Where is the proper place to put the logic to determine which date field to display? I can put it in the NeedDataSource call and do something like dynamically add a new column to the dataset and bind to that column, but I'm wondering if that's the best place to do it. I thought about doing it in the ItemDataBound event, but it doesn't appear that I have access to the non-bound columns in the dataset at that point (do I? how?).
Is there another, better place to do it? It's simple logic, I just need to know the correct place to do it - that is, the most efficient, and one that will not mess up autosorting or filtering - and also have access to the underlying data source and/or columns that I need.