Results 1 to 5 of 5

Thread: [RESOLVED] .net 2.0 GridView

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Resolved [RESOLVED] .net 2.0 GridView

    Hello,
    I posted something similar to this post before but this is slightly different.

    The GridView gets populated and in the _RowDataBound event the Accept button(select CommandField button) gets replaced by a text value if there is one as shown below:

    The find button populated the GridView correctly and Accept button is replaced with a text where necessary but not sure why when the checkbox on the page is clicked on, then ALL the Accept buttons are shown on the GridView (Which is incorrect).
    The check box control only shows a label.
    Thanks

    If (e.Row.RowType = DataControlRowType.DataRow) Then
    'show the clinic code since there is a start date other wise just show the Accept button...
    'If Not (e.Row.DataItem("c_start_date").ToString() Is Nothing) Then
    If Not (e.Row.DataItem("c_start_date").ToString() = "") Then
    e.Row.Cells(9).Text = e.Row.DataItem("c_clinic_code").ToString() 'Change ur text here
    End If
    End If

  2. #2
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    Re: .net 2.0 GridView

    I think you need to expalin that better.....I can't figure out what you are looking for from that explaination.
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Re: .net 2.0 GridView

    This now solved by temporarily hiding the grid.
    Thanks

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] .net 2.0 GridView

    I can't even understand what the question was. You were assuming we already knew everything about the application you have been working on.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Re: [RESOLVED] .net 2.0 GridView

    Apologies for not being able to explain the problem properly.
    Imagine that there is a GridView which has a select commandField in one of the columns. This select button is replaced with a text according to business rules...
    The problem was that instead of text to appear, sometimes the buttons appeared.
    Any way, due to lack of time I kind of hacked it by using the visibility of the GridView...
    Hope you are abit clearer now about the issue that I had.
    Any way, this is solved now.
    Thanks for your time guys.

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