Cannot open Detail Table

2 posts, 0 answers
  1. Jerry Saunders
    Jerry Saunders avatar
    1 posts
    Member since:
    May 2009

    Posted 04 Jun 2015 Link to this post

    First of all, my apologies for the length of this post.

    Could you please advise me on this problem? When I click on the down
    arrow shown in the image below:

    I get the following error message:  Cannot find a cell bound to colunm name ‘EditColumn’

    The MasterTable is populated by a stored
    procedure and bound by an ItemDataBound subroutine in the vb codebehind. The
    Detail Table is populated using a different stored procedure by the following
    subroutine:

    Protected Sub rgvObjective_DetailTableDataBind(source As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles rgvObjective.DetailTableDataBind

            Dim dataItem As GridDataItem = DirectCast(e.DetailTableView.ParentItem, GridDataItem)

            Dim poid = Integer.Parse(dataItem.GetDataKeyValue("PO_ID"))

            Dim dd As New CSREntities

            e.DetailTableView.DataSource =
    dd.usp_ProjectIndicator_Get_Grid(poid)

       
    End Sub

    Both stored procedures bring back PO_ID.

     

    Thank you,

    Jerry Saunders

     

    The code is as follows:

    <telerik:RadGrid ID="rgvObjective" EnableEmbeddedSkins="false" Skin="MySkin" AllowSorting="True" OnDetailTableUpdateCommand="rgvObjective_DetailTableUpdateCommand"
    AutoGenerateColumns="False" runat="server" CellSpacing="0" GridLines="None" PageSize="20" OnDetailTableDataBind="rgvObjective_DetailTableDataBind"

    AllowPaging="true" PagerStyle-AlwaysVisible="true"

    OnNeedDataSource="rgvObjective_NeedDataSource"  AllowResizeToFit="true"
    OnUpdateCommand="rgvObjective_UpdateCommand" OnDeleteCommand="rgvObjective_DeleteCommand" OnInsertCommand="rgvObjective_InsertCommand">

    <MasterTableView DataKeyNames="PO_ID" CommandItemDisplay="Top" EditMode="InPlace" Name="POID">

      <HeaderStyle Font-Bold="true" />

        <NoRecordsTemplate>

           <div class="emptyGrid">

              No objectives found.

           </div>

        </NoRecordsTemplate>

        <DetailTables>

          <telerik:GridTableView DataKeyNames="PI_INDICATOR" CommandItemDisplay="Top" EditMode="InPlace"    Name="PIINDICATOR">

          <ParentTableRelation>

             <telerik:GridRelationFields DetailKeyField="PO_ID" asterKeyField="PO_ID"></telerik:GridRelationFields>

          </ParentTableRelation>

            <Columns>

              <telerik:GridBoundColumn DataField="PO_ID" Display="false"></telerik:GridBoundColumn>

              <telerik:GridBoundColumn DataField="PI_ID" Display="false"></telerik:GridBoundColumn>

              <telerik:GridDropDownColumn UniqueName="PI_INDICATOR" DataField="PI_INDICATOR" ListDataMember="PI_INDICATOR" ListTextField="PI_INDICATOR" ListValueField="PI_INDICATOR"  HeaderText="Indicator" ></telerik:GridDropDownColumn>

              <telerik:GridBoundColumn UniqueName="PI_FIELD_SUFFIX" DataField="PI_FIELD_SUFFIX" HeaderText="Measurement" ></telerik:GridBoundColumn>

              <telerik:GridBoundColumn UniqueName="PI_CALC_DESC" DataField="PI_CALC_DESC" HeaderText="Measurement
    Calculation" ></telerik:GridBoundColumn>

              <telerik:GridEditCommandColumn UniqueName="EditColumn1" ItemStyle-HorizontalAlign="Right"  ItemStyle-Width="50px"></telerik:GridEditCommandColumn>

    <telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="Are you sure you want to delete this
    Indicator?" ConfirmDialogType="Classic" CommandName="Delete" Text="Delete"></telerik:GridButtonColumn>

             </Columns>

           </telerik:GridTableView>

         </DetailTables>

         <Columns>

            <telerik:GridDropDownColumn UniqueName="POG_NAME"  DataField="POG_NAME" ListDataMember="POG_NAME" ListTextField="POG_NAME" ListValueField="POG_NAME" HeaderText="Project
    Owner" DropDownControlType ="DropDownList" ></telerik:GridDropDownColumn>

            <telerik:GridDropDownColumn UniqueName="PC_NAME"  DataField="PC_NAME" ListDataMember="PC_NAME" ListTextField="PC_NAME" ListValueField="PC_NAME" HeaderText="Project
    Category" DropDownControlType ="DropDownList" ></telerik:GridDropDownColumn>

            <telerik:GridDropDownColumn UniqueName="PBT_NAME"  DataField="PBT_NAME" ListDataMember="PBT_NAME" ListTextField="PBT_NAME" ListValueField="PBT_NAME" HeaderText="Project
    Beneficiary" DropDownControlType ="DropDownList" ></telerik:GridDropDownColumn>

           <telerik:GridBoundColumn UniqueName="PO_OBJECTIVE"  DataField="PO_OBJECTIVE" HeaderText="Project Objective"></telerik:GridBoundColumn>

           <telerik:GridBoundColumn DataField="PO_ID" Display="false"></telerik:GridBoundColumn>

           <telerik:GridBoundColumn DataField="PO_PC_ID" Display="false"></telerik:GridBoundColumn>

           <telerik:GridBoundColumn DataField="PO_PBT_ID" Display="false"></telerik:GridBoundColumn>

           <telerik:GridEditCommandColumn UniqueName="EditColumn" ItemStyle-HorizontalAlign="Right"  ItemStyle-Width="50px"></telerik:GridEditCommandColumn>

           <telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="Are you sure you want to delete this
    Objective?" ConfirmDialogType="Classic" CommandName="Delete" Text="Delete"></telerik:GridButtonColumn>

          </Columns>

          <CommandItemSettings  AddNewRecordText="Add New Objective"  ShowRefreshButton="false" />

        </MasterTableView>

        <GroupingSettings CaseSensitive="False" />

      </telerik:RadGrid>

    </ContentTemplate>

     

  2. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 09 Jun 2015 Link to this post

    Hi Jerry,

    I tried to replicate the issue locally but I was unable to. I prepared a small sample based on the provided code and on my side the grid seems to work correctly. Could you please check out the attached sample and let me know how it differs from your real setup?

    Regards,
    Kostadin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top