More in this section

Forums / General Discussions / radgrid with hierarchy problem

radgrid with hierarchy problem

2 posts, 0 answered
  1. j8
    j8 avatar
    20 posts
    Registered:
    30 Oct 2007
    25 Jan 2011
    Link to this post

    Hi,

    I created a usercontrol with a radgrid on it. The grid has 3 levels the first level works
    as expected but the second level won't expand. When clicking the second expand button
    it just collapses all levels.

    When I put the usercontrol on a 'real' webform (one not created via Sitefinity but in the
    same web application) it works as expected.

    I've tried adding/removing AjaxManager settings (by code as this won't work when dropped on
    a masterpage)

    Any ideas?

    Regards,

      Peter

    Grid:

    <telerik:radgrid id="grdForecast" runat="server" allowfilteringbycolumn="True" allowpaging="True"
      allowsorting="True" datasourceid="ldsForecastSchools" gridlines="None" showgrouppanel="True"
      width="100%" height="100%">
      <clientsettings allowdragtogroup="True">
      </clientsettings>
      <mastertableview autogeneratecolumns="False" datasourceid="ldsForecastSchools" datakeynames="No_">
        <detailtables>
          <telerik:gridtableview runat="server" datakeynames="No_" datasourceid="ldsForecastLocations"
            autogeneratecolumns="false">
            <parenttablerelation>
              <telerik:gridrelationfields detailkeyfield="School_No_" masterkeyfield="No_" />
            </parenttablerelation>
            <detailtables>
              <telerik:gridtableview runat="server" datakeynames="No_" datasourceid="ldsForecastBooklists"
                autogeneratecolumns="false">
                <parenttablerelation>
                  <telerik:gridrelationfields detailkeyfield="Location___Sector_No_" masterkeyfield="No_" />
                </parenttablerelation>
                <columns>
                  <telerik:gridboundcolumn datafield="No_" headertext="No_" readonly="True" sortexpression="No_"
                    uniquename="No_">
                  </telerik:gridboundcolumn>
                  <telerik:gridboundcolumn datafield="Schoolyear" headertext="Schoolyear" readonly="true"
                    sortexpression="Schoolyear" uniquename="Schoolyear">
                  </telerik:gridboundcolumn>
                  <telerik:gridboundcolumn datafield="Description" headertext="Description" readonly="True"
                    sortexpression="Description" uniquename="Description">
                  </telerik:gridboundcolumn>
                </columns>
              </telerik:gridtableview>
            </detailtables>
            <columns>
              <telerik:gridboundcolumn datafield="No_" headertext="No_" readonly="True" sortexpression="No_"
                uniquename="No_">
              </telerik:gridboundcolumn>
              <telerik:gridboundcolumn datafield="Description" headertext="Description" readonly="True"
                sortexpression="Description" uniquename="Description">
              </telerik:gridboundcolumn>
            </columns>
          </telerik:gridtableview>
        </detailtables>
        <rowindicatorcolumn>
          <headerstyle width="20px"></headerstyle>
        </rowindicatorcolumn>
        <expandcollapsecolumn visible="True">
        </expandcollapsecolumn>
        <columns>
          <telerik:gridboundcolumn datafield="No_" headertext="No_" readonly="True" sortexpression="No_"
            uniquename="No_">
          </telerik:gridboundcolumn>
          <telerik:gridboundcolumn datafield="Name" headertext="Name" readonly="True" sortexpression="Name"
            uniquename="Name">
          </telerik:gridboundcolumn>
        </columns>
      </mastertableview>
      <headercontextmenu enableimagesprites="True" cssclass="GridContextMenu GridContextMenu_Default">
      </headercontextmenu>
    </telerik:radgrid>

    Datasources:

    <asp:linqdatasource id="ldsForecastSchools" runat="server" contexttypename="Dynamicus.OWS.Data.BooklistsDataContext"
      entitytypename="" select="new (No_, Name)" tablename="SBC_Live_2_Schools"
    </asp:linqdatasource
    <asp:linqdatasource id="ldsForecastLocations" runat="server" contexttypename="Dynamicus.OWS.Data.BooklistsDataContext"
      entitytypename="" select="new (School_No_, No_, Description)" tablename="SBC_Live_2_Location___Sectors"
      where="School_No_ == @School_No_"
      <whereparameters
        <asp:sessionparameter defaultvalue="" name="School_No_" sessionfield="School_No_"
          type="String" /> 
      </whereparameters
    </asp:linqdatasource
    <asp:linqdatasource id="ldsForecastBooklists" runat="server" contexttypename="Dynamicus.OWS.Data.BooklistsDataContext"
      entitytypename="" select="new (Location___Sector_No_, No_, Description, Schoolyear, Status, Faculteit, Afdeling, Opleiding, Richting, Profiel)"
      tablename="SBC_Live_2_Booklists" where="Location___Sector_No_ == @Location___Sector_No_"
      <whereparameters
        <asp:sessionparameter name="Location___Sector_No_" sessionfield="Location___Sector_No_"
          type="String" /> 
      </whereparameters
    </asp:linqdatasource>

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    27 Jan 2011
    Link to this post
    Hi j8,

    Thank you for using our services.

    Currently we have a bug with ViewState which blocks the use of RadGrid on Sitefinity pages, unless you bind the grid using clientside logic. Unfortunately until we fix the bug you will not be able to use server side bound RadGrid on Sitefinity 4.0 pages.

    Regards,
    Radoslav Georgiev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered