0

I have a gridview connected to a database and I added a checkbox next to each row. This is my code so far.

<asp:TemplateField HeaderText="Assign" ShowHeader="True"> 
<ItemTemplate> 
<asp:CheckBox ID="assignCheck" runat="server" CausesValidation="false" CommandName="Assign"/> 
</ItemTemplate> 
</asp:TemplateField> 

Each row in my table holds a different user. My project is to assign a user to one of four supervisors. So what I want to do is have a drop down menu in which the user selects the supervisor. Then they go down the page checking the boxes next to the user. When they are done, they click a button, and the table now displays the supervisors name next to all the users that were selected through the check box.

How would I go about doing this? How do you get the index of the check box that is selected so that you can work with that number? I use c# by the way in visual web developer.

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by abhishekabhi
0

To add a check-all functionality in the GridView, simply add a asp:checkbox to the header template of the checkbox column.

Edited by pritaeas: Removed self promotion link

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.