Posted on Aug 5, 2011 (permalink)
I am working on an ASP.Net Project. I am using Radwindowmanager to open a page on click on button.
Can anyone tell me how to open a radwindow in showdialog() method
public partial class WebForm2 : System.Web.UI.Page
{
protected void Button2_Click1(object sender, EventArgs e)
{
Telerik.Web.UI.
RadWindow newWindow = new Telerik.Web.UI.RadWindow();
newWindow.NavigateUrl = "SearchGrid.aspx";
newWindow.OpenerElementID = Button2.ClientID;
newWindow.VisibleOnPageLoad = true;
newWindow.DestroyOnClose = true;
newWindow.Modal = true;
newWindow.EnableViewState = false;
RadWindowManager1.Windows.Add(newWindow);
}
}
In this scenario I need to pass dataset to searchdrid.aspx and need to get selected value from serachgrid.aspx to WebForm2.aspx textbox. In
below I mention the sample which I did from c# windows app.
private void SearchGridTable(DataTable SearchGrid)
{
formSearchGrid frmSearch = new formSearchGrid();
frmSearch.DataSource = SearchGrid;
frmSearch.ShowDialog();
return frmSearch.strVal;
}
pivate void rdbutSearchCategory_Click(object sender, EventArgs e)
{
try
{
CommonVariables commVariable = new CommonVariables();
commVariable.Type = strRequesttype;
DataTable serachDatatable = new CategoryService().SelectDetails(commVariable);
rdtxtCatCode.Text = Utility.SearchGridTable(serachDatatable);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString(), Constant.SystemMessageErrorHeader, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
please help