2014-11-24 95 views
0

我有一個Radgrid,拒絕使第16行和第17行(從1開始計數)可以選擇的任何數據。 只有這兩行缺乏「選擇性」,例如如果我刪除這兩行(或行中的數據),那麼發生在這裏的新數據會顯示相同的行爲。TELERIK Radgrid奇怪的行爲

感謝, 每

 <telerik:RadGrid ID="RadGridUserAdmin" runat="server" AllowAutomaticDeletes="True" 
     AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowFilteringByColumn="True" 
     AutoGenerateColumns="False" AutoGenerateHierarchy="True" CellSpacing="0" DataSourceID="dsUsers" 
     GridLines="None" ShowGroupPanel="True" Height="700" AllowSorting="True" ShowStatusBar="True" 
     GroupingEnabled="False"> 
     <ExportSettings> 
      <Pdf PageWidth="" /> 
     </ExportSettings> 
     <ClientSettings AllowDragToGroup="True"> 
      <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
     </ClientSettings> 
     <MasterTableView DataKeyNames="IDUser" DataSourceID="dsUsers" CommandItemDisplay="Top" 
      Name="Users"> 
      <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> 
      <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"> 
       <HeaderStyle Width="20px"></HeaderStyle> 
      </RowIndicatorColumn> 
      <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"> 
       <HeaderStyle Width="20px"></HeaderStyle> 
      </ExpandCollapseColumn> 
      <DetailTables> 
       <telerik:GridTableView DataKeyNames="UserID,ProductID" DataSourceID="dsUserProduct" Name="Products" 
        CommandItemDisplay="Top"> 
        <ParentTableRelation> 
         <telerik:GridRelationFields DetailKeyField="UserID" MasterKeyField="IDUser"></telerik:GridRelationFields> 
        </ParentTableRelation> 
        <Columns> 
         <telerik:GridBoundColumn SortExpression="UserID" HeaderText="UserID" HeaderButtonType="TextButton" 
          DataField="UserID" UniqueName="UserID" ReadOnly="true" Visible="false"> 
         </telerik:GridBoundColumn> 
         <telerik:GridDropDownColumn DataField="ProductID" DataSourceID="dsAllProducts" HeaderText="Product" 
          ListTextField="Name" ListValueField="IDProduct" UniqueName="ProductID"> 
         </telerik:GridDropDownColumn> 
         <telerik:GridButtonColumn ConfirmText="Delete this users access to this product?" 
          ButtonType="LinkButton" ButtonCssClass="link" CommandName="Delete" Text="Delete" 
          UniqueName="DeleteColumn"> 
          <HeaderStyle Width="60px"></HeaderStyle> 
          <ItemStyle HorizontalAlign="Left"></ItemStyle> 
         </telerik:GridButtonColumn> 
        </Columns> 
       </telerik:GridTableView> 
      </DetailTables> 
      <Columns> 
       <telerik:GridBoundColumn DataField="IDUser" DataType="System.Int32" FilterControlAltText="Filter IDUser column" 
        HeaderText="IDUser" ReadOnly="True" SortExpression="IDUser" UniqueName="IDUser" 
        Visible="false"> 
       </telerik:GridBoundColumn> 
       <telerik:GridBoundColumn DataField="username" FilterControlAltText="Filter username column" 
        HeaderText="username" SortExpression="username" UniqueName="username"> 
       </telerik:GridBoundColumn> 
       <telerik:GridBoundColumn DataField="FullName" FilterControlAltText="Filter FullName column" 
        HeaderText="FullName" SortExpression="FullName" UniqueName="FullName"> 
       </telerik:GridBoundColumn> 
       <telerik:GridBoundColumn DataField="eMail" FilterControlAltText="Filter eMail column" 
        HeaderText="eMail" SortExpression="eMail" UniqueName="eMail"> 
       </telerik:GridBoundColumn> 
       <telerik:GridButtonColumn ConfirmText="Delete this user?" ButtonType="LinkButton" 
        ButtonCssClass="link" CommandName="Delete" Text="Delete" UniqueName="DeleteUser"> 
        <HeaderStyle Width="60px"></HeaderStyle> 
        <ItemStyle HorizontalAlign="Left"></ItemStyle> 
       </telerik:GridButtonColumn> 
      </Columns> 
      <EditFormSettings> 
       <EditColumn FilterControlAltText="Filter EditCommandColumn column"> 
       </EditColumn> 
      </EditFormSettings> 
      <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> 
     </MasterTableView> 
     <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> 
     <FilterMenu EnableImageSprites="False"> 
     </FilterMenu> 
    </telerik:RadGrid> 
+0

對於任何有同樣問題的人,我找到了一個修復程序。這個問題在Telerik MasterTableView控件中。 我不得不添加屬性HierarchyLoadMode =「客戶端」 – peer754 2014-11-25 10:35:14

+1

你可以發表該答案並接受它:) – rdmptn 2014-11-25 15:14:52

回答

1

這個問題是Telerik的MasterTableView控制範圍之內。我必須添加屬性HierarchyLoadMode =「客戶端」