Where's the "box" next to the checkbox??

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Where's the "box" next to the checkbox??

  1. #1
    Join Date
    Dec 1969
    Posts
    2,227

    Default Where's the "box" next to the checkbox??

    I have a Repeater with a checkbox in it. It binds ( 2 rows) and displays the data. But there&#039;s no checkbox next to the data being displayed! <BR><BR>This is what I have:<BR><BR>&#060;table style="Z-INDEX: 102; LEFT: 406px; POSITION: absolute; TOP: 22px"&#062;<BR> &#060;tr&#062;<BR> &#060;td width="200" height="50"&#062;&#060;asp:repeater id="rpAct" Runat="server"&#062;<BR> &#060;ItemTemplate&#062;<BR> &#060;asp:CheckBox ID="cbAct" Text=&#039;&#060;%# Container.DataItem("activity_id") %&#062;&#039;&#062;<BR> &#060;%# Container.DataItem("short_desc") %&#062;<BR> &#060;/asp:CheckBox&#062;<BR> <BR> &#060;/ItemTemplate&#062;<BR> &#060;/asp:repeater&#062;&#060;/td&#062;<BR> &#060;/tr&#062;<BR> &#060;/table&#062;<BR><BR><BR>and this is how I bind it:<BR><BR><BR> Dim dr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection) <BR> <BR> rpAct.DataSource = dr<BR> rpAct.DataBind()<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    19,082

    Default RE: Where's the

    your asp:checkbox is not set to runat="server"

  3. #3
    Join Date
    Dec 1969
    Posts
    2,227

    Default I'm so stupid..

    Thanks! that&#039;s what I get for being stressed out.

  4. #4
    Join Date
    Dec 1969
    Posts
    96,118

    Default If I had a dollar...

    ...for every time I&#039;ve forgotten RUNAT, I&#039;d have enough...well, enough for a couple of nice dinners, at least.<BR><BR>This is called "can&#039;t see the forest for the trees."<BR><BR>Relax, you&#039;re getting there.<BR><BR>


  5. #5
    Join Date
    Dec 1969
    Posts
    19,082

    Default I'll jin you on that one...

    ... if I had a dollar for every one, I&#039;d probably have, oh, $659.50

  6. #6
    Join Date
    Dec 1969
    Posts
    19,082

    Default join, even

    &#060;eop&#062;

  7. #7
    Join Date
    Dec 1969
    Posts
    2,227

    Default 3 more questions...

    Thank you guys for making me feel better :-)..<BR><BR>1. I added a textbox to the repeater...where can I add my data binding var??<BR><BR>&#060;ItemTemplate&#062;<BR> &#060;asp:TextBox id="TextBox2" TextMode=MultiLine runat="server"&#062;&#060;/asp:TextBox&#062;<BR> &#060;/ItemTemplate&#062; <BR><BR>2. After I bind the data to the textbox, user types more info in it, can i grab the textbox data and update the database?? how can i reference that textbox??<BR><BR>

  8. #8
    Join Date
    Dec 1969
    Posts
    2,227

    Default No, 1 question

    found the answer to the first one..<BR><BR>Now, i have , for example 2 rows:<BR> checkbox textbox<BR> checkbox textbox<BR><BR>I click the second checkbox, how can i know which checkbox was clicked and which textbox corresponds to the clicked checkbox??<BR>

  9. #9
    Join Date
    Dec 1969
    Posts
    19,082

    Default RE: No, 1 question

    client-side or server-side?

  10. #10
    Join Date
    Dec 1969
    Posts
    2,227

    Default This is what i want to happen...

    server side...<BR><BR>The user clicks the checkbox, types something in the textbox , i want to see: ok, this checkbox was checked so grap this textbox next to it..<BR><BR>checkbox textbox<BR>checkbox textbox this was clicked, so grab this textbox

Posting Permissions

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