Question : Datagrid dummy column

Hi,
I'm populating the datagrid from the table in the database. Now what I wanted to do is just one addiotional column in the datagrid and the data for that column should be a auto generated sequence number so I can give a number to each line items in the grid. This is what I did:

<asp:DataGrid ID="test" runat="server" BorderColor="black" GridLines="Vertical" cellpadding="4" cellspacing="0" Font-Name="Verdana" Font-Size="8pt" ShowFooter="true" HeaderStyle-CssClass="CartListHead" FooterStyle-CssClass="CartListFooter" ItemStyle-CssClass="CartListItem" AlternatingItemStyle-CssClass="CartListItemAlt" DataKeyField="Quantity" AutoGenerateColumns="false">
                                <Columns>
                                    <asp:TemplateColumn>
                                    <HeaderTemplate>
                                          Index
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                          <%#  ?? %>
                                    </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn HeaderText="Product&nbsp;Code">
                                        <ItemTemplate>
                                       
                                            <asp:Label id="ProductCode" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProductID") %>' />
                                       
                                        </ItemTemplate>
                                   
                                    </asp:TemplateColumn>
                               
                               
                                </Columns>
                       
                       
                            </asp:DataGrid>
How do I assign a value to the Index column above?

Thanks in advance!

Answer : Datagrid dummy column

If you want to use the built in backup, you don't.  SBS backup takes over the drive and it can only be used by SBS backup.  (Most consultants I know are NOT happy with the built in backup provided by SBS 2008).  Suggest you consider regular backup software and other imaging products.
Random Solutions  
 
programming4us programming4us