Beispiel #1
0
    protected void DVReligion_DataBound(object sender, EventArgs e)
    {
        if (((DetailsView)sender).CurrentMode == DetailsViewMode.Edit)
        {
            DataRowView  row          = (DataRowView)((DetailsView)sender).DataItem;
            DropDownList ddlReligion  = (DropDownList)((DetailsView)sender).FindControl("ddlReligion");
            DropDownList ddlCast      = (DropDownList)((DetailsView)sender).FindControl("ddlCast");
            DropDownList ddlRashi     = (DropDownList)((DetailsView)sender).FindControl("ddlRashi");
            DropDownList ddlStar      = (DropDownList)((DetailsView)sender).FindControl("ddlStar");
            TextBox      txtCastOther = (TextBox)((DetailsView)sender).FindControl("txtCastOther");

//            string javascript = "if (this.options[this.selectedIndex].value =='Others')" +
//"{document.getElementById('" +txtCastOther.ClientID+
//"').style.visibility='visible'} else{document.getElementById('" + txtCastOther.ClientID + "').style.visibility='hidden'};";

            DataBindig.BindReligion(ddlReligion);
            DataBindig.BindStar(ddlStar);
            DataBindig.BindRashi(ddlRashi);
            ddlStar.SelectedValue     = row["Star_Id"].ToString();
            ddlRashi.SelectedValue    = row["Rashi_Id"].ToString();
            ddlReligion.SelectedValue = row["Religion_Id"].ToString();
            DataBindig.BindCast(ddlCast);
            //  ddlCast.Attributes.Add("onchange", javascript);
            ddlCast.SelectedValue = row["Cast_Id"].ToString();
        }
    }
Beispiel #2
0
    protected void ddlReligion_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataRowView  row         = (DataRowView)DVReligion.DataItem;
        DropDownList ddlReligion = (DropDownList)DVReligion.FindControl("ddlReligion");
        DropDownList ddlCast     = (DropDownList)DVReligion.FindControl("ddlCast");

        DataBindig.BindCast(ddlCast, ddlReligion.SelectedValue);
    }
Beispiel #3
0
 protected void ddlReligion_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         DataBindig.BindCast(ddlcast, ddlReligion.SelectedValue);
     }
     catch (Exception ex)
     {
     }
 }
 public void BindAllDDL()
 {
     try
     {
         DataBindig.BindReligion(ddlReligion);
         DataBindig.BindTougne(ddlMotherTougue);
         DataBindig.BindCast(ddlCast);
     }
     catch (Exception ex)
     {
         throw;
     }
 }