I have a radgrid which is set to "GroupsDefaultExpanded=False" in the MasterTableView. When a user expands one of the groups they can edit a row within that group which opens a radwindow so they can make changes. Once they close the RadWindow and it returns to the original page, all of the groups are back to being collapsed, but the user wants the original group they were working on to remain expanded. I am using vb.net and aspx pages. How can I expand the original group when returning from the RadWindow?
RadWindow Code:
<script type="text/javascript"> function RefreshData(oWnd, eventArgs) { <%=Page.ClientScript.GetPostBackEventReference(btnRefresh, "")%> }</script><telerik:RadWindow ID="rwEditAttendance" Behaviors="Close" VisibleStatusbar="false" AutoSize="true" EnableViewState="false" runat="server" Modal="true" VisibleOnPageLoad="false" OnClientClose="RefreshData" /><asp:Button runat="Server" ID="btnRefresh" style="display:none; width:0px; height:0px;" />
Table code:
<telerik:RadGrid ID="rgAttendanceManager" runat="server" AllowFilteringByColumn="False" AllowSorting="True" ShowGroupPanel="False" AutoGenerateColumns="False" BorderColor="Silver"> <MasterTableView GridLines="None" Width="100%" NoDetailRecordsText="No data matching criteria specified" NoMasterRecordsText="No data matching criteria specified" EnableNoRecordsTemplate="true" DataKeyNames="EmployeeId,EventDate,TimecardCommentId,TCUniqueId,Modified" ShowGroupFooter="true" GroupsDefaultExpanded="false" > <GroupByExpressions > <telerik:GridGroupByExpression > <SelectFields > <telerik:GridGroupByField FieldName="EmployeeName" HeaderValueSeparator="" HeaderText=" " /> </SelectFields> <GroupByFields > <telerik:GridGroupByField FieldName="EmployeeName" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridButtonColumn UniqueName="EditComment" Text="Edit Comment" ButtonType="LinkButton" CommandName="EditComment" /> <telerik:GridDateTimeColumn DataField="EventDate" HeaderText ="Event Date" SortExpression="EventDate" HeaderStyle-Wrap="false" DataFormatString="{0:d}"/> <telerik:GridDateTimeColumn DataField="HistoricalDate" HeaderText ="Historical Date" SortExpression="HistoricalDate" HeaderStyle-Wrap="false" DataFormatString="{0:d}"/> <telerik:GridBoundColumn DataField="PaycodeName" HeaderText="Paycode Name" SortExpression="PaycodeName" ItemStyle-Wrap="false" /> <telerik:GridBoundColumn DataField="CommentText" HeaderText="Comment Text" SortExpression="CommentText" ItemStyle-Wrap="false" /> <telerik:GridNumericColumn DataField="CommentValue" HeaderText="Comment Value" HeaderStyle-Wrap="false" DataType="System.Decimal" AllowRounding="false" DecimalDigits="2" Aggregate="Sum" FooterText="Total Attendance Score: "/> <telerik:GridDateTimeColumn DataField="PunchIn" HeaderText ="Punch In" SortExpression="PunchIn" HeaderStyle-Wrap="false" DataFormatString="{0:MM/dd/yyyy HH:mm}"/> <telerik:GridDateTimeColumn DataField="PunchOut" HeaderText ="Punch Out" SortExpression="PunchOut" HeaderStyle-Wrap="false" DataFormatString="{0:MM/dd/yyyy HH:mm}"/> <telerik:GridCheckBoxColumn HeaderText="Modified" DataField="Modified" HeaderStyle-Wrap="false" /> </Columns> </MasterTableView></telerik:RadGrid>
