Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
WebHeirarchial grid
posted

I have a grid bound to multiple datasources for relationships

<ig:WebHierarchicalDataGrid ID="grdCat" runat="server" DataSourceID="dsCategoryByDept" DataKeyFields="DepartmentID" AutoGenerateColumns="false" AutoGenerateBands="true">
<Columns>
<ig:BoundDataField DataFieldName="DepartmentID" Key="DepartmentID" Header-Text="Department Code" Width="175px"></ig:BoundDataField>
<ig:BoundDataField DataFieldName="DepartmentName" Key="DepartmentName" Header-Text="Name" Width="200px"></ig:BoundDataField>
<ig:UnboundCheckBoxField Key="Use" Header-Text="Use" Width="75px"></ig:UnboundCheckBoxField>
</Columns>
<Bands>
<ig:Band DataMember="dsListCategory_DefaultView" Key="CategoryID" DataKeyFields="CategoryID" AutoGenerateColumns="false">
<Columns>
<ig:BoundDataField DataFieldName="CategoryID" Key="CategoryID"></ig:BoundDataField>
<ig:BoundDataField DataFieldName="CategoryName" Key="CategoryName"></ig:BoundDataField>
<ig:BoundDataField DataFieldName="DepartmentID" Key="Department" Header-Text="Department Code"></ig:BoundDataField>
<ig:UnboundCheckBoxField Key="UseCategory" Header-Text="Use"></ig:UnboundCheckBoxField>
</Columns>
</ig:Band>
</Bands>
<Behaviors>
<ig:EditingCore>
<Behaviors>
<ig:CellEditing></ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<ig:Selection RowSelectType="Multiple"></ig:Selection>
</Behaviors>
</ig:WebHierarchicalDataGrid>

If I include the <Bands> section as the code above shows, I get no data and the grid will not show up.  If I remove the BAND section and set the autogeneratebands to true, I get the data.   I need to be able to add an unbound column to the band (a checkbox) and hide a column (DepartmentID).

dsdepartment returns DepartmentID and DepartmentName

dslistcategory returns CategoryID, CategoryName, DepartmentID

Can someone tell me is wrong with this code?

Thanks

Larry