/// <summary>
 /// This method binds the values to grid on Page load
 /// </summary>
 private void PopulateGrid()
 {
     grdBatchImportConfiguration.CssClass = WELLBOOKSUMMARYCSS;
     grdBatchImportConfiguration.EnableViewState = true;
     grdBatchImportConfiguration.HeaderStyle.CssClass = FIXEDHEADERCSS;
     grdBatchImportConfiguration.HeaderStyle.Height = new Unit(20, UnitType.Pixel);
     grdBatchImportConfiguration.RowStyle.CssClass = EVENROWSTYLECSS;
     grdBatchImportConfiguration.AlternatingRowStyle.CssClass = ODDROWSTYLECSS;
     XmlDocument batchImportDoc = null;
     BatchImportBLL ObjBatchImportBLL = new BatchImportBLL();
     try
     {
         batchImportDoc = ObjBatchImportBLL.GetOnlyBatchImportXML(strBookID);
         //loading grid from values configured in XML
         if (batchImportDoc != null)
         {
             objWellBookBLL = new WellBookBLL();
             DataTable dtResult = objWellBookBLL.GetTypeIIIPagesForBook(strParentSiteURL, strBookID, "No");
             DataView dvResultTable;
             dvResultTable = dtResult.DefaultView;
             dtResult = dvResultTable.ToTable(true, "Page_Name");
             grdBatchImportConfiguration.DataSource = dtResult;
             grdBatchImportConfiguration.DataBind();
             foreach (GridViewRow gdvRow in grdBatchImportConfiguration.Rows)
             {
                 XmlNode node = batchImportDoc.SelectSingleNode("/batchImport[@BookID='" + strBookID + "']/pageName[@name='" + HttpUtility.HtmlDecode(gdvRow.Cells[0].Text) + "']");
                 if (node != null)
                 {
                     TextBox txtSharedAreaPath = (TextBox)gdvRow.FindControl("txtSharedAreaPath");
                     txtSharedAreaPath.Text = node.SelectSingleNode("sharedPath").Attributes["path"].Value;
                     DropDownList cboFileType = (DropDownList)gdvRow.FindControl("cboFileType");
                     foreach (ListItem eachItem in cboFileType.Items)
                     {
                         if (eachItem.Text == node.SelectSingleNode("fileType").Attributes["type"].Value)
                         {
                             eachItem.Selected = true;
                         }
                     }
                     DropDownList cboNamingConvention = (DropDownList)gdvRow.FindControl("cboNamingConvention");
                     foreach (ListItem eachItem in cboNamingConvention.Items)
                     {
                         if (eachItem.Text == node.SelectSingleNode("fileFormat").Attributes["format"].Value)
                         {
                             eachItem.Selected = true;
                         }
                     }
                 }
                 else
                 {
                     gdvRow.Cells[0].ForeColor = Color.Red;
                 }
             }
         }
         //loading grid with default values
         else
         {
             objWellBookBLL = new WellBookBLL();
             DataTable dtResult = objWellBookBLL.GetTypeIIIPagesForBook(strParentSiteURL, strBookID, "No");
             DataView dvResultTable;
             dvResultTable = dtResult.DefaultView;
             dtResult = dvResultTable.ToTable(true, "Page_Name");
             grdBatchImportConfiguration.DataSource = dtResult;
             grdBatchImportConfiguration.DataBind();
         }
     }
     catch (WebException webEx)
     {
         lblException.Text = webEx.Message;
         lblException.Visible = true;
         ExceptionBlock.Visible = true;
     }
     catch (Exception ex)
     {
         CommonUtility.HandleException(strParentSiteURL, ex);
     }
 }