We just had a user report that he is unable to use the RadWindow. He is using Safari 3.1 on a Mac running Mac OS X 10.4. I was not able to reproduce the error myself, but he claims that when he clicks on the ImageButton that is supposed to open the window, nothing happens. Are there any known issues with Window "Prometheus" and Mac Safari? Here is the code in my aspx page:
<asp:ImageButton ID="imgBtnRoles" runat="server" ImageUrl="/images/makeSelections.jpg" Width="128" Height="21" BorderWidth="0" BackColor="#a50021" />
I should mention that this imagebutton is inside of an asp:UpdatePanel and I have a trigger set on the imagebutton as follows:
<Triggers>
<asp:AsyncPostBackTrigger ControlID="imgBtnRoles" />
</Triggers>
I also have a radwindowmanager on my aspx page:
<
telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
Here is the code I am using in my aspx.vb file to create the radwindow:
Protected Sub imgBtnRoles_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgBtnRoles.Click
'Create a new window and add it dynamically
Dim newWindow As RadWindow = New RadWindow
newWindow.ID =
"RadWindow1"
newWindow.NavigateUrl =
"./RoleSelector.aspx"
newWindow.VisibleOnPageLoad =
True
newWindow.Enabled =
True
newWindow.Visible =
True
newWindow.Width = 285
newWindow.Height = 675
newWindow.Behaviors = WindowBehaviors.Close
newWindow.Skin =
"WebBlue"
newWindow.OffsetElementID =
"searchArea"
newWindow.ReloadOnShow =
True
newWindow.Modal =
True
newWindow.OnClientClose =
"initiateCallback"
newWindow.VisibleStatusbar =
False
'Add the newly created RadWindow to the RadWindowManager's collection
RadWindowManager1.Windows.Add(newWindow)
End Sub
| namespace TestBed { | |
| public partial class WebForm5 : System.Web.UI.Page { | |
| DataSet _Data; | |
| public DataSet Data { | |
| get { | |
| if(_Data == null || _Data.Tables.Count == 0) { | |
| _Data = new DataSet(); | |
| XmlDataDocument doc = new XmlDataDocument(); | |
| doc.Load(System.Web.HttpContext.Current.Server.MapPath("App_Data/lstransact.xml")); | |
| StringReader sr = new StringReader(doc.SelectSingleNode("//data").OuterXml); | |
| XmlTextReader r = new XmlTextReader(sr); | |
| _Data.ReadXml(r); | |
| } | |
| return _Data; | |
| } | |
| } | |
| protected void Page_Load(object sender, EventArgs e) { | |
| RadComboBox cb = CreateCombo(); | |
| AjaxPanel.Controls.Add(cb); | |
| } | |
| RadComboBox CreateCombo() { | |
| RadComboBox cb = new RadComboBox(); | |
| cb.ID = "combo"; | |
| cb.AllowCustomText = true; | |
| cb.EnableLoadOnDemand = true; | |
| cb.EnableVirtualScrolling = true; | |
| cb.ShowMoreResultsBox = true; | |
| cb.ShowToggleImage = true; | |
| cb.HighlightTemplatedItems = true; | |
| cb.MarkFirstMatch = false; | |
| cb.Width = Unit.Pixel(250); | |
| cb.Height = Unit.Pixel(200); | |
| cb.HeaderTemplate = new HeaderTemplate(); | |
| cb.ItemTemplate = new ItemTemplate(); | |
| cb.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(cb_ItemsRequested); | |
| return cb; | |
| } | |
| void cb_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) { | |
| RadComboBox cb = (RadComboBox) o; | |
| int offset = e.NumberOfItems; | |
| DataRow[] rs = Data.Tables[0].Select(String.Format("trannum>={0}", e.Text == String.Empty ? "0" : e.Text)); | |
| DataTable data = new DataTable(); | |
| data = Data.Tables[0].Clone(); | |
| foreach(DataRow r in rs) { | |
| data.ImportRow(r); | |
| } | |
| int itemsPerRequest = 20; | |
| int endOffset = offset + itemsPerRequest; | |
| if(endOffset > data.Rows.Count) { | |
| endOffset = data.Rows.Count; | |
| } | |
| if(endOffset == data.Rows.Count) { | |
| e.EndOfItems = true; | |
| } | |
| else { | |
| e.EndOfItems = false; | |
| } | |
| for(int i = offset;i < offset + itemsPerRequest;i++) { | |
| RadComboBoxItem itm = new RadComboBoxItem(data.Rows[i]["trannum"].ToString()); | |
| cb.Items.Add(itm); | |
| } | |
| if(data.Rows.Count > 0) { | |
| e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), data.Rows.Count.ToString()); | |
| } | |
| else { | |
| e.Message = "No matches"; | |
| } | |
| } | |
| } | |
| public class HeaderTemplate : ITemplate { | |
| void ITemplate.InstantiateIn(Control container) { | |
| Table t = new Table(); | |
| TableRow r = new TableRow(); | |
| TableCell c; | |
| c = new TableCell(); | |
| c.Width = Unit.Pixel(50); | |
| c.Text = "Audit No"; | |
| r.Cells.Add(c); | |
| c = new TableCell(); | |
| c.Width = Unit.Pixel(70); | |
| c.Text = "Date"; | |
| r.Cells.Add(c); | |
| c = new TableCell(); | |
| c.Width = Unit.Pixel(270); | |
| c.Text = "Tenant name"; | |
| r.Cells.Add(c); | |
| t.Rows.Add(r); | |
| container.Controls.Add(t); | |
| } | |
| } | |
| public class ItemTemplate : ITemplate { | |
| void ITemplate.InstantiateIn(Control container) { | |
| Table t = new Table(); | |
| TableRow r = new TableRow(); | |
| TableCell c; | |
| c = new TableCell(); | |
| c.Width = Unit.Pixel(50); | |
| c.Text = (string) DataBinder.Eval((container as RadComboBoxItem).DataItem, "trannum"); | |
| r.Cells.Add(c); | |
| c = new TableCell(); | |
| c.Width = Unit.Pixel(70); | |
| c.Text = (string) DataBinder.Eval((container as RadComboBoxItem).DataItem, "trandate"); | |
| r.Cells.Add(c); | |
| c = new TableCell(); | |
| c.Width = Unit.Pixel(270); | |
| c.Text = (string) DataBinder.Eval((container as RadComboBoxItem).DataItem, "toDbTenant-name"); | |
| r.Cells.Add(c); | |
| t.Rows.Add(r); | |
| container.Controls.Add(t); | |
| } | |
| } | |
| } |

EditMode
="EditForms"
<EditFormSettings EditFormType ="Template" >
<PopUpSettings ScrollBars="None" />
<FormTemplate >
<telerik:RadPanelBar ID="redPanalBar1" runat="server" OnItemClick ="redPanalBar1_ItemClick" OnLoad ="redPanalBar1_Load">
</telerik:RadPanelBar>
</FormTemplate>
</EditFormSettings>
and on serverside
i fired both the events of redpanelbar which are OnLoad and OnItemClick
Like this
protected void redPanalBar1_Load(object sender, EventArgs e)
{
RadPanelBar rdinpan = (sender as RadPanelBar);
if ((ViewState["SelectedValue"] != "") && (ViewState["SelectedValue"] != null))
{
if (rdinpan != null)
{
if (rdinpan.SelectedItem != null)
{
rdinpan.Items[rdinpan.SelectedItem.Index].Controls.Add(Page.LoadControl(
"UserControls/Abc.ascx"));
}
}
}
}
protected void redPanalBar1_ItemClick(object sender, RadPanelBarEventArgs e)
{
RadPanelBar rdinpan = (sender as RadPanelBar);
Session[
"test] = e.Item.Value;
foreach (RadPanelItem item in rdinpan.Items)
{
item.Expanded =
true;
if (e.Item.Value == item.Value)
{
rdinpan.Items[rdinpan.SelectedItem.Index].Controls.Clear();
rdinpan.Items[rdinpan.SelectedItem.Index].Controls.Add(Page.LoadControl(
"UserControls/Abc.ascx"));
rdinpan.Items[rdinpan.SelectedItem.Index].Expanded =
true;
rdinpan.ExpandMode =
PanelBarExpandMode.MultipleExpandedItems;
break;
}
else
{
rdinpan.ExpandMode =
PanelBarExpandMode.MultipleExpandedItems;
}
}
after doing all this i m facing some kind of problem like if i putted the debugger on the itemcommand event of radgrid it works fine with taking this debugger
but if i donot put debugger on the itemcommand and i click addnewrecor link button of the radgrid the application becomes hangs and same thing is happened with the edit button
i also cheked that there is no problem with taking the taxtboxes with in edit template if i removed the redpanelbar.
pls suggest me the soln of the problem..