Bind a grid after the page is loaded
-
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?
-
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?
-
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?
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...
-
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
-
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...
Sure this method works. But I wanted to know whether this could be done without a second control to trigger the postback?