Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a Bool from a DataRowView

Status
Not open for further replies.

bakershawnm

Programmer
Apr 18, 2007
84
US
I have looked at so much stuff on datarowveiws but they all assume you are getting text or integer data from their elements. I cannot find anything on how to get a boolean value from an element in a datarowview.

Using VS 2008 .Net 3.5 target.

Here is my code that wont even compile because it says I cannot covert and object to a bool on the last row.

DataRowView actntyperow;
DataRowView actntitlerow;

actntyperow = (DataRowView) this.actionTypesBindingNavigator.BindingSource.Current;
this.actionControl1.ActnTyp = actntyperow["ActionType"].ToString();
actionTitlesbindingSource.Filter = "ActionType = '" + actntyperow["ActionType"].ToString() + "'";
actntitlerow = (DataRowView) this.actionTypesBindingNavigator.BindingSource.Current;
this.actionControl1.NA = actntitlerow["NA"];

And since it is the end of the day and I am brainfried it is probably something obvious that I should already know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top