title: can't expand (and keep expanded), the detail table for my radgrid.
body: <p>I'm using a telerik radgrid.  I want to expand the item that is currently being edited to show detail. I have created a function to fire when the OnCommand event occurs.  What happens is the details expand, and then contract again!  It doesn't matter how I set the HierarchyLoadMode for the master or details, I've tried every setting I can think of and it still won't stay expanded when the master data item goes into edit mode.</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
  CodeBehind="Users.aspx.cs" Inherits="WebCallManagerData.Account.Users" %&gt;
  
  &lt;%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %&gt;
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"&gt;
      &lt;script type="text/javascript"&gt;
          function OnCommand(sender, args)
          {
  
              if (args.get_commandName() == 'Edit')
              {
                  rowIndex = args.get_commandArgument();
                  var radGrid = $find("&lt;%= rgUsers.ClientID %&gt;");
                  var dataItem = radGrid.get_masterTableView().get_dataItems()[rowIndex];
                  dataItem.set_expanded(true);
  
              }
              else if (args.get_commandName() == 'ExpandCollapse')
              {
                  //dumpObject(args);
              }
  
          }
  
      &lt;/script&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
      &lt;asp:Label ForeColor="Red" Text="" ID="DisplayMessage1" runat="server" /&gt;
      &lt;telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"&gt;
          &lt;AjaxSettings&gt;
              &lt;telerik:AjaxSetting AjaxControlID="rgUsers"&gt;
              &lt;/telerik:AjaxSetting&gt;
          &lt;/AjaxSettings&gt;
      &lt;/telerik:RadAjaxManagerProxy&gt;
      &lt;telerik:RadGrid ID="rgUsers" runat="server" CellSpacing="0" DataSourceID="odsUsers"
          GridLines="None" AutoGenerateColumns="False"&gt;
          &lt;ClientSettings&gt;
              &lt;ClientEvents OnCommand="OnCommand" /&gt;
              &lt;Selecting CellSelectionMode="None"&gt;&lt;/Selecting&gt;
          &lt;/ClientSettings&gt;
          &lt;MasterTableView DataSourceID="odsUsers" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
              AllowAutomaticUpdates="True" DataKeyNames="UserName" HierarchyLoadMode="Client"&gt;
              &lt;DetailTables&gt;
                  &lt;telerik:GridTableView runat="server" DataSourceID="odsUserRole" AllowAutomaticUpdates="True"
                      AutoGenerateColumns="True" EditMode="EditForms" HierarchyLoadMode="Client"&gt;
                      &lt;ParentTableRelation&gt;
                          &lt;telerik:GridRelationFields DetailKeyField="UserName" MasterKeyField="UserName" /&gt;
                      &lt;/ParentTableRelation&gt;
                      &lt;CommandItemSettings ExportToPdfText="Export to PDF" /&gt;
                      &lt;RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"&gt;
                      &lt;/RowIndicatorColumn&gt;
                      &lt;ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"&gt;
                      &lt;/ExpandCollapseColumn&gt;
                      &lt;Columns&gt;
                          &lt;telerik:GridEditCommandColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column"&gt;
                          &lt;/telerik:GridEditCommandColumn&gt;
                      &lt;/Columns&gt;
                      &lt;EditFormSettings&gt;
                          &lt;EditColumn FilterControlAltText="Filter EditCommandColumn column" UniqueName="EditCommandColumn1"&gt;
                          &lt;/EditColumn&gt;
                      &lt;/EditFormSettings&gt;
                  &lt;/telerik:GridTableView&gt;
              &lt;/DetailTables&gt;
              &lt;CommandItemSettings ExportToPdfText="Export to PDF"&gt;&lt;/CommandItemSettings&gt;
              &lt;RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"&gt;
                  &lt;HeaderStyle Width="20px"&gt;&lt;/HeaderStyle&gt;
              &lt;/RowIndicatorColumn&gt;
              &lt;ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"&gt;
                  &lt;HeaderStyle Width="20px"&gt;&lt;/HeaderStyle&gt;
              &lt;/ExpandCollapseColumn&gt;
              &lt;Columns&gt;
                  &lt;telerik:GridEditCommandColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column"&gt;
                  &lt;/telerik:GridEditCommandColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="UserName" FilterControlAltText="Filter UserName column"
                      HeaderText="UserName" SortExpression="UserName" UniqueName="UserName"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="Email" FilterControlAltText="Filter Email column"
                      HeaderText="Email" SortExpression="Email" UniqueName="Email"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
                  &lt;telerik:GridCheckBoxColumn DataField="Approved" DataType="System.Boolean" FilterControlAltText="Filter Approved column"
                      HeaderText="Approved" SortExpression="Approved" UniqueName="Approved"&gt;
                  &lt;/telerik:GridCheckBoxColumn&gt;
                  &lt;telerik:GridCheckBoxColumn DataField="LockedOut" DataType="System.Boolean" FilterControlAltText="Filter LockedOut column"
                      HeaderText="LockedOut" SortExpression="LockedOut" UniqueName="LockedOut"&gt;
                  &lt;/telerik:GridCheckBoxColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="Creation" FilterControlAltText="Filter Creation column"
                      HeaderText="Creation" SortExpression="Creation" UniqueName="Creation" DataType="System.DateTime"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="LastLogin" DataType="System.DateTime" FilterControlAltText="Filter LastLogin column"
                      HeaderText="LastLogin" SortExpression="LastLogin" UniqueName="LastLogin"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="LastActivity" DataType="System.DateTime" FilterControlAltText="Filter LastActivity column"
                      HeaderText="LastActivity" SortExpression="LastActivity" UniqueName="LastActivity"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="LastPasswordChanged" DataType="System.DateTime"
                      FilterControlAltText="Filter LastPasswordChanged column" HeaderText="LastPasswordChanged"
                      SortExpression="LastPasswordChanged" UniqueName="LastPasswordChanged"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
                  &lt;telerik:GridCheckBoxColumn DataField="Online" DataType="System.Boolean" FilterControlAltText="Filter Online column"
                      HeaderText="Online" SortExpression="Online" UniqueName="Online"&gt;
                  &lt;/telerik:GridCheckBoxColumn&gt;
                  &lt;telerik:GridBoundColumn DataField="Password" FilterControlAltText="Filter Password column"
                      HeaderText="Password" SortExpression="Password" UniqueName="Password"&gt;
                  &lt;/telerik:GridBoundColumn&gt;
              &lt;/Columns&gt;
              &lt;EditFormSettings&gt;
                  &lt;EditColumn FilterControlAltText="Filter EditCommandColumn column"&gt;
                  &lt;/EditColumn&gt;
              &lt;/EditFormSettings&gt;
          &lt;/MasterTableView&gt;
          &lt;FilterMenu EnableImageSprites="False"&gt;
          &lt;/FilterMenu&gt;
          &lt;HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"&gt;
          &lt;/HeaderContextMenu&gt;
      &lt;/telerik:RadGrid&gt;
      &lt;asp:ObjectDataSource ID="odsUserRole" runat="server" SelectMethod="GetUserRoles"
          TypeName="WebCallManagerData.Account.MemberShipHelper.User" OldValuesParameterFormatString="original_{0}"
          UpdateMethod="UpdateUserRoles"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:Parameter DefaultValue="" Name="UserName" Type="String" /&gt;
          &lt;/SelectParameters&gt;
          &lt;UpdateParameters&gt;
              &lt;asp:Parameter Name="ur" Type="Object" /&gt;
              &lt;asp:Parameter Name="UserName" Type="String" /&gt;
          &lt;/UpdateParameters&gt;
      &lt;/asp:ObjectDataSource&gt;
      &lt;asp:ObjectDataSource ID="odsUsers" runat="server" SelectMethod="GetAllUsers" TypeName="WebCallManagerData.Account.MemberShipHelper.User"&gt;
      &lt;/asp:ObjectDataSource&gt;
  &lt;/asp:Content&gt;
  </code></pre>