title: HtmlAgilityPack get data from Table
body: <p>I want to get the data in columns and rows as on the website but when I get the data down, then it is vertical, now I have to get the data in the table of the website in any way?</p>
  
  <p>I have a table:</p>
  
  <pre><code>&lt;div&gt;
      &lt;span id="ctl00_panelContent_ctl01_ucThongTinThiTruong_lblErr"&gt;&lt;/span&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;div id="ctl00_panelContent_ctl01_ucThongTinThiTruong_grdTT" class="RadGrid RadGrid_Office2007 rgMultiHeader" style="height:700px;width:100%;"&gt;
  
          &lt;div class="rgHeaderWrapper"&gt;&lt;div id="ctl00_panelContent_ctl01_ucThongTinThiTruong_grdTT_GridHeader" class="rgHeaderDiv" style="padding-removed16px;overflow:hidden;"&gt;
  
          &lt;table class="rgMasterTable rgClipCells" border="0" id="ctl00_panelContent_ctl01_ucThongTinThiTruong_grdTT_ctl00_Header" style="width:100%;table-layout:fixed;overflow:hidden;empty-cells:show;"&gt;
              &lt;colgroup&gt;
                  &lt;col style="width:50px" /&gt;
                  &lt;col style="width:70px" /&gt;
                  &lt;col style="width:70px" /&gt;
                  &lt;col style="width:70px;display:none;" /&gt;
                  &lt;col style="width:70px;display:none;" /&gt;
                  &lt;col style="width:70px;display:none;" /&gt;
                  &lt;col style="width:110px" /&gt;
              &lt;/colgroup&gt;
              &lt;thead&gt;
  </code></pre>
  
  <p>this's my code:</p>
  
  <pre><code>var document = webBrowser1.Document;
  var documentAsIHtmlDocument3 = (mshtml.IHTMLDocument3)document.DomDocument;
  
  var htmlString = documentAsIHtmlDocument3.documentElement.innerHTML;
  
  HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
  doc.LoadHtml(htmlString);
  
  // string texts = doc.DocumentNode.SelectSingleNode("//div[@class='inner']/p").InnerText;
  HtmlNodeCollection texts = doc.DocumentNode.SelectNodes("//table[@class='rgMasterTable rgClipCells']");
  string kq = "";
  
  if (texts != null)
  {
  
  
      foreach (var item in texts)
      {
          kq += item.InnerText + Environment.NewLine;
      }
  }
  richTextBox1.Text = kq;
  
  }
  
  
  }
  </code></pre>
  
  <p>This code works fine but the data obtained is 1 vertical, I want to get data on the website as they do how</p>