protected void lstBoxSurveyNo_SelectedIndexChanged(object sender, EventArgs e) { if (lstBoxSurveyNo.SelectedIndex == -1) { } else { grdHolderName.DataSource = null; grdHolderName.DataBind(); grdCheckList.DataSource = null; grdCheckList.DataBind(); lblLinkDrFile.Text = ""; lbllinkMR.Text = ""; lblLinkPR.Text = ""; lblLinkFR.Text = ""; string selectedVillage = cmbVillage.SelectedValue.ToString().Trim(); //string selectFamilyNo = cmbFamily.SelectedValue.ToString().Trim(); string selectedDocNo = cmbFamilyDocNo.SelectedValue.ToString().Trim(); // string selectedSurveyNoMultiple = ""; foreach (ListItem item in lstBoxSurveyNo.Items) { if (item.Selected) { // selectedSurveyNoMultiple += item.Text + "," + item.Value + "\\n"; selectedSurveyNoMultiple += "'" + item.Text + "'" + ","; } } selectedSurveyNoMultiple = selectedSurveyNoMultiple.Remove(selectedSurveyNoMultiple.Length - 1); // string selectedSurveyNo = lstBoxSurveyNo.SelectedValue.ToString().Trim(); //Show Grid Data ShowGridHolderDataNew(selectedVillage, selectedDocNo, selectedSurveyNoMultiple); //dsFamilyDetails = dbFamilyDetailsData.getFamilyDetailsMultipleSurvey(selectedVillage, selectFamilyNo, selectedSurveyNoMultiple); if (dsFamilyDetails.Tables[0].Rows.Count > 0) { //Added RSD 23-08-2019 ShowCheckListGrid(selectedVillage, cmbFamilyDocNo.SelectedValue.ToString().Trim()); //Select File Name from Document if Exist dsDocumentExitsIN = dbDocumentStatusData.DocumentExistIN(cmbVillage.SelectedValue.ToString().Trim(), cmbFamilyDocNo.SelectedValue.ToString().Trim(), selectedListItems()); if (dsDocumentExitsIN.Tables[0].Rows.Count > 0) { string DocType = ""; for (int i = 0; i < dsDocumentExitsIN.Tables[0].Rows.Count; i++) { DocType = dsDocumentExitsIN.Tables[0].Rows[i]["documentcode"].ToString(); if (DocType == "MR") { lbllinkMR.Text = dsDocumentExitsIN.Tables[0].Rows[i]["documentname"].ToString(); //lbllinkMR.Text = dsDocumentExitsIN.Tables[0].Rows[i]["documentname"].ToString(); } if (DocType == "DR") { lblLinkDrFile.Text = dsDocumentExitsIN.Tables[0].Rows[i]["documentname"].ToString(); } if (DocType == "PN") { lblLinkPR.Text = dsDocumentExitsIN.Tables[0].Rows[i]["documentname"].ToString(); } if (DocType == "FR") { lblLinkFR.Text = dsDocumentExitsIN.Tables[0].Rows[i]["documentname"].ToString(); } } } } else { //lblSurveyArea.Text = ""; //grdHolderName.DataSource = null; //grdHolderName.DataBind(); } } }