Results 1 to 3 of 3

Thread: [RESOLVED] GridView Footer

  1. #1

    Thread Starter
    Fanatic Member snufse's Avatar
    Join Date
    Jul 2004
    Location
    Jupiter, FL
    Posts
    912

    Resolved [RESOLVED] GridView Footer

    I am programatically inserting a footer row to my GridView. In cell 0 I am adding a "Select" button.

    Code:
    If e.Row.RowType = DataControlRowType.Footer Then
                Dim myLinkButton As New LinkButton
                myLinkButton.Text = "Select"
                AddHandler myLinkButton.Click, New EventHandler(AddressOf ClickHandler)
                e.Row.Cells(0).Controls.Add(myLinkButton)
    End If
    So far no problem. Now I need to left justify the "Select" verbage in the cell. I am adding following to the code:

    Code:
    myLinkButton.Text = HorizontalAlign.Left
    When I now display the GridView, I see a '1' in the footer cell 0 and not a "Select" anymore???

  2. #2
    Fanatic Member
    Join Date
    Jun 2004
    Location
    All useless places
    Posts
    917

    Re: GridView Footer

    That's because you are setting the text property of link button to the enumerated value of HorizontalAlign.Left. For setting the style property you should be using e.Row.Cells[0].HorizontalAlign = HorizontalAlign.Left {haven't run the code}.

  3. #3

    Thread Starter
    Fanatic Member snufse's Avatar
    Join Date
    Jul 2004
    Location
    Jupiter, FL
    Posts
    912

    Smile Re: GridView Footer

    Great. That worked, thank you....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width