Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Populating a control dependant on data bound in Gridview

Populating a control dependant on data bound in Gridview

Scheduled Pinned Locked Moved Web Development
databasehelpworkspace
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris McGlothen
    wrote on last edited by
    #1

    Hi, Problem: I have a web application that is tied into a Windows Workflow that tracks orders. In the portion of the application that allows the user to set/reset the state of an order I have a gridview and a formview. The gridview displays the meat of the order data as stored in the database, and the formview is where I'd like to store the buttons that will perform the updates and progress the order states.....etc. I'd like to set the visibility of the different buttons in the formview dependant on the current state of the Workflow. I can get the current state of the order no problem from the gridview's OnItemCreated event. I've tried to access the FormView control via: FormView fv = this.Page.FindControl("fvOrderState") as FormView; but hitherto I am unable to get any reaction from the FormView. I would appreciate any and all suggestions and/or leads for this problem. Thank you.


    An American football fan - Go Seahawks! Lil Turtle

    K 1 Reply Last reply
    0
    • C Chris McGlothen

      Hi, Problem: I have a web application that is tied into a Windows Workflow that tracks orders. In the portion of the application that allows the user to set/reset the state of an order I have a gridview and a formview. The gridview displays the meat of the order data as stored in the database, and the formview is where I'd like to store the buttons that will perform the updates and progress the order states.....etc. I'd like to set the visibility of the different buttons in the formview dependant on the current state of the Workflow. I can get the current state of the order no problem from the gridview's OnItemCreated event. I've tried to access the FormView control via: FormView fv = this.Page.FindControl("fvOrderState") as FormView; but hitherto I am unable to get any reaction from the FormView. I would appreciate any and all suggestions and/or leads for this problem. Thank you.


      An American football fan - Go Seahawks! Lil Turtle

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      Have you called the formview.DataBind event after changes? In my use of hte formview that has usually been the problem. So when the data or dependancies change you have to databind the formview for the changes to show up. Hope that helps. Ben

      C 1 Reply Last reply
      0
      • K kubben

        Have you called the formview.DataBind event after changes? In my use of hte formview that has usually been the problem. So when the data or dependancies change you have to databind the formview for the changes to show up. Hope that helps. Ben

        C Offline
        C Offline
        Chris McGlothen
        wrote on last edited by
        #3

        Even if I don't have any dynamic data, just buttons within the control, I still need to databind the control? Thanks for the reply BTW:)


        An American football fan - Go Seahawks! Lil Turtle

        K 1 Reply Last reply
        0
        • C Chris McGlothen

          Even if I don't have any dynamic data, just buttons within the control, I still need to databind the control? Thanks for the reply BTW:)


          An American football fan - Go Seahawks! Lil Turtle

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          Yes, I believe so. I haven't done exactly what you are trying to do, but in my case I always had to rebind to get the formview to change. Hope that helps. Ben

          C 1 Reply Last reply
          0
          • K kubben

            Yes, I believe so. I haven't done exactly what you are trying to do, but in my case I always had to rebind to get the formview to change. Hope that helps. Ben

            C Offline
            C Offline
            Chris McGlothen
            wrote on last edited by
            #5

            I tried to bind the FormView, with no luck:(( I solved the problem by statically declaring a GridView column to be Visible depending on the state of the order, but I don't like having to to do this.:( Thanks for the replies.


            An American football fan - Go Seahawks! Lil Turtle

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups