Hello, I have a datagrid on my web page which is populated with data from database at run time. I now need to select a column of a datagrid(for other functionalities like delete, view etc jst like a inbox in mail) I am planning to add checkboxes next to all columns on datagrid so that I can know which row is selected.Can anyboby help me how to achive this.I'm developing on VS-2003 and VB.net as backend code. Thanks!!
You can do it in two ways First way 1. Add a column as raterus specified and don't bind this column. 2. At runtime, After binding the Data Grid, have another function which loops through the grid like foreach (DataGridItem item in dgrdList.Items) item.Cells[0].Controls.add[RewardCheckBox(id));
Second Way 1. Instead of using DataGrid, you can generate the table on the fly and when you create the controls, the first column will be as TableCell containing check box. Hope this helps. Bhaskar