protected void ddlstatus_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList d = (DropDownList)sender;
int val = Convert.ToInt32(d.SelectedValue);
int count = Repeater1.Items.Count;
int index = 0;
string cID = d.UniqueID;
while (index < count)
{
if (Repeater1.Items[index].ItemType == ListItemType.Item || Repeater1.Items[index].ItemType == ListItemType.AlternatingItem)
{
if (Repeater1.Items[index].FindControl("ddlstatus") != null)
{
DropDownList ddl = Repeater1.Items[index].FindControl("ddlstatus") as DropDownList;
if (ddl.UniqueID == cID)
{
if (Repeater1.Items[index].FindControl("txtlocation") != null)
{
TextBox txtLoc = Repeater1.Items[index].FindControl("txtlocation") as TextBox;
txtLoc.Text = ((val == 2) ? "Pool" : String.Empty);
}
if (Repeater1.Items[index].FindControl("ddldept") != null)
{
DropDownList ddldept = Repeater1.Items[index].FindControl("ddldept") as DropDownList;
ddldept.Enabled = ((val == 2) ? false : true);
}
if (Repeater1.Items[index].FindControl("txtdriver") != null)
{
TextBox txtLocd = Repeater1.Items[index].FindControl("txtdriver") as TextBox;
txtLocd.Enabled = ((val == 2) ? false : true);
}
}
}
}
index++;
}
}