Test Specific column of current row

dsk96m

Well-known member
Joined
Jan 11, 2013
Messages
173
Programming Experience
1-3
On my form I have added items from my dataset. In my code, I want to test if a specific item in that current row is null or not. I am not sure how to go about this. Do I use the bindingsource or table adapter? I am looking for something like:

if flightplanbindingsource.columnname is null then

obviously the above is not correct, but I am wondering how to do it. Any help would be appreciated.
Thanks
 
Got it. Might not me the best way, but it works

VB.NET:
        Dim flightplanRowView = DirectCast(FlightplanBindingSource.Current, DataRowView)
        Dim flightplanRow = DirectCast(flightplanRowView.Row, FlightTestApp2DataSet.flightplanRow)

        If flightplanRow.Istakeoff_time_actualNull Then
            Me.Takeoff_time_actualDateTimePicker.Value = Me.Takeoff_time_plannedDateTimePicker.Value
        End If
 
Back
Top