I am writing a simple PhoneBook database program, and part of it requires me to get the values of the currently viewed record.
I am using BindingManagerBase to handle browsing through the Phone Book.
Right now I am using the following line to get the value of column 0 ("Phone") to retrieve the phone number of the currently viewed record.
I am wondering, can I possibly get the value like ItemArray[] but using the columns name. The above line gives me the value of "Phone". But I would like to use the columns name "Phone". Eg. ItemArray["Phone"], but obviously that only accepts a int index value. I cant seem to find a simple way to do it.
I am using BindingManagerBase to handle browsing through the Phone Book.
Right now I am using the following line to get the value of column 0 ("Phone") to retrieve the phone number of the currently viewed record.
C#:
dataSet11.Tables["PhoneBook"].Rows[this.bindManager.Position].ItemArray[0]
I am wondering, can I possibly get the value like ItemArray[] but using the columns name. The above line gives me the value of "Phone". But I would like to use the columns name "Phone". Eg. ItemArray["Phone"], but obviously that only accepts a int index value. I cant seem to find a simple way to do it.