Multi-level dimensions in datagrid -
07-19-2005
, 01:13 PM
This is regarding an articles at
http://www.dotnetjunkies.com/Tutoria...B55057FF3.dcik
.. I am actually working with ms analysis services data.
I have a cellset that has dimensions with multiple levels. I am trying
to use this concept to bind to a datagrid with the ability to
expand/collapse levels. However, I am a bit confused. I have a simple
datagrid object in my aspx page....
<asp:datagrid id="DataGrid2" runat="server" Visible="False">
<ItemStyle ForeColor="Navy"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="DimGray"></HeaderStyle>
</asp:datagrid>
In my code, I bind this datagrid to a dataTable. The problem is, I am
confused as to where to add the linkbutton rows. Do I add them in my
datatable first and then bind the table to the datagrid, or do I add
the linkbutton rows in datagrid in advance and then bind it to my
table.
If I do something like this...
<asp:datagrid id="DataGrid3" runat="server" Visible="False">
<ItemStyle ForeColor="Navy"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="DimGray"></HeaderStyle>
<Columns>
<asp:ButtonColumn Text="+"
CommandName="ToggleSubject"></asp:ButtonColumn>
<asp:BoundColumn HeaderText="Subject Title"></asp:BoundColumn>
<asp:ButtonColumn Text="+"
CommandName="ToggleLevel"></asp:ButtonColumn>
<asp:BoundColumn HeaderText="Course Level"></asp:BoundColumn>
<asp:BoundColumn HeaderText="Course Title"></asp:BoundColumn>
</Columns>
</asp:datagrid>
Then the problem is binding the actual columns to the columns in my
datatable.
I will be very grateful anyone will kindly give me some ideas.
Thanks,
Partha |