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. RadiobuttonList and Calendar

RadiobuttonList and Calendar

Scheduled Pinned Locked Moved ASP.NET
question
13 Posts 3 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.
  • A Abhijit Jana

    did you used Ajax in the page

    cheers, Abhijit

    L Offline
    L Offline
    legend_of_zanado
    wrote on last edited by
    #4

    yes i used ajax but not with the calendar and not with the radiolist

    A 1 Reply Last reply
    0
    • L legend_of_zanado

      yes i used ajax but not with the calendar and not with the radiolist

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #5

      Just try with this, I think you did not add event handler while creating RadionButtonList Dynamically. You need to deleget the event to fire . Let me know when done. protected void Page_Load(object sender, EventArgs e) { RadioButtonList dbl = new RadioButtonList(); dbl.ID = "asdfdf"; dbl.Text = "test"; dbl.SelectedIndexChanged += new EventHandler(dbl_SelectedIndexChanged); } void dbl_SelectedIndexChanged(object sender, EventArgs e) { throw new Exception("The method or operation is not implemented."); }

      cheers, Abhijit

      L 1 Reply Last reply
      0
      • A Abhijit Jana

        Just try with this, I think you did not add event handler while creating RadionButtonList Dynamically. You need to deleget the event to fire . Let me know when done. protected void Page_Load(object sender, EventArgs e) { RadioButtonList dbl = new RadioButtonList(); dbl.ID = "asdfdf"; dbl.Text = "test"; dbl.SelectedIndexChanged += new EventHandler(dbl_SelectedIndexChanged); } void dbl_SelectedIndexChanged(object sender, EventArgs e) { throw new Exception("The method or operation is not implemented."); }

        cheers, Abhijit

        L Offline
        L Offline
        legend_of_zanado
        wrote on last edited by
        #6

        i did what u told me .. but still no postback .. :( :( ... i need a solution plz

        A 1 Reply Last reply
        0
        • L legend_of_zanado

          i did what u told me .. but still no postback .. :( :( ... i need a solution plz

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #7

          ok, now i have got the point . set AutopostBack=true ; with that code, which i had mistake and add your control in a Panel which is set to be run at server. this will work protected void Page_Load(object sender, EventArgs e) { RadioButtonList dbl = new RadioButtonList(); dbl.ID = "MyID"; dbl.Items.Add("abhijit"); dbl.Items.Add("Jana"); dbl.SelectedIndexChanged += new EventHandler(dbl_SelectedIndexChanged); dbl.AutoPostBack = true; Panel1.Controls.Add(dbl); } void dbl_SelectedIndexChanged(object sender, EventArgs e) { throw new Exception("The method or operation is not implemented."); } dont forget to vote if its helps you ;)

          cheers, Abhijit

          L 1 Reply Last reply
          0
          • A Abhijit Jana

            ok, now i have got the point . set AutopostBack=true ; with that code, which i had mistake and add your control in a Panel which is set to be run at server. this will work protected void Page_Load(object sender, EventArgs e) { RadioButtonList dbl = new RadioButtonList(); dbl.ID = "MyID"; dbl.Items.Add("abhijit"); dbl.Items.Add("Jana"); dbl.SelectedIndexChanged += new EventHandler(dbl_SelectedIndexChanged); dbl.AutoPostBack = true; Panel1.Controls.Add(dbl); } void dbl_SelectedIndexChanged(object sender, EventArgs e) { throw new Exception("The method or operation is not implemented."); } dont forget to vote if its helps you ;)

            cheers, Abhijit

            L Offline
            L Offline
            legend_of_zanado
            wrote on last edited by
            #8

            still no post back .. i don't know why ????????????? any controls added to the calendar cell doesn't postback .. :( outside the calendar it posts back normally .. but inside it noooooooooo ..

            A 1 Reply Last reply
            0
            • L legend_of_zanado

              still no post back .. i don't know why ????????????? any controls added to the calendar cell doesn't postback .. :( outside the calendar it posts back normally .. but inside it noooooooooo ..

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #9

              just post your code over here. i need to check it now !!!

              cheers, Abhijit

              L 1 Reply Last reply
              0
              • A Abhijit Jana

                just post your code over here. i need to check it now !!!

                cheers, Abhijit

                L Offline
                L Offline
                legend_of_zanado
                wrote on last edited by
                #10

                protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { RadioButtonList RBL_Absence = new RadioButtonList(); RBL_Absence.SelectedIndexChanged += new EventHandler(RBL_Absence_SelectedIndexChanged); RBL_Absence.EnableViewState = true; RBL_Absence.AutoPostBack = true; RBL_Absence.ID = "RBL_Absence" + e.Day.Date; RBL_Absence.RepeatDirection = RepeatDirection.Vertical; RBL_Absence.Font.Size = FontUnit.Point(8); DataSet DS_AbsenceType = _Attend.Get_All_AbsenceType(); RBL_Absence.DataSource = DS_AbsenceType; RBL_Absence.DataTextField = "AbsenceType"; RBL_Absence.DataValueField = "AbsenceType_ID"; RBL_Absence.DataBind(); //*********************************************************** e.Cell.Controls.Add(RBL_Absence); e.Cell.HorizontalAlign = HorizontalAlign.Center; }

                A 1 Reply Last reply
                0
                • L legend_of_zanado

                  protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { RadioButtonList RBL_Absence = new RadioButtonList(); RBL_Absence.SelectedIndexChanged += new EventHandler(RBL_Absence_SelectedIndexChanged); RBL_Absence.EnableViewState = true; RBL_Absence.AutoPostBack = true; RBL_Absence.ID = "RBL_Absence" + e.Day.Date; RBL_Absence.RepeatDirection = RepeatDirection.Vertical; RBL_Absence.Font.Size = FontUnit.Point(8); DataSet DS_AbsenceType = _Attend.Get_All_AbsenceType(); RBL_Absence.DataSource = DS_AbsenceType; RBL_Absence.DataTextField = "AbsenceType"; RBL_Absence.DataValueField = "AbsenceType_ID"; RBL_Absence.DataBind(); //*********************************************************** e.Cell.Controls.Add(RBL_Absence); e.Cell.HorizontalAlign = HorizontalAlign.Center; }

                  A Offline
                  A Offline
                  Abhijit Jana
                  wrote on last edited by
                  #11

                  i am realy sorry that i am not able to find the problem, i have tried but no result. i can give you one idea, that if you have no problem you can use Array of Radio button with same Group name ..

                  cheers, Abhijit

                  L 1 Reply Last reply
                  0
                  • A Abhijit Jana

                    i am realy sorry that i am not able to find the problem, i have tried but no result. i can give you one idea, that if you have no problem you can use Array of Radio button with same Group name ..

                    cheers, Abhijit

                    L Offline
                    L Offline
                    legend_of_zanado
                    wrote on last edited by
                    #12

                    thx alot for your effort .. i really appreciate that .. another question plz : how can i loop into calendar to find The control in every cell ?

                    A 1 Reply Last reply
                    0
                    • L legend_of_zanado

                      thx alot for your effort .. i really appreciate that .. another question plz : how can i loop into calendar to find The control in every cell ?

                      A Offline
                      A Offline
                      Abhijit Jana
                      wrote on last edited by
                      #13

                      legend_of_zanado wrote:

                      thx alot for your effort .. i really appreciate that ..

                      Thanks for that. then you have to rate my post

                      legend_of_zanado wrote:

                      how can i loop into calendar to find The control in every cell ?

                      i am trying , let you kwno when done.

                      cheers, Abhijit

                      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