Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Checkbox column problem

Checkbox column problem

Scheduled Pinned Locked Moved Windows Forms
winformsperformancehelpannouncement
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jimbaloo
    wrote on last edited by
    #1

    Hi, I have a windows forms app that contains a datagridview, with two filtered columns, some textbox columns, and a checkbox column. The filtering on the dgv is accomplished by using dropdowns on the column headers of the two filterable headers and this happens reasonably quickly. My problem comes when I try to set the value of all the checkboxes to either checked or not checked. If I have a small number of rows in the dgv then each check operation takes about .0015 of a second. If I have a large number of rows that time jumps to 1.5 seconds per row. When I use the filters the dgv updates in about 2 seconds. I am at a loss. The code I use to update the dgv checkbox column is: If btnSelectRecords.Text = FormConstants.ControlConstants.DESELECT_ALL_RECORDS Then For Each row As DataGridViewRow In dgvLoanRecords.Rows row.Cells(FormConstants.GridViewConstants.SELECTED).Value = False Next btnSelectRecords.Text = FormConstants.ControlConstants.SELECT_ALL_RECORDS Else For Each row As DataGridViewRow In dgvLoanRecords.Rows row.Cells(FormConstants.GridViewConstants.SELECTED).Value = True Next btnSelectRecords.Text = FormConstants.ControlConstants.DESELECT_ALL_RECORDS End If Can someone point me in the right direction to speed this process up. Thanks Jim

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups