Hello;
I’ve tried to implement something similar on your demo sitefor radxmlhttp employee lookup as a webpart on sharepoint.
My problem is that once I run the "sort" or the "paging" function(this is ajaxified, just like it is on the site), then the ClientEvents-OnRowSelected Doesn’t fire anymore. However as long as I dont use those functions, the event fires perfectly and calls the javascript method. This works perfectly if I deploythis as a web application, but as a webpart in sharepoint I’m having thisissue. Are there any known cases of thishappening?
Here is the code
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="lookup2.ascx.cs" Inherits="namespace1.lookup2, namespace1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55fefdf725d04c54" %> |
<%@ Register Assembly="Telerik.Web.UI, Version=2009.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" |
Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> |
<script type="text/javascript"> |
function rowSelected(sender, args) |
{ |
var key = args.getDataKeyValue("Loginname"); |
var panel = $find("<%=RadXmlHttpPanel1.ClientID %>"); |
panel.set_value(key); |
} |
</script> |
</telerik:RadScriptBlock> |
<style type="text/css"> |
.divContainer |
{ |
background: url('_layouts\images\snps\main_back.png') no-repeat; |
width: 100%; |
height: 400px; |
position: relative; |
} |
.divGrid, .divXmlHttpPanel |
{ |
position: absolute; |
top: 86px; |
} |
.divXmlHttpPanel |
{ |
top: 132px; |
left: 390px; |
} |
.rgInfoPart |
{ |
display: none !important; |
} |
.title |
{ |
font-size: 12px; |
color: #606060; |
} |
.info |
{ |
color: black; |
font-size: 12px; |
} |
.BODY { |
FONT-SIZE: 62.5%; |
FONT-FAMILY: "segoe ui",arial,sans-serif} |
</style> |
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Hay" /> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadGrid1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Hay"> |
</telerik:RadAjaxLoadingPanel> |
<table> |
<tr> |
<td> |
Search by first name: |
</td> |
<td> |
<telerik:RadTextBox ID="RadTextBox1" runat="server"> |
</telerik:RadTextBox> |
</td> |
<td> |
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" Text="Button" /> |
</td> |
</tr> |
<tr> |
<td> |
Search by last name: |
</td> |
<td> |
<telerik:RadTextBox ID="RadTextBox2" runat="server"> |
</telerik:RadTextBox> |
</td> |
<td> |
<asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button2_Click" /> |
</td> |
</tr> |
<tr> |
<td> |
Search by login name: |
</td> |
<td> |
<telerik:RadTextBox ID="RadTextBox3" runat="server"> |
</telerik:RadTextBox> |
</td> |
<td> |
<asp:Button ID="Button3" runat="server" Text="Button" OnClick="Button3_Click" /> |
</td> |
</tr> |
</table> |
<div class="divContainer"> |
<div class="divGrid"> |
<telerik:RadGrid ID="RadGrid1" Skin="Hay" OnNeedDataSource="RadGrid1_NeedDataSource" |
Width="370px" AllowPaging="true" PageSize="10" AllowSorting="True" runat="server" |
AutoGenerateColumns="false" GridLines="None"> |
<MasterTableView ClientDataKeyNames="Loginname" Width="100%" Summary="RadGrid table"> |
<Columns> |
<telerik:GridBoundColumn DataField="Loginname" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn HeaderText="FirstName" DataField="FirstName" UniqueName="FirstName"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn HeaderText="LastName" DataField="LastName" UniqueName="LastName"> |
</telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<PagerStyle Mode="NumericPages" /> |
<ClientSettings EnableRowHoverStyle="true" Selecting-AllowRowSelect="true" ClientEvents-OnRowSelected="rowSelected"> |
</ClientSettings> |
</telerik:RadGrid> |
</div> |
<div class="divXmlHttpPanel"> |
<telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="XmlHttpPanel_ServiceRequest" |
RenderMode="Block"> |
<asp:Repeater ID="Repeater1" runat="server"> |
<ItemTemplate> |
<div style="float: left; border: 1px solid #999999; margin-right: 15px; width: 180px; |
height: 220px; background-position: center; background-repeat: no-repeat; background-image: url('<%# Eval("Loginname", "http://lookup/CCMCIP/moc/photograb2.cgi?userid={0}") %>');"> |
</div> |
<div style="float: left;"> |
<br /> |
<br /> |
<br /> |
<div style="text-align: center;"> |
<asp:Label CssClass="info" ID="Name" runat="server" Style="font-size: x-large;"> |
<%# Eval("FirstName")%> <%# Eval("LastName")%></asp:Label><br /> |
<asp:Label CssClass="info" ID="Label1" runat="server"><%# Eval("PersonnelTitle")%></asp:Label> |
</div> |
<br /> |
<br /> |
<div style="float: left; text-align: right;"> |
<span class="title">Login Name:</span> |
<br /> |
<br /> |
<span class="title">Phone:</span> |
<br /> |
<br /> |
<span class="title">Mobile:</span> |
<br /> |
<br /> |
<span class="title">Email:</span> |
<br /> |
<br /> |
</div> |
<div style="float: left; margin-left: 5px;"> |
<asp:Label CssClass="info" ID="cName" runat="server"> <%# Eval("Loginname")%></asp:Label> |
<br /> |
<br /> |
<asp:Label CssClass="info" ID="Label2" runat="server"> <%# Eval("Phone")%></asp:Label> |
<br /> |
<br /> |
<asp:Label CssClass="info" ID="Label3" runat="server"> <%# Eval("Mobile")%></asp:Label> |
<br /> |
<br /> |
<asp:Label CssClass="info" ID="Label4" runat="server"> <%# Eval("Email")%></asp:Label> |
<br /> |
<br /> |
<a href="<%# Eval("LoginName", "http://lookup/lookup/ph-org.cgi?query=email={0}") %>" |
target="_blank">More Detail...</a> |
</div> |
</div> |
</ItemTemplate> |
</asp:Repeater> |
</telerik:RadXmlHttpPanel> |
</div> |
</div> |
Thanks
Charles