hello guys.
i would like to ask ur opinion on how to solve my problem. i would like to add a new column that will generate autonumber to the existing datagrid. based on my research i got from google, i only manage to create the new column(but it is empty). hope someone will help me to solve my problem. here's my code. please have a look and guide me.
<asp:DataGrid id="DataGrid1" runat="server" BorderStyle="None" AutoGenerateColumns="False" Width="950px" BackColor="White" BorderColor="#3366CC" BorderWidth="1px" CellPadding="4" HorizontalAlign="Center" EmptyDataText="There are no data records to display." EnableTheming="True" DataSourceID="BrokerRanking" Font-Names="calibri" Font-Size="16px">
<HeaderStyle ForeColor="White" />
<Columns>
<asp:TemplateColumn HeaderText="No">
<HeaderStyle BackColor="#2B1B17" Font-Bold="True" HorizontalAlign="Center" Font-Names="calibri" Font-Size="16px" Width="10px" />
<ItemStyle BackColor="White" Font-Bold="False" Font-Italic="False" Font-Names="Calibri"
Font-Overline="False" Font-Strikeout="False" Font-Underline="False" ForeColor="Black" />
</asp:TemplateColumn>
<asp:BoundColumn DataField="PName" ReadOnly="True" HeaderText="Name" DataFormatString=" {0:N2}">
<HeaderStyle BackColor="#2B1B17" Font-Bold="True" HorizontalAlign="Center" Font-Names="calibri" Font-Size="16px" Width="150px" />
<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" HorizontalAlign="Left" />
</asp:BoundColumn>
<asp:BoundColumn DataField="totalVolume" ReadOnly="True" HeaderText="Vol ('mil)" DataFormatString=" {0:N2}">
<HeaderStyle BackColor="#2B1B17" Font-Bold="True" HorizontalAlign="Center" Font-Names="calibri" Font-Size="16px" Width="100px" />
<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" HorizontalAlign="Right" />
</asp:BoundColumn>
<asp:BoundColumn DataField="PercentVolume" ReadOnly="True" HeaderText="%" DataFormatString=" {0:N2}">
<HeaderStyle BackColor="#2B1B17" Font-Bold="True" HorizontalAlign="Center" Font-Names="calibri" Font-Size="16px" Width="100px" />
<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" HorizontalAlign="Right" />
</asp:BoundColumn>
</Columns>
</asp:DataGrid>