Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Adelaide, Australia
    Posts
    472
    Thanks
    3
    Thanked 0 Times in 0 Posts

    data grid and checkboxes

    Hello!

    I have a table for completion of different type of forms that has 'complete' and 'incomplete' (as text) in the different fields.

    i want to make a datagrid that lists all the rows and then in each field has checkbox that if selected updates that row in that field to 'complete' and if they unselect it updates the field in that row to 'incomplete'.

    it also has an id field that should show the name of the applicant which is linked to another table.

    i dont understand how to do this in a datagrid

    any assistance would be grateful!

  • #2
    New to the CF scene
    Join Date
    Oct 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Hi

    Hi,

    First of all you meant gridview when you say datagrid right.

    A design question. Why would you want to have two separate fields in the table to store complete and incomplete status. You could have had a bit field (for MS SQL) or a single text field if you think you will have more status in future. Manage what you have to save in this field through code.

    Ok to the issue now.

    You must be populating the grid using a datasource or a list right

    If you have the table structure as stated above then you could use an Object Datasource or an SQL Datasource to bind your table data. Having the field as a bit field will automatically create your check box field in the grid and you will not have to write bulks of code. Except the logic to Insert and update a record.

    If you are manually binding the gridview using a list then you will require a little bit more work like adding a template field and a checkbox and handling some gridview events etc.

    Question would be how are you binding the gridview I guess?

    Shaheem

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    uxSurveyGrid.DataSource = searchResults;
    uxSurveyGrid.DataBind();


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •