RadAjaxManager
.GetCurrent(this.Page).ResponseScripts.Add("radopen(null,\"dlgTest\");");
The first time I run it I get the following error:
Sys.WebForms.PageRequestManagerParserErrorException: The message received From the server could not be, parsed. Common causes for this error are when the response is modiFied by calls to Response.WriteO, response filters, HttpModules, or server trace is enabled
Details: Error parsing near 'play:none;”>/span>|<html>
<head>
'.
Every time I select a row in the grid after cancelling this message, the dialog will load but the data does not change after the first time it loads.
Does anyone have any suggestions or sample of how I could do this? Following is a link to a test project where I've been able to reproduce the problem:
http://sites.google.com/site/pbbgso/Home/TelerikGridTest.zip?attredirects=0
Just click on one of the link buttons in the grid to get the error. This is where I'd like to launch the window.
| January, 2009 | 51 |
| December, 2008 | 93 |
| July, 2008 | 33 |
| June, 2008 | 4 |
| March, 2008 | 9 |
| February, 2008 | 46 |
| January, 2008 | 44 |
| December, 2007 | 45 |
| November, 2007 | 70 |
| October, 2007 | 111 |
| September, 2007 | 104 |
| August, 2007 | 33 |
| July, 2007 | 4 |
| <telerik:RadGrid ID="gridSummary" runat="server" AutoGenerateColumns="False" |
| GridLines="None" ShowFooter="True" Skin="WebBlue" Width="300px"> |
| <HeaderContextMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"> |
| </CollapseAnimation> |
| </HeaderContextMenu> |
| <HeaderStyle Width="150px" /> |
| <MasterTableView> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridHyperLinkColumn DataNavigateUrlFields="yr,mo" |
| DataNavigateUrlFormatString="usagedata.aspx?typ=detail&yr={0}&mo={1}" |
| DataTextField="periodname" UniqueName="period"> |
| <HeaderStyle HorizontalAlign="Right" /> |
| <ItemStyle HorizontalAlign="Right" /> |
| </telerik:GridHyperLinkColumn> |
| <telerik:GridNumericColumn DataField="logons" Aggregate="Sum" |
| FooterAggregateFormatString="{0} total logons" HeaderText="# of Logons" |
| NumericType="Number" UniqueName="logons1"> |
| </telerik:GridNumericColumn> |
| </Columns> |
| </MasterTableView> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"> |
| </CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |
Hi
I customized the editor tools with a config similar with the one below (only a little longer):
<Tools>
<telerik:EditorToolGroup DockingZone="Bottom" >
<telerik:EditorTool Name="AbsolutePosition" ShowIcon="true" />
<telerik:EditorTool Name="TrackChangesDialog" Enabled="true" ShowIcon="true" />
</telerik:EditorToolGroup>
</Tools>
My problem is that I don't know how what are the settings to make the words and charater count visible and also
the html hierarchy (Ex: UL > LI > STRONG > EM > U > STRIKE > FONT > FONT > RemoveElement).
If I don't do any settings they are visible.
PS: telerik:EditorToolGroup DockingZone="Bottom" DockingZone attribute is not visible in the VS2005 designer.
I use VS2005 + telerik Q3 2008 (I'll update to 2009 as soon as I have some time ).
| If Not IsDBNull(myreader("rollovertext")) Then |
| Dim tooltip As New Telerik.Web.UI.RadToolTip |
| Dim qimage As New System.Web.UI.WebControls.Image |
| Dim imgname As String |
| imgname = "img" & CStr(myreader("CalcOrderID")) |
| With qimage |
| .ImageUrl = CStr(myreader("ImgPath")) |
| .ID = imgname |
| End With |
| With tooltip |
| .ID = "tooltip" & CStr(myreader("CalcOrderID")) |
| .TargetControlID = qimage.id |
| .Text = CStr(myreader("rollovertext")) |
| .Width = "150" |
| .AutoCloseDelay = 10000 |
| .Skin = "Web20" |
| .Position = ToolTipPosition.MiddleRight |
| .OffsetY = 0 |
| .OffsetX = 10 |
| .ShowDelay = 300 |
| End With |
| helpcell.Controls.Add(qimage) |
| helpcell.Controls.Add(tooltip) |
| End If |
| <img id="img2" src="images/qmark16.png" style="border-width:0px;" /><div id="tooltip2" style="display:none;"> |
| <input id="tooltip2_ClientState" name="tooltip2_ClientState" type="hidden" /> |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadToolTip, {"autoCloseDelay":10000,"clientStateFieldID":"tooltip2_ClientState","formID":"form1","offsetX":10,"offsetY":0,"position":23,"showDelay":300,"skin":"Web20","targetControlID":"img2","text":"roll 3","width":"150px"}, null, null, $get("tooltip2")); |
| }); |
Hello,
In my webpage I try to add a user control into RadPanelBar during ItemDataBound event. The user control showed up correctly after the 1st page load, but if user do post back the adding control is disappeared. I figured it could be related to viewstate mismatch, so I try give control a unique ID but problem still persist.
Any help is very appreciated!
Here is my test page code: http://209.200.250.235/Dynamic_panelbar_test.zip
Thanks.
(test.aspx)
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="test" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%; width: 100%; margin: 0px; | |
| padding: 0px; overflow: hidden;"> | |
| <head runat="server"> | |
| <title></title> | |
| </head> | |
| <body style="height: 100%; width: 100%; margin: 0px; padding: 0px; overflow: hidden;"> | |
| <form runat="server"> | |
| <telerik:RadScriptManager ID="uxRadScriptManager" runat="server"> | |
| </telerik:RadScriptManager> | |
| <telerik:RadAjaxManager ID="uxRadAjaxManager" runat="server"> | |
| </telerik:RadAjaxManager> | |
| <telerik:RadPanelBar ID="uxRadMenuBarML" runat="server" BorderStyle="None" BorderWidth="0px" Height="372px" | |
| PersistStateInCookie="True" Width="400px" OnItemDataBound="uxRadMenuBarML_ItemDataBound" | |
| OnItemClick="uxRadMenuBarML_ItemClick" Style="" Skin="Office2007" EnableEmbeddedSkins="true"> | |
| </telerik:RadPanelBar> | |
| </form> | |
| </body> | |
| </html> | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.UI; | |
| using System.Web.UI.WebControls; | |
| using Telerik.Web.UI; | |
| using System.Globalization; | |
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "test")] | |
| public partial class test : System.Web.UI.Page | |
| { | |
| private List<LFMenuBarDataItem> _menuBarDataItem; | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| //enable AJAX update on PanelBar | |
| RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(this.uxRadMenuBarML, this.uxRadMenuBarML); | |
| } | |
| protected override void OnInit(EventArgs e) | |
| { | |
| base.OnInit(e); | |
| _menuBarDataItem = new List<LFMenuBarDataItem>(); | |
| //----------- | |
| AddMenuBarItem(0, "Search", "~/UCSearch.ascx"); | |
| AddMenuBarItem(1, null, "Home", "", "", false, false); | |
| AddMenuBarItem(2, null, "My Inbox", "", "", false, false); | |
| AddMenuBarItem(3, 1, "dummy item 1", "", "", false, false); | |
| AddMenuBarItem(4, 2, "dummy item 2", "", "", false, false); | |
| //----------- | |
| uxRadMenuBarML.DataTextField = "Title"; | |
| uxRadMenuBarML.DataFieldID = "ID"; | |
| uxRadMenuBarML.DataFieldParentID = "ParentID"; | |
| uxRadMenuBarML.DataSource = _menuBarDataItem; | |
| uxRadMenuBarML.DataBind(); | |
| } | |
| /// <summary> | |
| /// Adds the menu bar item. (used by presenter to set menu items) | |
| /// </summary> | |
| /// <param name="id">The id.</param> | |
| /// <param name="parentId">The parent id.</param> | |
| /// <param name="title">The title.</param> | |
| /// <param name="userControlPath">The user control path.</param> | |
| /// <param name="imagePath">The left side image path.</param> | |
| /// <param name="isPinDisplayed">if set to <c>true</c> [current pin is displayed].</param> | |
| /// <param name="isMenuExpanded">if set to <c>true</c> [current menu is expanded].</param> | |
| public void AddMenuBarItem(int id, int? parentId, string title, string userControlPath, string imagePath, bool isPinDisplayed, bool isMenuExpanded) | |
| { | |
| LFMenuBarDataItem menuBarDataItem = new LFMenuBarDataItem | |
| { | |
| Id = id, | |
| ParentId = parentId, | |
| Title = title, | |
| PagePath = userControlPath, | |
| ImagePath = imagePath, | |
| IsPinDisplayed = isPinDisplayed, | |
| IsMenuExpanded = isMenuExpanded, | |
| IsNestedUserControl = false | |
| }; | |
| _menuBarDataItem.Add(menuBarDataItem); | |
| } | |
| /// <summary> | |
| /// Adds the menu bar item. (used by presenter to set menu items) | |
| /// -this overload is used to install nested user control menu item | |
| /// </summary> | |
| /// <param name="id">The id.</param> | |
| /// <param name="nestUserControlPath">The nest user control path.</param> | |
| public void AddMenuBarItem(int id, string title, string nestUserControlPath) | |
| { | |
| LFMenuBarDataItem menuBarDataItem = new LFMenuBarDataItem | |
| { | |
| Id = id, | |
| Title = title, | |
| NestedUserControlPath = nestUserControlPath, | |
| IsNestedUserControl = true | |
| }; | |
| _menuBarDataItem.Add(menuBarDataItem); | |
| } | |
| /// <summary> | |
| /// Handles the ItemClick event of the uxRadMenuBarML control. | |
| /// </summary> | |
| /// <param name="sender">The source of the event.</param> | |
| /// <param name="e">The <see cref="Telerik.Web.UI.RadPanelBarEventArgs"/> instance containing the event data.</param> | |
| protected void uxRadMenuBarML_ItemClick(object sender, RadPanelBarEventArgs e) | |
| { | |
| } | |
| /// <summary> | |
| /// Handles the ItemDataBound event of the uxRadMenuBarML control. | |
| /// </summary> | |
| /// <param name="sender">The source of the event.</param> | |
| /// <param name="e">The <see cref="Telerik.Web.UI.RadPanelBarEventArgs"/> instance containing the event data.</param> | |
| protected void uxRadMenuBarML_ItemDataBound(object sender, RadPanelBarEventArgs e) | |
| { | |
| LFMenuBarDataItem item = (LFMenuBarDataItem)e.Item.DataItem; | |
| if (item.IsNestedUserControl) // nested user control | |
| { | |
| //Control ctl = Page.LoadControl(item.NestedUserControlPath); // load user control | |
| Button ctl = new Button(); // here we create a dummy button control for test | |
| ctl.Text = "I am a test button. Click me and I should not disappear"; | |
| ctl.ID = "TestButton" + Guid.NewGuid().ToString(); | |
| RadPanelItem radPanelItem = new RadPanelItem(); | |
| radPanelItem.Controls.Add(ctl); | |
| e.Item.Items.Clear(); | |
| e.Item.Items.Add(radPanelItem); | |
| } | |
| else // normal menubar item | |
| { | |
| e.Item.ImageUrl = item.ImagePath; | |
| } | |
| e.Item.Value = item.Id.ToString(CultureInfo.InvariantCulture); | |
| e.Item.Expanded = item.IsMenuExpanded; | |
| } | |
| /// <summary> | |
| /// Data class stores menu bar data item | |
| /// </summary> | |
| internal class LFMenuBarDataItem | |
| { | |
| public bool IsNestedUserControl | |
| { | |
| get; | |
| set; | |
| } | |
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |
| public bool IsPinDisplayed | |
| { | |
| get; | |
| set; | |
| } | |
| public bool IsMenuExpanded | |
| { | |
| get; | |
| set; | |
| } | |
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |
| public string Title | |
| { | |
| get; | |
| set; | |
| } | |
| public int Id | |
| { | |
| get; | |
| set; | |
| } | |
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |
| public int? ParentId | |
| { | |
| get; | |
| set; | |
| } | |
| public string ImagePath | |
| { | |
| get; | |
| set; | |
| } | |
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |
| public string PagePath | |
| { | |
| get; | |
| set; | |
| } | |
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |
| public string NestedUserControlPath | |
| { | |
| get; | |
| set; | |
| } | |
| } | |
| } | |
| //------------------------------------------------------------------------------ | |
| // <auto-generated> | |
| // This code was generated by a tool. | |
| // Runtime Version:2.0.50727.3053 | |
| // | |
| // Changes to this file may cause incorrect behavior and will be lost if | |
| // the code is regenerated. | |
| // </auto-generated> | |
| //------------------------------------------------------------------------------ | |
| public partial class test { | |
| /// <summary> | |
| /// uxRadScriptManager control. | |
| /// </summary> | |
| /// <remarks> | |
| /// Auto-generated field. | |
| /// To modify move field declaration from designer file to code-behind file. | |
| /// </remarks> | |
| protected global::Telerik.Web.UI.RadScriptManager uxRadScriptManager; | |
| /// <summary> | |
| /// uxRadAjaxManager control. | |
| /// </summary> | |
| /// <remarks> | |
| /// Auto-generated field. | |
| /// To modify move field declaration from designer file to code-behind file. | |
| /// </remarks> | |
| protected global::Telerik.Web.UI.RadAjaxManager uxRadAjaxManager; | |
| /// <summary> | |
| /// uxRadMenuBarML control. | |
| /// </summary> | |
| /// <remarks> | |
| /// Auto-generated field. | |
| /// To modify move field declaration from designer file to code-behind file. | |
| /// </remarks> | |
| protected global::Telerik.Web.UI.RadPanelBar uxRadMenuBarML; | |
| } | |