J
jake
My datagrid has several bound columns followed by a template column
containing a checkbox(in ItemTemplate), followed by three template
columns, each with hyperlinks(in ItemTemplate).
The problem is that when this datagrid displays, the hyperlink columns
are shifted over into the template column that should contain
checkboxes. The column headings are as they should be. The last
column is empty when it should contain hyperlinks.
Thanks for any aid you can provide!
<Columns>
<asp:BoundColumn DataField="WPDESC" HeaderText="PRODUCT
DESCRIPTION">
<ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UOM" HeaderText="UOM">
<ItemStyle HorizontalAlign="Left" Width="35px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrUnits"
HeaderText="YTD<BR>UNITS" DataFormatString="{0:N}">
<ItemStyle HorizontalAlign="Right" Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrSales$"
HeaderText="YTD<BR>SALES$" DataFormatString="{0:c}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrGP_Perc"
HeaderText="YTD<br>GP%" DataFormatString="{0:N}">
<ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PriorUnits"
HeaderText="PRIOR<br>UNITS" DataFormatString="{0:N}">
<ItemStyle HorizontalAlign="Right" Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PriorSales$"
HeaderText="PRIOR<br>SALES$" DataFormatString="{0:c}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PriorGP_Perc"
HeaderText="PRIOR<br>GP%" DataFormatString="{0:N}">
<ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Diff" HeaderText="CHANGE<BR>$"
DataFormatString="{0:c}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DiffPerc"
HeaderText="CHANGE<BR>%" DataFormatString="{0:N}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="CHART<BR>SELECT">
<ItemStyle Width="20px"></ItemStyle>
<ItemTemplate>
<asp:CheckBox id="chkSelection1" runat="server"></asp:CheckBox>
<asp:Label id=hdnDataDesc Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "WPDESC")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnCurrSalesDollars Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "CurrSales$")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnCurrGP Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "CurrGP_Perc")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnPriorSalesDollars Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "PriorSales$")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnPriorGP Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "PriorGP_Perc")%>'
Visible="False">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="BY<BR>CUSTOMER">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Hyperlink runat="server" ID="Hyperlink2"></asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="BY<BR>SLSMN">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Hyperlink runat="server"
ID="Hyperlinkcolumn1"></asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="BY<BR>MONTH">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Hyperlink runat="server" ID="Hyperlink1"></asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
containing a checkbox(in ItemTemplate), followed by three template
columns, each with hyperlinks(in ItemTemplate).
The problem is that when this datagrid displays, the hyperlink columns
are shifted over into the template column that should contain
checkboxes. The column headings are as they should be. The last
column is empty when it should contain hyperlinks.
Thanks for any aid you can provide!
<Columns>
<asp:BoundColumn DataField="WPDESC" HeaderText="PRODUCT
DESCRIPTION">
<ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UOM" HeaderText="UOM">
<ItemStyle HorizontalAlign="Left" Width="35px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrUnits"
HeaderText="YTD<BR>UNITS" DataFormatString="{0:N}">
<ItemStyle HorizontalAlign="Right" Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrSales$"
HeaderText="YTD<BR>SALES$" DataFormatString="{0:c}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrGP_Perc"
HeaderText="YTD<br>GP%" DataFormatString="{0:N}">
<ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PriorUnits"
HeaderText="PRIOR<br>UNITS" DataFormatString="{0:N}">
<ItemStyle HorizontalAlign="Right" Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PriorSales$"
HeaderText="PRIOR<br>SALES$" DataFormatString="{0:c}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PriorGP_Perc"
HeaderText="PRIOR<br>GP%" DataFormatString="{0:N}">
<ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Diff" HeaderText="CHANGE<BR>$"
DataFormatString="{0:c}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DiffPerc"
HeaderText="CHANGE<BR>%" DataFormatString="{0:N}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="CHART<BR>SELECT">
<ItemStyle Width="20px"></ItemStyle>
<ItemTemplate>
<asp:CheckBox id="chkSelection1" runat="server"></asp:CheckBox>
<asp:Label id=hdnDataDesc Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "WPDESC")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnCurrSalesDollars Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "CurrSales$")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnCurrGP Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "CurrGP_Perc")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnPriorSalesDollars Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "PriorSales$")%>'
Visible="False">
</asp:Label>
<asp:Label id=hdnPriorGP Runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "PriorGP_Perc")%>'
Visible="False">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="BY<BR>CUSTOMER">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Hyperlink runat="server" ID="Hyperlink2"></asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="BY<BR>SLSMN">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Hyperlink runat="server"
ID="Hyperlinkcolumn1"></asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="BY<BR>MONTH">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Hyperlink runat="server" ID="Hyperlink1"></asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>