예제 #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();
        }
    }
예제 #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);
    }
예제 #3
0
 protected void ddlReligion_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         DataBindig.BindCast(ddlcast, ddlReligion.SelectedValue);
     }
     catch (Exception ex)
     {
     }
 }
예제 #4
0
 public void BindAllDDL()
 {
     try
     {
         DataBindig.BindReligion(ddlReligion);
         DataBindig.BindTougne(ddlMotherTougue);
         DataBindig.BindCast(ddlCast);
     }
     catch (Exception ex)
     {
         throw;
     }
 }