Is it possible to get the values of Datgrid Controls

D

DaDev

i want to change the text of hyperlink column cell :



Public Sub dgrSuchergebnis_Databound(ByVal sender As System.Object,
ByVal e As DataGridItemEventArgs)
Dim DatumVertragsabschluss As TableCell = e.Item.Cells(3)

If DatumVertragsabschluss.Text = "01.01.1900" Then
DatumVertragsabschluss.Text = "kein Vertrag"

End If

it works not!

help!
 
T

Teemu Keiski

Hi,

you want to change it for normal items? In that case you need to check for

If e.Item.ItemType=ListItemType.Item OrElse
e.Item.ItemType=ListItemType.AlternatingItem Then
....
End If

and inside this check grab the proper cell and again then look for the
hyperlink from Cell's Controls collection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top