Hi,
I am having issue with Telerik Radgrid when placed with in asp:Loginview control.
The grid has Radmenu items as template column. Grid is ajaxified using RadAjaxManager. Grid allows sorting.
The problem is, when I sort a column, the radmenu items do not show.
If I don't place the grid in Loginview, everything works fine.
I would apperciate help on this.
Thanks,
Manisha
Here is the code...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGridTesting.aspx.cs" Inherits="RadGridTesting"%> |
<%@ 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"> |
<head runat="server"> |
<title></title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<br /> |
<asp:LoginView ID="LoginView1" runat="server"> |
<LoggedInTemplate> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="rgCustomers"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="rgCustomers" LoadingPanelID="rlpDefault" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadAjaxLoadingPanel ID="rlpDefault" runat="server" Skin="Web20" /> |
<telerik:RadGrid ID="rgCustomers" runat="server" Width="100%" AutoGenerateColumns="false" |
Skin="Web20" DataSourceID ="SqlDSCustomers" |
AllowPaging="true" PageSize="10" PagerStyle-AlwaysVisible="false" PagerStyle-Position="TopAndBottom" |
PagerStyle-Mode="NextPrevAndNumeric" AllowSorting="true" AllowMultiRowSelection="true" |
OnItemDataBound="rgCustomers_ItemDataBound" OnNeedDataSource="rgCustomers_NeedDataSource"> |
<MasterTableView Width="100%" GridLines="Both" DataKeyNames="CustomerID"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridTemplateColumn HeaderText="PD Action" Visible="true" HeaderStyle-Width="55px" ItemStyle-Width="55px"> |
<ItemTemplate> |
<telerik:RadMenu ID="rmPDAction" runat="server" ItemClick="rmPDAction_ItemClick"> |
<Items> |
<telerik:RadMenuItem ImageUrl="~/App_Themes/Images/RAD/Menu/down.png" Width="30px" Height="24px"> |
<Items> |
<telerik:RadMenuItem Text="View" Value="View" /> |
<telerik:RadMenuItem Text="Edit" Value="Edit" /> |
<telerik:RadMenuItem Text="Continue Edit" Value="ContinueEdit" /> |
<telerik:RadMenuItem Text="Finish Edit" Value="FinishEdit" /> |
</Items> |
</telerik:RadMenuItem> |
</Items> |
</telerik:RadMenu> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn DataField ="CustomerID" HeaderText ="ID" UniqueName ="CustomerID" DataType="System.Int32" AllowSorting="true" SortExpression="CustomerID" ></telerik:GridBoundColumn> |
<telerik:GridBoundColumn HeaderText ="First Name" DataField ="FirstName" UniqueName ="FirstName" DataType="System.String" AllowSorting="true" SortExpression="FirstName"></telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |
<asp:SqlDataSource ID="SqlDSCustomers" runat="server" |
ConnectionString="<%$ ConnectionStrings:AdventureWorksLT2008R2cnn %>" |
SelectCommand="SELECT [CustomerID], [FirstName], [LastName], [CompanyName], [EmailAddress], [Phone] FROM [vw_Customers]"></asp:SqlDataSource> </LoggedInTemplate> |
<AnonymousTemplate> |
<asp:Literal ID="litLoginMsg" runat="server" Text="Please login"></asp:Literal> |
</AnonymousTemplate> |
</asp:LoginView> |
</form> |
</body> |
</html> |