Hi,
I'm new to the use of this control having previously used the standard UltraWebGrid so my apologies if I have missed something obvious.
I have a two level grid displaying projects and the jobs within the projects as a child level. My Data Access Layer presents the Projects and Jobs as objects hiding the database layer from the control and as such I am using manual load on demand.
I have defined my grid as :-
<ig:WebHierarchicalDataGrid ID="whdgProjects" runat="server" AutoGenerateColumns="False" AutoGenerateBands="False" Height="650px" Width="98%" DataKeyFields="Id">
<Behaviors>
<ig:Paging PagerAppearance="top" PageSize="20" Enabled="true" />
</Behaviors>
<Columns>
<ig:BoundDataField DataFieldName="Id" Key="Project ID" Header-Text="ID" Width="50px" ><Header Text="ID" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="CreatedDateTime" Key="CreatedDateTime" Header-Text="Created" Width="130px" ><Header Text="Created" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="Location" Key="Location" Header-Text="Location" Width="250px" ><Header Text="Location" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="LocationPostcode" Key="PostCode" Header-Text="Post Code" Width="100px" ><Header Text="Post Code" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="Agent" Key="Agent" Header-Text="Agent" Width="150px" ><Header Text="Agent" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="ContactName" Key="ContactName" Header-Text="Contact Name" Width="150px" ><Header Text="Contact Name" /></ig:BoundDataField>
</Columns>
<Bands>
<ig:Band Key="JobsBand">
<ig:TemplateDataField Key="icon" Width="50px"><Header Text="TemplateField_0" /></ig:TemplateDataField>
<ig:BoundDataField DataFieldName="Id" Key="Id" Width="50px"><Header Text="ID" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="Type" Key="Type" Width="100px"><Header Text="Type" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="ContactName" Key="ContactName" Width="150px"><Header Text="Contact Name" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="ScheduledDateTime" Key="StartDate" Width="150px"><Header Text="Start Date" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="Price" Key="Price" Width="100px"><Header Text="Price" /></ig:BoundDataField>
<ig:BoundDataField DataFieldName="Complete" Key="Complete" Width="50px"><Header Text="Complete" /></ig:BoundDataField>
</ig:Band>
</Bands>
<ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300" />
</ig:WebHierarchicalDataGrid>
All so far so good. My problem is that the objects have far more fields in them that I want displayed in the grid. for the top level this is working as I expect - only the items defined in <columns> are displayed.
When I expand a project it calls the whdgProjects_RowIslandsPopulating function as I expect which creates a list of jobs for the project, creates a container grid and sets the list as the data source. The problem is that when the child band is displayed I get columns for ALL of the fields in the object not just those which I have defined in the jobs band - indeed it seems as though this definition is being ignored.
I really need some quick assistance with this as I need to make the decision whether to just go back to the UltraWebGrid if what I am trying to do just can't be done.
Thanks,
Hello cmdrew,
please check out this sample:
http://forums.infragistics.com/members/RMinchev/files/ManualLoadOnDemand/ManualLoadOnDemandGgrid.zip.aspx
Hristo,
In this example, you are populating the outer band of the grid on the OnInit event. This populates the grid on every postback. Is this really necessary? Seems it should be able to load the child items without having to go back and load all the parents every time you request to see the children.
If it's possible to do this, how do you do it?
Eric
Thanks for this - I think I got it sorted now...