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
2009-11-05 10:43:56
A:
No clarity in your question. why because Jquery is client side script. you saying after page load how it is possible.
Surya sasidhar
2009-11-05 12:02:41
Ok, forget about jquery.
Arief Iman Santoso
2009-11-05 15:54:47
how does jquery factor into binding your gridview?
Jim Schubert
2009-11-05 18:20:44
I think something like...$document.ready = function() { //load grid ajax call };
Arief Iman Santoso
2009-11-06 11:04:20
+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
2009-11-05 21:05:30