hi
i don't exactly get what you want to do ( i guss you want to merge some
cells on datagrid and leave some based on the result you get from the
table ) . but , you can do very flexable fromating on a webform datagrid ..
you can always do <ItemTemplate> and do your own styling
http://www.codeproject.com/cs/miscct...zeDataGrid.asp http://www.codeproject.com/cs/miscct...forumid=31224&
exp=0&select=733251
and here is a sample of web one
<asp:datagrid DataKeyField="DiscId" id="DataGrid1"
style="Z-INDEX: 110; LEFT: 8px; POSITION: absolute; TOP: 408px"
runat="server" AutoGenerateColumns="False" CellPadding="8"
BorderWidth="2px" BorderColor="Yellow">
<HeaderStyle ForeColor="White" BackColor="Indigo"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="DiscId" HeaderText="ID">
<ItemStyle HorizontalAlign="Center" ForeColor="White"
BackColor="Purple"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="FloatDiscNumber" SortExpression="DES"
HeaderText="FloatNumber">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PackDescription" HeaderText="Catagory">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="ShipmentName" HeaderText="Issue Date">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="LabelText" HeaderText="DVD Content">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Color" HeaderText="Color">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DiscImageFile" HeaderText="Image">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:ButtonColumn Text="Book" ButtonType="PushButton"
HeaderText="Reserve" CommandName="reserve">
<ItemStyle BackColor="Purple"></ItemStyle>
</asp:ButtonColumn>
<asp:TemplateColumn HeaderText="DVD View">
<ItemStyle BackColor="Purple"></ItemStyle>
<ItemTemplate>
<asp:Button runat="server" Text="Details" CommandName="opencontent"
CausesValidation="false"></asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC