Is it possible to get the values of Datgrid Controls

Discussion in 'ASP .Net Web Controls' started by DaDev, Jun 24, 2004.

  1. DaDev

    DaDev Guest

    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!
     
    DaDev, Jun 24, 2004
    #1
    1. Advertising

  2. DaDev

    Teemu Keiski Guest

    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.

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist
    http://blogs.aspadvice.com/joteke


    "DaDev" <> wrote in message
    news:...
    > 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!
     
    Teemu Keiski, Jun 24, 2004
    #2
    1. Advertising

  3. DaDev

    DaDev Guest

    Hi Teemu,

    thanx for you help!

    greetings

    DaDev









    "Teemu Keiski" <> wrote in message news:<>...
    > 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.
    >
    > --
    > Teemu Keiski
    > MCP, Microsoft MVP (ASP.NET), AspInsiders member
    > ASP.NET Forum Moderator, AspAlliance Columnist
    > http://blogs.aspadvice.com/joteke
    >
    >
    > "DaDev" <> wrote in message
    > news:...
    > > 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!
     
    DaDev, Jun 25, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    0
    Views:
    399
  2. Atif Jalal

    Totaling a column in Datgrid

    Atif Jalal, Jan 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,103
    Alvin Bruney
    Jan 24, 2004
  3. SKG

    datgrid and sql bit field

    SKG, Jun 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,068
    =?Utf-8?B?QW5keSBaIFNtaXRo?=
    Jun 16, 2004
  4. =?Utf-8?B?UnViZW4=?=

    DatGrid.DataSource

    =?Utf-8?B?UnViZW4=?=, May 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    456
    Lucas Tam
    May 21, 2005
  5. Markus
    Replies:
    1
    Views:
    497
    Markus
    Nov 22, 2005
Loading...

Share This Page