all,
i'm developing a web page that performs the following.
here's what works without ajax...
1. user enters an parent account identifier in a textbox
2. textbox performs an ajax postback and adds rows to 2 System.Web.UI.WebControls.Table(s) in code.
a. child account selector table
b. another table that displays items that a selected child account can subscribe to.
3. user clicks on child account selector table row.
4. row performs __dopostback() call
5. page is refreshed, the selected child account (table row) is highlighted and the items that the child account can subscribe are displayed. additionally, the items (table rows) the child account has already subscribed to are ghosted (disabled).
i have attempted to ajaxify the row selection of the child account selector table row with no success. it is not necessary but it would give a better user experience. i've looked at telerik help and attempted one of the examples but with no luck. specifically, the example where:
in javascript:
<%=RadAjaxManager.ClientID %>.AjaxRequest(argument
);
and in code behind:
protected void RadAjaxManager_AjaxRequest(object sender, Telerik.WebControls.AjaxRequestEventArgs e)
{
// some code here
}
i've added to the RadAjaxManager.AjaxSettings to the child account selector rows when they are created. i've seen that both the jscript and code behind script is being executed, but none of the behaviors (highlighting etc) are being displayed on the page after the AjaxRequest.
let me know of any insight or forum posts that may address this scenario.
thanks,
lon vinsel
lvinsel@nacsolution.com

| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="Panel1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <div> |
| <asp:Panel ID="Panel1" runat="server" Width="100%" Height="100%"> |
| <uc1:WebUserControl ID="WebUserControl1" runat="server"/> |
| <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> |
| </asp:Panel> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="100%" |
| Width="100%"> |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' |
| style="border: 0px;" /> |
| </telerik:RadAjaxLoadingPanel> |
| </div> |
| </form> |
| <div> |
| <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="Button1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadComboBox2" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManagerProxy> |
| <div> |
| <table> |
| <tr> |
| <td> |
| <telerik:RadComboBox ID="RadComboBox1" runat="server"> |
| <ItemTemplate> |
| <asp:CheckBox ID="chkbxSalesRep" runat="server" EnableViewState="true" Text="abc" /> |
| </ItemTemplate> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| <FooterTemplate> |
| <table> |
| <tr> |
| <td> |
| <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></td> |
| </tr> |
| </table> |
| </FooterTemplate> |
| </telerik:RadComboBox> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBox2" runat="server"> |
| <ItemTemplate> |
| <asp:CheckBox ID="chkbxSalesRep" runat="server" EnableViewState="true" Text="abc" /> |
| </ItemTemplate> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| <Items> |
| <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" /> |
| <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" /> |
| <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" /> |
| <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="RadComboBoxItem4" /> |
| <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem5" Value="RadComboBoxItem5" /> |
| <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem6" Value="RadComboBoxItem6" /> |
| </Items> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"><asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button2_Click" /></td> |
| </tr> |
| </table> |
| </div> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="100%" |
| Width="100%"> |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' |
| style="border: 0px;" /> |
| </telerik:RadAjaxLoadingPanel> |
| </div> |
| // web user control |
| public partial class WebUserControl : System.Web.UI.UserControl |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void Button1_Click(object sender, EventArgs e) |
| { |
| } |
| protected void Button2_Click(object sender, EventArgs e) |
| { |
| } |
| } |
| // the page |
| public partial class _Default : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| } |

Here is my rad grid:
| <radT:RadGrid ID="table" Skin="WebBlue" GridLines="Both" AllowPaging="true" |
| EnableEmbeddedSkins="false" OnPreRender="HighlightRows" PageSize="15" runat="server"> |
| <MasterTableView Width="100%" ClientDataKeyNames="ID,Question" ></MasterTableView> |
| <PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="Change page: {4} | Displaying page {0} of {1}, questions {2} to {3} of {5}" > |
| </PagerStyle> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True" /> |
| <ClientEvents OnRowContextMenu="RowContextMenu" OnRowSelected="ModifyHeader" OnRowMouseOver="test" /> |
| </ClientSettings> |
| </radT:RadGrid> |
| <radT:RadToolTipManager ID="RadToolTipManager1" runat="server" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" |
| RelativeTo="Mouse" Position="BottomLeft" AutoTooltipify="false" |
| Title="Question Preview" ManualClose="true" ShowEvent="OnClick"> |
| </radT:RadToolTipManager> |
My first problem is that I could not get it to work with individual rows here is how i added the rows in the code behind:
| foreach (Telerik.Web.UI.GridDataItem gdi in table.Items) |
| { |
| RadToolTipManager1.TargetControls.Add(gdi.ClientID, true); |
| } |
with this setup the . OnAjaxUpdate event does not fire.
I then tried just adding the whole rad grid to the tooltip manager with this:
<TargetControls><radT:ToolTipTargetControl TargetControlID="table" /></TargetControls>
The problem I had with this is that the OnAjaxUpdate event only fires and the tooltip shows after the table first does an event that causes a postback such as if I change the page index or have ClientSettings-EnablePostBackOnRowClick enabled and do a postback.
Can anyone tell me what I am doing wrong? I do not think I have the latest versions of the controls (I think I have RadControls for ASPNET AJAX Q1 2008), and will have to contact someone else apout updateing. Is this caused from a bug in the control or something I am doing wrong?
| Me.EnableEmbeddedSkins = False |
| Me.Animation = Telerik.Web.UI.ToolTipAnimation.None |
| Me.ContentScrolling = Telerik.Web.UI.ToolTipScrolling.None |
| Me.HideDelay = 5000 |
| Me.Position = Telerik.Web.UI.ToolTipPosition.BottomRight |
| Me.RelativeTo = Telerik.Web.UI.ToolTipRelativeDisplay.Element |
| Me.ShowDelay = 350 |
| Me.ShowCallout = False |
| Me.Sticky = True |
| Me.HideEvent = Telerik.Web.UI.ToolTipHideEvent.LeaveToolTip |
| Me.OnClientBeforeShow = "Tooltip_OnBeforeShow" |
| Client-side: |
| function Tooltip_OnBeforeShow(sender, eventArgs) { |
| var intPosition, intWidth, intHeight; |
| intHeight = document.body.offsetHeight; |
| intWidth = document.body.offsetWidth; |
| if (sender._mouseY <= (intHeight / 3)) |
| { |
| intPosition = 30; |
| } |
| else if ((sender._mouseY <= (intHeight / 3) * 2)) |
| { |
| intPosition = 20; |
| } |
| else if ((sender._mouseY > (intHeight / 3) * 2)) |
| { |
| intPosition = 10; |
| } |
| if (sender._mouseX <= (intWidth / 2)) |
| { |
| intPosition += 3; |
| } |
| else if (sender._mouseX > (intWidth / 2)) |
| { |
| intPosition += 1; |
| } |
| sender.set_position(intPosition); |
| } |