I try to open a RadWindow that will show different data by clicking a list of linkbuttons. These linkbuttons should be created at runtime.
I made that work by the following code example
However, there is a problem. If I have 100 items to loop, there will be 100 RadWindows added to RadWindowManager. And this is not acceptable. I want to use just one RadWindow and let all linkbuttons call this RadWindow, then pass different data to NavigateUrl . The question is how to pass data to just one RadWindow by different linkbutton?
It will be much easier If there is a server side method, like RadWindow.show() or.open(), which can allow me to open RadWindow in code behind. But seems like the only way to open the RadWindow is using javascript?
I made that work by the following code example
vb code
For Each a In aList ' Dynamically create radWindows '************************************************************************ Dim radWindow As New Telerik.Web.UI.RadWindow With radWindow .ID = "radWindow" & a .Modal = True .NavigateUrl = "http://test.aspx?a=" & a End With ' Add new radWindow to radWindowManager Me.RadWindowManager1.Windows.Add(radWindow) ' Dynamically create linkbutton ' ************************************************************************* Dim lbtnSchool As New LinkButton With lbtnSchool .ID = "lbtn" & a .OnClientClick = "openWindow('" & radWindow.ClientID & "');return false;" End With ' ************************************************************************** NextJavascript function
function openWindow(id) { var win; win = $find(id); win.show();}However, there is a problem. If I have 100 items to loop, there will be 100 RadWindows added to RadWindowManager. And this is not acceptable. I want to use just one RadWindow and let all linkbuttons call this RadWindow, then pass different data to NavigateUrl . The question is how to pass data to just one RadWindow by different linkbutton?
It will be much easier If there is a server side method, like RadWindow.show() or.open(), which can allow me to open RadWindow in code behind. But seems like the only way to open the RadWindow is using javascript?