S
Santosh
Dear all ,
i am writting following code.
if(Page.IsPostBack==false)
{
try
{
BindSectionDropDownlist();
BindSubSectionDropDownlist();
BindSectionLineDropDownlist();
}
catch(Exception ex)
{
Response.Write("<script language=Javascript>alert('"+
ex.Message.ToString()+"');</script>");
}
}
}
// Defination of BindSectionDropDownList
private void BindSectionDropDownlist()
{
DataView dv = new DataView();
dv = objSectionMaster.GetSectionRecForReports();
reportCategory_Dropdownlist.DataTextField="SectionDesc";
reportCategory_Dropdownlist.DataValueField ="sectionId";
reportCategory_Dropdownlist.DataSource=dv;
reportCategory_Dropdownlist.DataBind();
reportCategory_Dropdownlist.Items.Insert(0,new
ListItem("--Select--","--Select--"));
//reportCategoty_DropDownList.SelectedIndex=-1;
}
private void BindSubSectionDropDownlist()
{
DataView dv = new DataView();
dv = objSectionMaster.GetSubSectionRecReports();
subSection_Dropdownlist.DataTextField="SectionDesc";
subSection_Dropdownlist.DataValueField ="sectionId";
subSection_Dropdownlist.DataSource=dv;
subSection_Dropdownlist.DataBind();
subSection_Dropdownlist.Items.Insert(0,new
ListItem("--Select--","--Select--"));
//reportCategoty_DropDownList.SelectedIndex=-1;
}
private void BindSectionLineDropDownlist()
{
DataView dv = new DataView();
dv = objSectionMaster.GetSectionLineRecReports();
sectionLineDesc_DropDownList.DataTextField="SectionLineDescription";
sectionLineDesc_DropDownList.DataValueField ="SectionLineId";
sectionLineDesc_DropDownList.DataSource= dv;
sectionLineDesc_DropDownList.DataBind();
sectionLineDesc_DropDownList.Items.Insert(0,new
ListItem("--Select--","-1"));
//reportCategoty_DropDownList.SelectedIndex=-1;
}
private void search_Button_Click(object sender, System.EventArgs e)
{
selectQuery();
}
selectQuery();
{
//Code for further processing of on the basis of
sectionLineDesc_DropDownList selection
}
selection index of first two dropdownlist is not changed but
the third selected index of third dropdownlist is changed
when i am click on search button.
any help will be greatly appreciated.
i am writting following code.
if(Page.IsPostBack==false)
{
try
{
BindSectionDropDownlist();
BindSubSectionDropDownlist();
BindSectionLineDropDownlist();
}
catch(Exception ex)
{
Response.Write("<script language=Javascript>alert('"+
ex.Message.ToString()+"');</script>");
}
}
}
// Defination of BindSectionDropDownList
private void BindSectionDropDownlist()
{
DataView dv = new DataView();
dv = objSectionMaster.GetSectionRecForReports();
reportCategory_Dropdownlist.DataTextField="SectionDesc";
reportCategory_Dropdownlist.DataValueField ="sectionId";
reportCategory_Dropdownlist.DataSource=dv;
reportCategory_Dropdownlist.DataBind();
reportCategory_Dropdownlist.Items.Insert(0,new
ListItem("--Select--","--Select--"));
//reportCategoty_DropDownList.SelectedIndex=-1;
}
private void BindSubSectionDropDownlist()
{
DataView dv = new DataView();
dv = objSectionMaster.GetSubSectionRecReports();
subSection_Dropdownlist.DataTextField="SectionDesc";
subSection_Dropdownlist.DataValueField ="sectionId";
subSection_Dropdownlist.DataSource=dv;
subSection_Dropdownlist.DataBind();
subSection_Dropdownlist.Items.Insert(0,new
ListItem("--Select--","--Select--"));
//reportCategoty_DropDownList.SelectedIndex=-1;
}
private void BindSectionLineDropDownlist()
{
DataView dv = new DataView();
dv = objSectionMaster.GetSectionLineRecReports();
sectionLineDesc_DropDownList.DataTextField="SectionLineDescription";
sectionLineDesc_DropDownList.DataValueField ="SectionLineId";
sectionLineDesc_DropDownList.DataSource= dv;
sectionLineDesc_DropDownList.DataBind();
sectionLineDesc_DropDownList.Items.Insert(0,new
ListItem("--Select--","-1"));
//reportCategoty_DropDownList.SelectedIndex=-1;
}
private void search_Button_Click(object sender, System.EventArgs e)
{
selectQuery();
}
selectQuery();
{
//Code for further processing of on the basis of
sectionLineDesc_DropDownList selection
}
selection index of first two dropdownlist is not changed but
the third selected index of third dropdownlist is changed
when i am click on search button.
any help will be greatly appreciated.