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. Web Development
  3. ASP.NET
  4. CheckBoxList not displaying with first click

CheckBoxList not displaying with first click

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
4 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.
  • E Offline
    E Offline
    Ekjon
    wrote on last edited by
    #1

    I am using Menu control in association with MultiView/Views. When this menu item is clicked where I have the CheckBoxList - it doesn't select the CheckBoxes from the info from my database, requires a second click. I am not calling DataBound for some other reason. If I used databound in Page_Load, it would display fine. Any idea how I can fix it? Thanks.

    E 1 Reply Last reply
    0
    • E Ekjon

      I am using Menu control in association with MultiView/Views. When this menu item is clicked where I have the CheckBoxList - it doesn't select the CheckBoxes from the info from my database, requires a second click. I am not calling DataBound for some other reason. If I used databound in Page_Load, it would display fine. Any idea how I can fix it? Thanks.

      E Offline
      E Offline
      Ekjon
      wrote on last edited by
      #2

      Found a reasonable solution. Thanks.

      M 1 Reply Last reply
      0
      • E Ekjon

        Found a reasonable solution. Thanks.

        M Offline
        M Offline
        Ma tju
        wrote on last edited by
        #3

        What is your solution?

        ma tju Pengaturcara Perisian Subang Jaya,Selangor, Malaysia Ring Master SB MVP 2008 ;p Subang Jaya MOP (Otai)

        E 1 Reply Last reply
        0
        • M Ma tju

          What is your solution?

          ma tju Pengaturcara Perisian Subang Jaya,Selangor, Malaysia Ring Master SB MVP 2008 ;p Subang Jaya MOP (Otai)

          E Offline
          E Offline
          Ekjon
          wrote on last edited by
          #4

          1. In Page_Load (If (!Page.IsPostBack)), get the info from the database, select the CheckBoxes that matches the criteria based on that info, and DataBind(). 2) In MultiView_ActiveIndexChanged event handler, get the info from the database, select the CheckBoxes that matches the criteria based on that info. 3) Use a Save button, and in the Button_Click event handler, first Delete info from the table for the ID I am working with, then Insert values for that ID and each of the CheckBoxes that are currently selected. 4) Don't try to do anything in the SelectedIndexChanged for the CheckBoxList (which is a logical thing to try), because here, you don't know which Box is clicked as the sender is the List, not any individual CheckBox. If you have any Label to display messages, you can just clear the label here. Thats it. Thanks.

          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