views:

201

answers:

3

I want to bind a gridview after the page has finished loading (after Page_Load), so not on the Page_Load event handler, but after that.

A: 

I'm not quite sure what you mean. The Gridview is bound to a datasource on the server side. You can bind the source at any point between Page_Init and the end of Page_Load, if I recall correctly.

jQuery on the other hand runs on the client side and therefore binding a datasource to the Gridview at this point is not possible.

Russ Cam
A: 

No clarity in your question. why because Jquery is client side script. you saying after page load how it is possible.

Surya sasidhar
Ok, forget about jquery.
Arief Iman Santoso
how does jquery factor into binding your gridview?
Jim Schubert
I think something like...$document.ready = function() { //load grid ajax call };
Arief Iman Santoso
+1  A: 
         Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete
            If Not IsPostBack Then
                Me.DataBind()
            End If
        End Sub

        Public Overrides Sub DataBind()

           Me.Grid.Datasource = Somedata          

           MyBase.DataBind()    

        End Sub

Is that what you mean?

Mark Holland