Exemplo n.º 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();
        }
    }
Exemplo n.º 2
0
    public void BindAllDDLS()
    {
        try
        {
            // DataBindig.BindCast(ddlcast);

            DataBindig.BindEducation(ddlEducation);
            DataBindig.BindFoodDrinkSmoke(rdoDiet, rdoDrink, rdoSmoke);
            DataBindig.BindReligion(ddlReligion);
            DataBindig.BindRashi(ddlRasi);
            DataBindig.BindStar(ddlStar);
            DataBindig.BindHeight(ddlHeight);
            DataBindig.BindBody_Complextion(ddlBodyType, ddlComplextion);
            DataBindig.BindState(ddlState);
            DataBindig.BindProfession(ddlProfession);
            DataBindig.BindTougne(ddlMtoungue);
        }
        catch (Exception ex)
        {
            throw;
        }
    }