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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Disabled CheckBox in a DataGrid

Disabled CheckBox in a DataGrid

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 2 Posters 0 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi Guys and Gals!!! I need to show data in a column style, of which two columns are CheckBox-es. Since ListView doesn't support more than one CheckBox, I've decided to use a DataGrid for this task. My problem is that I also need to disable some of the CheckBox-es. Sometimes, even one of the two on the same row. I could not find a way to get access to the CheckBox itself in the DataGridBoolColumn. :( I did use one of the examples on this site in order to paint my own CheckBox, so that when the cell is selected, a real CheckBox appears insted. But I do have some difficulties with that like bad refresh when the DataSet is changed of bad response to mouse event and so on and forth... :sigh: :doh: CAN ANYONE HELP ME WITH A WORKING CHECKBOX COLUNM ?!?!?!?!??!?! Thank you all in advance, Adam Crowe

    M 1 Reply Last reply
    0
    • L Lost User

      Hi Guys and Gals!!! I need to show data in a column style, of which two columns are CheckBox-es. Since ListView doesn't support more than one CheckBox, I've decided to use a DataGrid for this task. My problem is that I also need to disable some of the CheckBox-es. Sometimes, even one of the two on the same row. I could not find a way to get access to the CheckBox itself in the DataGridBoolColumn. :( I did use one of the examples on this site in order to paint my own CheckBox, so that when the cell is selected, a real CheckBox appears insted. But I do have some difficulties with that like bad refresh when the DataSet is changed of bad response to mouse event and so on and forth... :sigh: :doh: CAN ANYONE HELP ME WITH A WORKING CHECKBOX COLUNM ?!?!?!?!??!?! Thank you all in advance, Adam Crowe

      M Offline
      M Offline
      Marco M
      wrote on last edited by
      #2

      take a look at this article, it explains how you can use the ItemDataBound event to access each bounded row right before it's displayed, so you can do necessary changes.. http://www.codeproject.com/aspnet/ItemCreated.asp[^] Marco M.

      L 1 Reply Last reply
      0
      • M Marco M

        take a look at this article, it explains how you can use the ItemDataBound event to access each bounded row right before it's displayed, so you can do necessary changes.. http://www.codeproject.com/aspnet/ItemCreated.asp[^] Marco M.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I apologize for not mentioning this before, but my question regards to WinForms and not ASP.NET. Thank you.

        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