How Do I change a Datagrid Column value to a different Value from the same Dataset depending on another field value from the Dataset
How Do I change a Datagrid Column value to a different field Value from the same Dataset depending on another field value from the Dataset.
I have a dataset that is created from a stored procedure. The stored procedure can not be changed.
I have bound the datagrid's columns to the Grid. The problem I am having is how to change a column value (not header) depending on a different value from same dataset. The dataset contains a refID field and it also contains the 4 possibilities that coincide with the ref ID.
If RefID = 1 get Datatset Field(1)
if RefID = 2 get Dataset Field(2) etc.
I am assuming that I need to do this in ItemDataBound but I don't have any idea as to how.
here is the binding code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim aMGR As New aMGR
dgGrid.DataSource = aMGRGetDetails()