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. Including a label,textbox and radiobuttonlist in a cell

Including a label,textbox and radiobuttonlist in a cell

Scheduled Pinned Locked Moved ASP.NET
helpwpfwcfquestion
2 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.
  • P Offline
    P Offline
    pavan kumar
    wrote on last edited by
    #1

    i've a datalist. each cell should contain a label, textbox and radiobuttonlist. the reason why i choose a datalist is that the format should repeat in all cells which i thought can be achieved by repeating property of the datalist. the problem is assigning values to them and binding data to the controls. i've a dataset with question_no, question_desc in one table and second table has question_no,option_no and option_desc. now the data assignment would be like this: for question# 1, label.text=question_desc(corresponding to question#1) and radiobuttonlist's datasource is option_desc column filtered on question_no. this cannot be bind by usual .DataBind() method, i guess. please help me to assign the values for such multiple controls in a datalist from multiple tables of the dataset. regards, Pavan

    D 1 Reply Last reply
    0
    • P pavan kumar

      i've a datalist. each cell should contain a label, textbox and radiobuttonlist. the reason why i choose a datalist is that the format should repeat in all cells which i thought can be achieved by repeating property of the datalist. the problem is assigning values to them and binding data to the controls. i've a dataset with question_no, question_desc in one table and second table has question_no,option_no and option_desc. now the data assignment would be like this: for question# 1, label.text=question_desc(corresponding to question#1) and radiobuttonlist's datasource is option_desc column filtered on question_no. this cannot be bind by usual .DataBind() method, i guess. please help me to assign the values for such multiple controls in a datalist from multiple tables of the dataset. regards, Pavan

      D Offline
      D Offline
      Daniel Santillanes
      wrote on last edited by
      #2

      May be not the best choice, but what I'd do is... In the ItemDataBound event of the Datalist, you can check th question_no column of every row, make a query to the database for the options, and bind the results to the radiobuttonlist. Another option could be... have all the questions / options in datatables in a dataset, and again in the ItemDataBound event of each item in the DataList, make a DataView of the options of the specific question, and bind them to the RadioButtonList. I hope this makes sense. daniero

      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