Hi,
I'm working with ASP.NET 2.0, Windows [2000,XP,Server2003], Internet Explorer 6.0.2900.5512.xpsp_sp3_gdr.080814-1236, Telerik RadControls for ASP.NET AJAX Q3 2005 with Visual Studio 2005. I have a huge self-referencing Oracle table, and I want a RadGrid with both SelfHierarchySettings and HierarchyLoadMode="ServerOnDemand".
I can get the behavior I'd like with HierarchyLoadMode="Client" and the datasource and radgrid below. And then when you click on the item whose ccattrseq=1, it expands and shows all its children (whose pid=1). But the table, even too a depth of 2 is too big too load all at once, and what I really want is to have HierarchyLoadMode="ServerOnDemand". I've tried and tried, but all I get is no children when I click on expand.
I've read these articles, but I don't think they're doing what I need:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/separate-scrolls-for-inner-tables-in-hierarchical-grid.aspx
http://www.telerik.com/community/code-library/aspnet-ajax/grid/select-items-in-hierarchy-depending-on-selection-in-inner-levels.aspx
The closest article I could find doing what I need was here (but it isn't ASP.NET AJAX forums). The poster seemed to be satisfied that he'd found, but I can't re-create it with the details provided:
http://www.telerik.com/community/forums/aspnet/grid/self-hierarchy-problems.aspx#719305
<asp:SqlDataSource ID="OracleTest" runat="server" ConnectionString="Data Source=testville;Persist Security Info=True;User ID=testuser;Password=testpassword;Unicode=True"
ProviderName="System.Data.OracleClient" SelectCommand='SELECT "CCATTRSEQ","SECTION","VALSTR", "PID" FROM "CCATTRIBUTES" WHERE "PID"=1 OR "PID"=-1'>
</asp:SqlDataSource>
<telerik:RadGrid ID="TopLevelNodes" Skin="Outlook" runat="server" PageSize="5"
AllowSorting="True" BackColor="#E0E0E0" DataSourceID="OracleTest"
OnColumnCreated="TopLevelNodes_ColumnCreated" OnItemCreated="TopLevelNodes_ItemDataBound"
OnNeedDataSource="TopLevelNodes_NeedDataSource" AutoGenerateColumns="False"
EnableAJAX="True" GridLines="None" Width="321px" CellPadding="1" Height="200px">
<ClientSettings EnablePostBackOnRowClick="True">
<Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView
HierarchyLoadMode="Client" DataKeyNames="CCATTRSEQ,PID,SECTION"
DataSourceID="OracleTest">
<SelfHierarchySettings ParentKeyName="PID" KeyName="CCATTRSEQ" />
<SortExpressions>
<telerik:GridSortExpression FieldName="VALSTR" SortOrder="Descending" />
</SortExpressions>
<Columns>
<telerik:GridClientSelectColumn UniqueName="column">
<HeaderStyle Width="27px" />
</telerik:GridClientSelectColumn>
<telerik:GridExpandColumn Visible="True" >
<HeaderStyle Width="27px" />
</telerik:GridExpandColumn>
<telerik:GridBoundColumn DataField="VALSTR" HeaderText="Section" SortExpression="VALSTR"
UniqueName="VALSTR">
<ItemStyle Wrap="True" />
<HeaderStyle Width="70px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CCATTRSEQ" HeaderText="CCATTRSEQ" SortExpression="CCATTRSEQ"
UniqueName="CCATTRSEQ" Display="False">
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SECTION" HeaderText="Section Number" SortExpression="SECTION"
UniqueName="SECTION" Display="False">
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PID" HeaderText="PID" SortExpression="PID"
UniqueName="PID" Display="False">
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
</Columns>
<ExpandCollapseColumn UniqueName="ExpandColumn1">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
</MasterTableView>
<SelectedItemStyle BackColor="#C00000" />
<AlternatingItemStyle BackColor="Silver" />
<HeaderContextMenu EnableTheming="True" Skin="Outlook">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<FilterMenu EnableTheming="True" Skin="Outlook">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
I'm working with ASP.NET 2.0, Windows [2000,XP,Server2003], Internet Explorer 6.0.2900.5512.xpsp_sp3_gdr.080814-1236, Telerik RadControls for ASP.NET AJAX Q3 2005 with Visual Studio 2005. I have a huge self-referencing Oracle table, and I want a RadGrid with both SelfHierarchySettings and HierarchyLoadMode="ServerOnDemand".
I can get the behavior I'd like with HierarchyLoadMode="Client" and the datasource and radgrid below. And then when you click on the item whose ccattrseq=1, it expands and shows all its children (whose pid=1). But the table, even too a depth of 2 is too big too load all at once, and what I really want is to have HierarchyLoadMode="ServerOnDemand". I've tried and tried, but all I get is no children when I click on expand.
I've read these articles, but I don't think they're doing what I need:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/separate-scrolls-for-inner-tables-in-hierarchical-grid.aspx
http://www.telerik.com/community/code-library/aspnet-ajax/grid/select-items-in-hierarchy-depending-on-selection-in-inner-levels.aspx
The closest article I could find doing what I need was here (but it isn't ASP.NET AJAX forums). The poster seemed to be satisfied that he'd found, but I can't re-create it with the details provided:
http://www.telerik.com/community/forums/aspnet/grid/self-hierarchy-problems.aspx#719305
<asp:SqlDataSource ID="OracleTest" runat="server" ConnectionString="Data Source=testville;Persist Security Info=True;User ID=testuser;Password=testpassword;Unicode=True"
ProviderName="System.Data.OracleClient" SelectCommand='SELECT "CCATTRSEQ","SECTION","VALSTR", "PID" FROM "CCATTRIBUTES" WHERE "PID"=1 OR "PID"=-1'>
</asp:SqlDataSource>
<telerik:RadGrid ID="TopLevelNodes" Skin="Outlook" runat="server" PageSize="5"
AllowSorting="True" BackColor="#E0E0E0" DataSourceID="OracleTest"
OnColumnCreated="TopLevelNodes_ColumnCreated" OnItemCreated="TopLevelNodes_ItemDataBound"
OnNeedDataSource="TopLevelNodes_NeedDataSource" AutoGenerateColumns="False"
EnableAJAX="True" GridLines="None" Width="321px" CellPadding="1" Height="200px">
<ClientSettings EnablePostBackOnRowClick="True">
<Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView
HierarchyLoadMode="Client" DataKeyNames="CCATTRSEQ,PID,SECTION"
DataSourceID="OracleTest">
<SelfHierarchySettings ParentKeyName="PID" KeyName="CCATTRSEQ" />
<SortExpressions>
<telerik:GridSortExpression FieldName="VALSTR" SortOrder="Descending" />
</SortExpressions>
<Columns>
<telerik:GridClientSelectColumn UniqueName="column">
<HeaderStyle Width="27px" />
</telerik:GridClientSelectColumn>
<telerik:GridExpandColumn Visible="True" >
<HeaderStyle Width="27px" />
</telerik:GridExpandColumn>
<telerik:GridBoundColumn DataField="VALSTR" HeaderText="Section" SortExpression="VALSTR"
UniqueName="VALSTR">
<ItemStyle Wrap="True" />
<HeaderStyle Width="70px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CCATTRSEQ" HeaderText="CCATTRSEQ" SortExpression="CCATTRSEQ"
UniqueName="CCATTRSEQ" Display="False">
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SECTION" HeaderText="Section Number" SortExpression="SECTION"
UniqueName="SECTION" Display="False">
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PID" HeaderText="PID" SortExpression="PID"
UniqueName="PID" Display="False">
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
</Columns>
<ExpandCollapseColumn UniqueName="ExpandColumn1">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
</MasterTableView>
<SelectedItemStyle BackColor="#C00000" />
<AlternatingItemStyle BackColor="Silver" />
<HeaderContextMenu EnableTheming="True" Skin="Outlook">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<FilterMenu EnableTheming="True" Skin="Outlook">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>