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. ASP.NET
  4. Bind a grid after the page is loaded

Bind a grid after the page is loaded

Scheduled Pinned Locked Moved ASP.NET
javascriptcsswpfwcfquestion
5 Posts 3 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.
  • T Offline
    T Offline
    tonymathewt
    wrote on last edited by
    #1

    I want to do the binding of a grid after the page it is contained is loaded and rendered completely. I want to delay its binding because the data source of the grid takes a long while to get populated. I need the page to be rendered first and then an ajax progress(wait) image is to be made visible until the grid is bound and rendered. Currently I am achieving this through triggering a hidden button's click() event via javascript that's written at the end of the body. The button's click function binds the grid. Both the button and grid are put inside Ajax update panel so, the waiting image also come's properly. Is there an easy(direct) alternative method rather than the way I am doing?

    B S 2 Replies Last reply
    0
    • T tonymathewt

      I want to do the binding of a grid after the page it is contained is loaded and rendered completely. I want to delay its binding because the data source of the grid takes a long while to get populated. I need the page to be rendered first and then an ajax progress(wait) image is to be made visible until the grid is bound and rendered. Currently I am achieving this through triggering a hidden button's click() event via javascript that's written at the end of the body. The button's click function binds the grid. Both the button and grid are put inside Ajax update panel so, the waiting image also come's properly. Is there an easy(direct) alternative method rather than the way I am doing?

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Are you looking for this?[^]


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

      T 1 Reply Last reply
      0
      • T tonymathewt

        I want to do the binding of a grid after the page it is contained is loaded and rendered completely. I want to delay its binding because the data source of the grid takes a long while to get populated. I need the page to be rendered first and then an ajax progress(wait) image is to be made visible until the grid is bound and rendered. Currently I am achieving this through triggering a hidden button's click() event via javascript that's written at the end of the body. The button's click function binds the grid. Both the button and grid are put inside Ajax update panel so, the waiting image also come's properly. Is there an easy(direct) alternative method rather than the way I am doing?

        S Offline
        S Offline
        saanj
        wrote on last edited by
        #3

        Use JavaScript's Window.SetTimeout() to set an interval to load the grid. Use _doPostBack() to create the postback using JavaScript. Call the method which you would like to use to bind the data. Check out my article: Calling ASP.NET server-side events using JavaScript[^] I hope it can help a bit. Regards Saanj

        Either you love IT or leave IT...

        T 1 Reply Last reply
        0
        • B Blue_Boy

          Are you looking for this?[^]


          I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

          T Offline
          T Offline
          tonymathewt
          wrote on last edited by
          #4

          Thank's for replying I am already achieving this functionality. In my page the grid should be bound with out any user action like a button click. I have explained already how I am achieving this. I am not sure whether this is the right way or not. I want to know whether this could be done without a second control to triger the binding

          1 Reply Last reply
          0
          • S saanj

            Use JavaScript's Window.SetTimeout() to set an interval to load the grid. Use _doPostBack() to create the postback using JavaScript. Call the method which you would like to use to bind the data. Check out my article: Calling ASP.NET server-side events using JavaScript[^] I hope it can help a bit. Regards Saanj

            Either you love IT or leave IT...

            T Offline
            T Offline
            tonymathewt
            wrote on last edited by
            #5

            Sure this method works. But I wanted to know whether this could be done without a second control to trigger the postback?

            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