hi Kekin,
If you have are been able to display checkbox in your datagrid then its relatively easier to display as the first column of your datagrid. You can do this in your datagrid declaration where you actually design your columns with their names respectively.
All you need to do is to move your column for checkboxes into the first place. This is a code snippet for the declaration of datagrid in vb.net. I studied about this from 4guysfromrolla.com website, although i could not find the article related to it that is why i am giving you this code. You can figure it out whats in it and if you have questions do let me know.
Note: I have a invisible column of userID. I need it because that will help me identify individual record by its userID but my Datagrid does not display it when page is loaded.
hope this helps,
Vikram
--------------------------------------------------------------------------
<asp:datagrid ID="MyDataGrid" runat="server"
AutoGenerateColumns="False" EnableViewState="True"
AlternatingItemStyle-BackColor="#ffffcc"
FooterStyle-BackColor="#6699ff"
HeaderStyle-BackColor="#6699ff"
Font-Size="8pt" Font-Name="Arial" CellSpacing="0" CellPadding="3"
ShowFooter="false" BorderColor="black" BackColor="#ffffff" Width="97%"
PagerStyle-Mode="NumericPages"
PageSize="300" AllowPaging="False"
AllowSorting="true" OnSortCommand="MyDataGrid_Sort">
<columns>
<asp:templatecolumn HeaderText="Notify" ItemStyle HorizontalAlign="Center">
<itemtemplate>
<asp:Checkbox Id="cb" runat="server" />
</itemtemplate>
</asp:templatecolumn>
<asp:boundcolumn HeaderText="User ID" DataField="UserID" SortExpression="UserID" Visible="false"/>
<asp:TemplateColumn HeaderText="User ID" Visible="false">
<ItemTemplate>
<asp:Label ID="lblUserID" Text='<%# DataBinder.Eval(Container.DataItem,"UserID") %>' runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Organization" SortExpression="Company">
<ItemTemplate>
<asp:Label ID="lblUserOrganization" Text='<%# DataBinder.Eval(Container.DataItem,"Company") %>' runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Contact Name" SortExpression="ContactName">
<ItemTemplate>
<asp:Label ID="lblUserContactName" Text='<%# DataBinder.Eval(Container.DataItem,"ContactName") %>' runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:boundcolumn HeaderText="Title" DataField="ContactTitle"/>
<asp:TemplateColumn HeaderText="Contact Email">
<ItemTemplate>
<asp:Label ID="lblContactEmail" Text='<%# DataBinder.Eval(Container.DataItem,"ContactEmail") %>' runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:boundcolumn HeaderText="Phone" DataField="ContactPhone" HeaderStyle-HorizontalAlign="center" />
<asp:boundcolumn HeaderText="Expiration Date" DataField="ExpDate" DataFormatString="{0:d}"
SortExpression="ExpDate"/>
<asp:templatecolumn HeaderText="Details/Edit">
<itemtemplate>
<center>
<a href="../User_Modify.aspx?MenuItem=<%# Request.QueryString("MenuItem") %>&UserID=<%# DataBinder.Eval(Container.DataItem, "UserID")%>&Level=2">Details</a>
</center>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
--------------------------------------------------------------------------