I get 5 steps forward and then hit a brick wall with the RADGrid.
I have a page with a MultiView, encapsulating two views. View1 displays View2 when a particular LinkButton is pressed. On View2, I have a RADGrid. Within it I am dynamically creating a ButtonColumn of LinkButtons. The issue is that when a LinkButton is selected from one of the rows, I need the MultiView to change back to View1. Problem is, because the LinkButton is inside the RADGrid, it execute as an Asynchronous PostBack, and even though my code changes the CurrentView of the MultiView, the change doesn't get applied. I was thinking that what I needed was to designate all the LinkButtons inside that particular column as requiring a full Synchronous PostBack when clicked.
I tried the following, but it didn't work:
Note: ButtonColumnsRequiringFullPostBack is a simple String Array holding the Unique Column Names of any columns with LinkButtons that I want to make as Synchronous Postback.
Private Sub gridMain_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridMain.ItemCreated
If (e.Item.GetType() Is GetType(GridDataItem)) Then
'***************************************
' Initialize Variables
'***************************************
Dim objDataItem As Telerik.Web.UI.GridDataItem = e.Item
For Each strUniqueColumn As String In Me.ButtonColumnsRequiringFullPostBack
With Telerik.Web.UI.RadScriptManager.GetCurrent(Me.Page)
.RegisterPostBackControl(objDataItem(strUniqueColumn).Controls(0))
End With
Next
End If
End Sub
Now I don't get any error with this code...but it doesn't work either. I click the LinkButton inside the RADGrid, and it still executes Asynchronously...leaving the user on the same View2 page.
P.S. I am looking for a Server-Side solution, not a Client-Side one. Also I want to avoid wrapping the entire page in an UpdatePanel if avoidable. I think doing so may end up breaking a lot of the other functionality and I rather not spend days fixing the entire page to work AJAX style.
Any suggestions?