How to add check boxes to gridview?

I have a SQL query that joins in several tables. I would like to be able to create a web page that pulls in all the field names from all the tables and put a check box by each of them. Then, for each field name that a user selects, my query will pull the data for it.

Can someone point me in the direction of how I do this? How do I create a dynamic list of field header names with a check box by each. I assume I need to somehow incorporate a gridview and put the check boxes inside, but I'm new enough I don't understand how this is done. Much thanks for any help you can offer.

Comments

  • : I have a SQL query that joins in several tables. I would like to be
    : able to create a web page that pulls in all the field names from all
    : the tables and put a check box by each of them. Then, for each
    : field name that a user selects, my query will pull the data for it.
    :
    : Can someone point me in the direction of how I do this? How do I
    : create a dynamic list of field header names with a check box by
    : each. I assume I need to somehow incorporate a gridview and put the
    : check boxes inside, but I'm new enough I don't understand how this
    : is done. Much thanks for any help you can offer.
    :


    Hello, you can try this:


    use such definition of the grid view











    and in the code behind in this procedure
    protected void CheckBoxUpdate_CheckedChanged(object sender, EventArgs e)
    {

    }

    add the code that will update the db

    and here is a tutorial:
    http://www.codeproject.com/KB/webforms/Multi-select_Dataagrid.aspx

    Hope it will help you. :)



    Brad Wang
    .NET Freelancer from China
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion