J
jason burkett
Please help…I saw your posts and even found one directly linked to
what I am having problems with…however, it seems as though I am doing
everything the same…and I cannot get my events to fire.
Thanks so much for any advice.
jason
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace ControlsTest_Schedule
{
public class ScheduleList : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TEMPDate;
protected System.Web.UI.WebControls.DropDownList
cboDocList;
protected System.Web.UI.WebControls.Label lblChosenDoc;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label myLabel;
protected System.Web.UI.WebControls.RadioButton sStatus1;
protected System.Web.UI.WebControls.RadioButton
RadioButton3;
protected System.Web.UI.WebControls.RadioButton
RadioButton2;
protected System.Web.UI.WebControls.DataList
List_Schedule;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if (! IsPostBack)
{
string ChosenDate;
int DocID = 0;
ChosenDate = "6/29/04";
DocID=1;
List_Schedule.ItemCreated += new
DataListItemEventHandler(this.Item_Created);
List_Schedule.DataSource =
LIST.GetSchedule(ChosenDate, DocID);
List_Schedule.DataBind();
}
}
public bool IsChecked(int nButton, int sStatus)
{
if(nButton == sStatus)
{
return(true);
}
return(false);
}
void Item_Created(Object sender,
System.Web.UI.WebControls.DataListItemEventArgs e)
{
//This function will set the Radio Buttons CHANGE
events.
if(e.Item.ItemType==ListItemType.Item)
{
RadioButton rb=e.Item.FindControl("sStatus1")
as RadioButton;
rb.CheckedChanged+=new
EventHandler(this.sStatus1_CheckedChange);
}
}
protected virtual void sStatus1_CheckedChange(object
sender, EventArgs e)
{
int x = 0;
}
Problem is that I cannot get the event to fire… Any help would be
appreciated...
what I am having problems with…however, it seems as though I am doing
everything the same…and I cannot get my events to fire.
Thanks so much for any advice.
jason
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace ControlsTest_Schedule
{
public class ScheduleList : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TEMPDate;
protected System.Web.UI.WebControls.DropDownList
cboDocList;
protected System.Web.UI.WebControls.Label lblChosenDoc;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label myLabel;
protected System.Web.UI.WebControls.RadioButton sStatus1;
protected System.Web.UI.WebControls.RadioButton
RadioButton3;
protected System.Web.UI.WebControls.RadioButton
RadioButton2;
protected System.Web.UI.WebControls.DataList
List_Schedule;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if (! IsPostBack)
{
string ChosenDate;
int DocID = 0;
ChosenDate = "6/29/04";
DocID=1;
List_Schedule.ItemCreated += new
DataListItemEventHandler(this.Item_Created);
List_Schedule.DataSource =
LIST.GetSchedule(ChosenDate, DocID);
List_Schedule.DataBind();
}
}
public bool IsChecked(int nButton, int sStatus)
{
if(nButton == sStatus)
{
return(true);
}
return(false);
}
void Item_Created(Object sender,
System.Web.UI.WebControls.DataListItemEventArgs e)
{
//This function will set the Radio Buttons CHANGE
events.
if(e.Item.ItemType==ListItemType.Item)
{
RadioButton rb=e.Item.FindControl("sStatus1")
as RadioButton;
rb.CheckedChanged+=new
EventHandler(this.sStatus1_CheckedChange);
}
}
protected virtual void sStatus1_CheckedChange(object
sender, EventArgs e)
{
int x = 0;
}
Problem is that I cannot get the event to fire… Any help would be
appreciated...