R
Raed Sawalha
I am trying to sort a DataGrid in a user control that is programatically
loaded when a link button is clicked.
UC1 is loaded onto Page1.aspx after clicking a link button. No problem,
loads fine.
How do I call the following event on UC1 when the sort collumn of the data
grid is clicked?
Sub DataGrid1_SortCommand(ByVal s As Object, ByVal e As
DataGridSortCommandEventArgs)
When I click on the sort collumn, the Page_Load event of Page1.aspx is
called, not the above Sub. If I load this user control at design time it
works ok, just not when it it is loaded programatically.
Can I check for e in the Page1.aspx Page_Load event?
If Not Page.IsPostBack then
'Do Something
Else
If e = something then
Call the Sub DataGrid1_SortCommand(...)
End If
End If
Is this correct or is there a better way to be doing this?
thanks,
loaded when a link button is clicked.
UC1 is loaded onto Page1.aspx after clicking a link button. No problem,
loads fine.
How do I call the following event on UC1 when the sort collumn of the data
grid is clicked?
Sub DataGrid1_SortCommand(ByVal s As Object, ByVal e As
DataGridSortCommandEventArgs)
When I click on the sort collumn, the Page_Load event of Page1.aspx is
called, not the above Sub. If I load this user control at design time it
works ok, just not when it it is loaded programatically.
Can I check for e in the Page1.aspx Page_Load event?
If Not Page.IsPostBack then
'Do Something
Else
If e = something then
Call the Sub DataGrid1_SortCommand(...)
End If
End If
Is this correct or is there a better way to be doing this?
thanks,