Dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I use a dataset with the name Klanten1
How can I read a value in a specified colom (with the name 'BlackList') in that datase

Th

JoskeXP
 
Hi Joske
I use a dataset with the name Klanten1.
How can I read a value in a specified colom (with the name 'BlackList') in
that dataset

In a column is no value, the values (although also references) are in the
items, the columns describes the items.

When you want to have a value of the column Blacklist from a dataset with 1
table it can be for the first row

if Klanten1.tables(0).rows(0).item("Blacklist") = true then
doMessageNoSendings
end if

I hope this helps?

Cor
 
Hi

I have a form where I have differt textboxen with a binding to a dataset called klanten1
In this dataset I have col. with a name Blacklist with no binding to a textbox.(all the other col. have bindings with textboxen
When the value in this colom = true then I want a label (lblblacklist) with a text "BlackList"
When this value is false then I want to clear this label

Th

JoskeXP
 
JoskeXP said:
Hi,

I have a form where I have differt textboxen with a binding to a dataset called klanten1 .
In this dataset I have col. with a name Blacklist with no binding to a
textbox.(all the other col. have bindings with textboxen)
When the value in this colom = true then I want a label (lblblacklist) with a text "BlackList".
When this value is false then I want to clear this label.

Thx

JoskeXP


You could make the lblblacklist not visible and bind it to column
"BlackList".
Then in your navigation code check if the lblblacklist is true or false and
populate a textbox.
 
Hi Joske,

I think I would have a look what the addhandler could do for you

Beneath a sample i once made for that, not your problem, however I think you
can do it yourself when you see this

I hope this answers your question?

Cor


Mybinding = New Binding("Text", ds.Tables(0), "mydatfield")
textdatfield.DataBindings.Add(Mybinding)
AddHandler mybinding.Format, AddressOf DBdateTextbox
AddHandler mybinding.Parse, AddressOf TextBoxDBdate
End sub
Private Sub DBdateTextbox(ByVal sender As Object, _
ByVal cevent As ConvertEventArgs)
If cevent.Value Is DBNull.Value Then
cevent.Value = ""
Else
Dim datum As Date
cevent.Value = datum.ToString("dd - MM - yyyy")
End If
End Sub
Private Sub TextBoxDBdate(ByVal sender As Object, _
ByVal cevent As ConvertEventArgs)
If cevent.Value.ToString = "" Then
cevent.Value = DBNull.Value
End If
End Sub
 
Back
Top