Hello!
Setup:
When I expand any of the top/1st level groups, I am expecting that the child/2nd level groups are shown expanded/collapsed based on their Expanded property. Instead what happens is that the child/2nd level groups are all shown as expanded.
Is this behavior expected or is there a fix/workaround that you can provide?
Thanks in advance,
Brent
<tlr:RadGrid runat="server" ID="grdDoubleGroupings" AutoGenerateColumns="true" AllowSorting="true" OnNeedDataSource="grdDoubleGroupings_NeedDataSource"> <MasterTableView GroupLoadMode="Client" AllowMultiColumnSorting="true" AllowNaturalSort="false" GroupsDefaultExpanded="false" > <GroupByExpressions> <tlr:GridGroupByExpression> <GroupByFields> <tlr:GridGroupByField FieldName="Category" /> </GroupByFields> <SelectFields> <tlr:GridGroupByField FieldName="Category" /> </SelectFields> </tlr:GridGroupByExpression> <tlr:GridGroupByExpression> <GroupByFields> <tlr:GridGroupByField FieldName="Subcategory" /> </GroupByFields> <SelectFields> <tlr:GridGroupByField FieldName="Category" /> <tlr:GridGroupByField FieldName="Subcategory" /> </SelectFields> </tlr:GridGroupByExpression> </GroupByExpressions> </MasterTableView> </tlr:RadGrid>| <tr> |
| <td> |
| <asp:TextBox ID="txtDT" runat="server" /> |
| <asp:Label ID="lblDT" runat="server" /> |
| </td> |
| </tr> |
| String dt = DateTime.Now.ToLongTimeString(); |
| txtDT.Text = dt; |
| lblDT.Text = dt; |
| panel.Update(); |
<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" MinDisplayTime="500" Transparency="25" BackColor="#ffffff" runat="server" CssClass="ajaxloader" />
<telerik:RadGrid ID="RadGrid1" runat="server"
AllowSorting="True" GridLines="None"
AutoGenerateColumns="false"
OnNeedDataSource="RadGrid1_NeedDataSource">
<MasterTableView Width="100%" DataKeyNames="Id">
<Columns>
<telerik:GridClientSelectColumn UniqueName="ClientSelect" HeaderStyle-Width="5%" />
<telerik:GridBoundColumn DataField="DisplayName" HeaderText="Name" UniqueName="DisplayName" DataType="System.String" HeaderStyle-Width="20%" />
<telerik:GridBoundColumn DataField="FileDateTime" HeaderText="Created Date/Time" UniqueName="Created" DataType="System.DateTime" HeaderStyle-Width="20%" DataFormatString="{0:MM/dd/yy hh:mm tt}" />
<telerik:GridBoundColumn DataField="LastSentDateTime" HeaderText="Last Used" UniqueName="Sent" DataType="System.DateTime" HeaderStyle-Width="20%" DataFormatString="{0:MM/dd/yy hh:mm tt}" />
<telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="30%" HeaderText="Message Type" AllowFiltering="false" UniqueName="MessageFormat" SortExpression="MessageFormat">
<ItemTemplate>
<asp:ImageButton ID="ibtnPhone" runat="server" ImageUrl="~/Images/pc_icon_phone.gif" CommandName="ListenPhone" ToolTip="Listen to message" />
<asp:ImageButton ID="ibtnSMS" runat="server" ImageUrl="~/Images/pc_icon_txt.gif" CommandName="ViewSMS" ToolTip="View SMS Message" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/EPSDev3.master" AutoEventWireup="true" CodeFile="PetitionInfo.aspx.cs" Inherits="PetitionInfo" %><asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"><style type="text/css"> .VerticalAlign1 { padding-top: 6px; } .style1 { height: 31px; } .RadGrid_Default .rgHeaderDiv { width: 785px !important; } .RadGrid_Default .rgFooterDiv { width: 785px !important; }</style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <!-- content start --> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="SignersGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="SignersGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" AlternateText="Loading..." Skin="Black" runat="server" /> <div style="width: 800px;"> <div style="float: left; background-color: White; padding: 0px;"> <table cellpadding="1" cellspacing="0" border="0" > <tr> <td colspan="5" align="center" > <h2> <asp:Label ID="VoterAuthenticationLabel" runat="server" Text="<%$ Resources:Resource, PetitionInformationLabel %>"></asp:Label> </h2> </td> </tr> <tr> <td width="2%"> </td> <td width="47%" valign="top"> <table > <tr> <td colspan="2" align="left" style="font-weight: normal; height: 12px;"> <asp:Label ID="Label6" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, CandidateInformationLabel%>"></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="CycleLabel" runat="server" Text="<%$ Resources:Resource, CycleLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="ElectionCycleList" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, RaceLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="PoliticalRaceList" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="CandidateName" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Resource, AddressLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="CandidateAddress" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Resource, CityStZipLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="CandidateCity" runat="server" Text=""></asp:Label> <asp:Label ID="CandidateState" runat="server" Text=""></asp:Label> <asp:Label ID="CandidateZipCode" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label5" runat="server" Text="<%$ Resources:Resource, CountyLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="CandidateCountyList" runat="server" Text=""></asp:Label> </td> </tr> </table> </td> <td width="2%"> </td> <td width="47%" valign="top"> <table width="100%"> <tr> <td colspan="2" align="left" style="font-weight: normal; height: 12px;"> <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, ContactInformationLabel%>"></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label8" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="ContactName" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label9" runat="server" Text="<%$ Resources:Resource, PhoneLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="ContactPhone" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label10" runat="server" Text="<%$ Resources:Resource, EmailLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="ContactEmailAddress" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label11" runat="server" Text="<%$ Resources:Resource, WebSiteLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="ContactWebSiteURL" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="Label16" runat="server" Text="<%$ Resources:Resource, LinkToLabel %>"></asp:Label> </td> <td align="left"> <asp:Label ID="LinkToURL" runat="server" Text=""></asp:Label> </td> </tr> </table> </td> <td width="2%"> </td> </tr> <tr> <td colspan="5"> </td> </tr> <tr > <td> </td> <td align="center" valign="middle" colspan="3" > <asp:Label CssClass="VerticalAlign1" ID="PetitionsListTitle" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, PetitionSignersLabel %>"></asp:Label> </td> <td> </td> </tr> <tr> <td width="2%"> </td> <td colspan="3" valign="middle"> <telerik:RadGrid AutoGenerateColumns="false" ID="SignersGrid" runat="server" Width="785px" AllowSorting="true" AllowFilteringByColumn="true" EnableLinqExpressions="true" AllowPaging="false" PageSize="15" CommandItemDisplay="Bottom" BorderWidth="1px" BorderColor="#999999" EnableEmbeddedSkins="true" Skin="Default" DataSourceID="SQLDataSource1" ShowStatusBar="true" ShowFooter="false" GridLines="None" > <PagerStyle Mode="NextPrevAndNumeric" /> <GroupingSettings CaseSensitive="false" /> <StatusBarSettings ReadyText="Ready" LoadingText="Loading..." /> <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True" ShowFooter="True" TableLayout="Auto"> <Columns> <telerik:GridBoundColumn HeaderStyle-Width="150px" HeaderText="First Name" UniqueName="FirstName" DataField="FirstName" SortExpression="FirstName" > </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="150px" UniqueName="LastName" HeaderText="Last Name" DataField="LastName" SortExpression="LastName" > </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="350px" UniqueName="VoterAddress" HeaderText="Address" DataField="Address" SortExpression="Address" > </telerik:GridBoundColumn > <telerik:GridButtonColumn CommandName="RemoveSigner" HeaderStyle-Width="135px" UniqueName="RemoveSigner" HeaderText="Remove" ButtonType="PushButton" Text="Remove" ConfirmText="Are you certain that you want to remove this signature?" > </telerik:GridButtonColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> </ClientSettings> </telerik:RadGrid> </td> <td width="2%"> </td> </tr> <tr> <td colspan="5" align="center" > <asp:Label ID="Label17" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td colspan="5" align="center" > <asp:Label ID="SignatureCountMessage" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td colspan="5" align="center" > <asp:Label ID="Label18" runat="server" Text=""></asp:Label> </td> </tr> <tr> <td colspan="5" align="center" > </td> </tr> <tr > <td> </td> <td align="center" valign="middle" colspan="3" > <asp:Label CssClass="VerticalAlign1" ID="Label14" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, CloseAndPrintLabel %>"></asp:Label> </td> <td> </td> </tr> <tr> <td colspan="5" align="center" > </td> </tr> <tr> <td colspan="5" align="center" > <asp:Button ID="ReturnToMyDocs" runat="server" TabIndex="6" Text="<%$ Resources:Resource, ReturnToMyEDocs %>" onclick="ReturnToMyDocs_Click" /> <asp:Button ID="ClosePetitionButton" TabIndex="7" runat="server" Text="<%$ Resources:Resource, ClosePetitionBtn %>" /> <asp:Button ID="PrintListButton" TabIndex="8" runat="server" Text="<%$ Resources:Resource, PrintListBtn %>" /> <asp:Button ID="PrintForFilingButton" TabIndex="9" runat="server" Text="<%$ Resources:Resource, PrintForFilingBtn %>" /> </td> </tr> <tr> <td colspan="5" align="center" > </td> </tr> </table> </div> <div class="clear"> </div> </div> <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ElectronicPetitionSystemConnectionString %>" ProviderName="System.Data.SqlClient" runat="server"> </asp:SqlDataSource></asp:Content>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.Configuration;using System.Data;using System.Data.SqlClient;public partial class PetitionInfo : System.Web.UI.Page{ protected void Page_Init(object sender, EventArgs e) { // Set the sql statement for the sql data source string griddatasource = "SELECT VoterSignatureId, PetitionId, LastName, FirstName, MiddleName, NameSuffix, [Address], CountyId, Email, SignatureImage, CountyVoterId, "; griddatasource = griddatasource + "MvdSerialNumber, DateSigned, ClientIpAddress, VoterSignatureStatusId, CreatedDate, ModifiedDate "; griddatasource = griddatasource + "FROM VoterSignatures "; string gridWHERE = "WHERE PetitionId = " + Request.QueryString["PID"]; SqlDataSource1.SelectCommand = griddatasource + gridWHERE; } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["PID"].Length > 0) { Int32 iMyKeyValue = Convert.ToInt32(Request.QueryString["PID"]); ElectronicPetitionSystemDataContext efdc = new ElectronicPetitionSystemDataContext(); var petn = (from pe in efdc.Misc_GetPetitionInfo(iMyKeyValue) select pe).First(); // First display the individual fields at the top of the screen this.ElectionCycleList.Text = petn.CycleName; this.PoliticalRaceList.Text = petn.OfficeDescription; this.CandidateName.Text = petn.CandidateDisplayName; this.CandidateAddress.Text = petn.Address1; this.CandidateCity.Text = petn.City; this.CandidateState.Text = petn.State; this.CandidateZipCode.Text = petn.Zip; this.CandidateCountyList.Text = petn.CountyName; this.ContactName.Text = petn.ContactDisplayName; this.ContactPhone.Text = petn.ContactPhone; this.ContactEmailAddress.Text = petn.ContactEmail; this.ContactWebSiteURL.Text = petn.ContactLink; this.LinkToURL.Text = Convert.ToString(petn.DeepLinkGuid); } } SignatureCountMessage.Text = "(" + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave1") + " nn " + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave2") + " nnnn " + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave3") + ")"; } // Telerik grid sample with filtering, etc. // // // The following link may be a better example for the SQL/filtering handling protected void ReturnToMyDocs_Click(object sender, EventArgs e) { Response.Redirect("MyeDocs.aspx"); }}