Bootstrap grid or table for a responsive website? - c#

I am looking to convert a C# ASP.NET MVC 3 web application to a MVC 5. During this process I wish to create a more responsive table through the use of bootstrap. Would it be better to use the bootstrap grid system with using tags or would it be better to utilize a table? Is there a method to increase the number of columns in the grid system to a number greater than 12?
Note:
The new application will utilize bootstrap 3.2.0, jquery 1.11.1, mvc 5.2.0n razor 3.2.0.
The application must work correctly on IE8 (staying on jquery 1.X branch for this reason).
Below is an example table from the current application that I am unsure how to format to have a similar look in a responsive interface.
<table class="Assignmenttable">
<tbody>
<tr class="td">
<th id="Assignment_Title" colspan="4" style="width:20%"> </th>
<th id="blank" class="blank" colspan="1" rowspan="1">
</th>
<th id="Assignment_Title" colspan="9" style="width:30%"> First</th>
<th id="blank" class="blank" colspan="1" rowspan="1">
</th>
<th id="Assignment_Title" colspan="9" style=" width:30%"> Second</th>
<th id="blank" class="blank" colspan="1" rowspan="1">
</th>
<th id="Assignment_Title" colspan="4" style="width:11%"> Complete</th>
</tr>
<tr class="td">
<th rowspan="3" colspan="1" style="font-size: medium">Assignment</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Woot</th>
<th id="blank" class="blank" colspan="1" rowspan="1">
</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Task 1</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Task 2</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Task 3</th>
<th id="blank" class="blank" colspan="1" rowspan="1">
</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Task 4</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Task 5</th>
<th colspan="3" rowspan="2" style="font-size: medium; min-width:12%">Task 6</th>
<th id="blank" class="blank" colspan="1" rowspan="1">
</th>
<th colspan="4" rowspan="2" style="font-size: medium; min-width:12%">Task 7</th>
</tr>
<tr class="td">
<th id="blank" class="blank" colspan="1">
</th>
<th id="blank" class="blank" colspan="1">
</th>
<th id="blank" class="blank" colspan="1">
</th>
</tr>
<tr class="td">
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th id="blank" class="blank" colspan="1" rowspan="1"></th>
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th id="blank" class="blank" colspan="1" rowspan="1"></th>
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th></th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
<th id="blank" class="blank" colspan="1" rowspan="1"></th>
<th> P1 </th>
<th colspan=""> P2</th>
<th id="topBarDates">PL</th>
<th id="topBarDates">LE</th>
</tr>
<!-- This row is for each assignment entry-->
<tr class="td" style="height: 60px; max-height: 100px">
<td id="td" class="td" style="width: 350px">
Project 2
</td>
<td id="LongDelay" align="center">
<input id="item_Shipped" name="item.task1" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.task1" type="hidden" value="false">
</td>
<td id="ProjectDate">11-Apr-13</td>
<td id="ProjectDate">17-Aug-13</td>
<td id="blank" class="blank" colspan="1"></td>
<td id="LongDelay" align="center">
<input checked="checked" id="item_taskComplete" name="item.taskComplete" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.taskComplete" type="hidden" value="false">
</td>
<td id="ProjectDate">
05-Apr-14
</td>
<td id="ProjectDate">
04-Aug-14
</td>
<td id="LongDelay" align="center">
<input id="item_taskComplete" name="item.task" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.task" type="hidden" value="false">
</td>
<td id="ProjectDate">18-Apr-14</td>
<td id="ProjectDate">06-Aug-14</td>
<td id="LongDelay" align="center">
<input checked="checked" id="item_taskComplete" name="item.taskComplete" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.taskComplete" type="hidden" value="false">
</td>
<td id="ProjectDate">
21-Feb-14
</td>
<td id="ProjectDate">
15-Apr-14
</td>
<td id="blank" class="blank" colspan="1"></td>
<td id="SlightDelay" align="center">
<input checked="checked" id="item_taskComplete" name="item.taskComplete" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.taskComplete" type="hidden" value="false">
</td>
<td title="" id="ProjectDate">28-Mar-14</td>
<td title="" id="ProjectDate">11-Apr-14</td>
<td id="LongDelay" align="center">
<input id="item_task6" name="item.task6" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.task6" type="hidden" value="false">
</td>
<td title="" id="ProjectDate">15-Apr-14</td>
<td title="" id="ProjectDate">28-Aug-14</td>
<td colspan="3"></td>
<td id="blank" class="blank" colspan="1"></td>
<td id="LongDelay" align="center">
<input id="item_taskAccepted" name="item.taskAccepted" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.taskAccepted" type="hidden" value="false">
</td>
<td id="LongDelay" align="center">
<input id="item_task2Accepted" name="item.task2Accepted" onclick="return false" onkeydown="return false" type="checkbox" value="true"><input name="item.task2Accepted" type="hidden" value="false">
</td>
<td id="ProjectDate">30-Apr-14 </td>
<td id="ProjectDate">07-Aug-14</td>
</tr>
<tr style="height: 4px">
<th id="blank" class="blank" colspan="29"></th>
</tr>
</tbody>
</table>
Thanks in advance for any advice!

You can look into Bootstrap Tables.
Between choosing to use Tables or Grid, it entirely depends on what you're trying to show. Without proper examples, it's hard to really suggest which one is better to use.
If you want use Bootstrap's table for your code, it's as easy as just putting a .table class for your <table> element. Then, for it to properly scale you need to remove the inline styles attached to your <th>, <tr>, and <td> elements. Even the colspans.

Related

Convert a HTML Table with rowspans to DataTable C#

I need to convert a Html Table to DataTable in C#. I used HtmlAgilityPack but it does not convert it well because of rowspans.
The code I am currently using is:
private static DataTable convertHtmlTableToDataTable()
{
WebClient webClient = new WebClient();
string urlContent = webClient.DownloadString("http://example.com");
string tableCode = getTableCode(urlContent);
string htmlCode = tableCode.Replace(" ", " ");
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(htmlCode);
var headers = doc.DocumentNode.SelectNodes("//tr/th");
DataTable table = new DataTable();
foreach (HtmlNode header in headers)
{
table.Columns.Add(header.InnerText);
}
foreach (var row in doc.DocumentNode.SelectNodes("//tr[td]"))
{
table.Rows.Add(row.SelectNodes("td").Select(td => td.InnerText).ToArray());
}
return table;
}
And this is a part of Html Table:
<table class="tabel" cellspacing="0" border="0">
<caption style="font-family:Verdana; font-size:20px;">SEMGRP</caption>
<tr>
<th class="celula" >Ora</th>
<th class="latime_celula celula">Luni</th>
<th class="latime_celula celula">Marti</th>
<th class="latime_celula celula">Miercuri</th>
<th class="latime_celula celula">Joi</th>
<th class="latime_celula celula">Vineri</th>
</tr>
<tr>
<td class="celula" nowrap="nowrap">8-9</td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center">
Curs
<br />
<a class="link_celula" href="afis_n0.php?id_tip=287&tip=p">Prof</a>
<br />
<a class="link_celula" href="afis_n0.php?id_tip=9&tip=s">Sala</a>
<br />
</td>
</tr>
</table>
</td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center">
Curs
<br />
<a class="link_celula" href="afis_n0.php?id_tip=287&tip=p">Prof</a>
<br />
<a class="link_celula" href="afis_n0.php?id_tip=12&tip=s">Sala</a>
<br />
</td>
</tr>
</table>
</td>
<td class="celula"> </td>
<td class="celula"> </td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center">
Curs
<br />
<a class="link_celula" href="afis_n0.php?id_tip=293&tip=p">Prof</a>
<br />
<a class="link_celula" href="afis_n0.php?id_tip=9&tip=s">Sala</a>
<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="celula" nowrap="nowrap">9-10</td>
<td class="celula"> </td>
<td class="celula"> </td>
</tr>
<tr>
<td class="celula" nowrap="nowrap">10-11</td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center"> Curs
<br /><a class="link_celula" href="afis_n0.php?id_tip=303&tip=p">Prof</a>
<br /><a class="link_celula" href="afis_n0.php?id_tip=9&tip=s">Sala</a>
<br />
</td>
</tr>
</table>
</td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center"> Curs
<br />
<a class="link_celula" href="afis_n0.php?id_tip=331&tip=p">Prof</a>
<br />
<a class="link_celula" href="afis_n0.php?id_tip=14&tip=s">Sala</a>
<br />
</td>
</tr>
</table>
</td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center"> Curs
<br /><a class="link_celula" href="afis_n0.php?id_tip=330&tip=p">Prof</a>
<br /><a class="link_celula" href="afis_n0.php?id_tip=9&tip=s">Sala</a>
<br />
</td>
</tr>
</table>
</td>
<td class="celula"> </td>
<td class="celula" rowspan="2">
<table border="0" align="center">
<tr>
<td nowrap="nowrap" align="center"> Curs
<br />
<a class="link_celula" href="afis_n0.php?id_tip=293&tip=p">Prof</a>
<br />
<a class="link_celula" href="afis_n0.php?id_tip=10&tip=s">Sala</a> <br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="celula" nowrap="nowrap">11-12</td>
<td class="celula"> </td>
</tr>
<tr>
I tried some solutions but I did not find any good...
Thanks for any help in advance.

Failed to load pdf file generated by itextsharp

I am facing an error in generating a proper PDF Document. the code i have, can generate a pdf document, it can download the document, but the issue is i cannot view the view the document. This is the Page I am trying to export to pdf.
Here is my code so far:
ASPX:
<asp:Button ID="btnDownload" CssClass="btn" runat="server" Text="Download Invoice" OnClick="btnDownload_Click" />
<asp:Panel ID="pnl" runat="server">
<div id="page-wrap">
<textarea id="header" style="height: 30px">PAYMENT DETAILS</textarea>
<div id="identity">
<textarea style="background-color: #F7F7F7;" readonly="readonly" id="address">My Name
My Street Address
Phone: 111-111-111</textarea>
<div id="logo">
<div id="logoctr">
</div>
<div id="logohelp">
<input id="imageloc" readonly="readonly" type="text" size="50" value="" /><br />
(max width: 540px, max height: 100px)
</div>
<img id="image" src="images/logo.png" alt="logo" />
</div>
</div>
<div style="clear: both"></div>
<div id="customer">
<textarea id="tbCustomer" readonly="readonly" runat="server"></textarea>
<table id="meta">
<tr>
<td class="meta-head">Payment ID</td>
<td>
<textarea readonly="readonly" runat="server" id="tbPID"></textarea></td>
</tr>
<tr>
<td class="meta-head">Date</td>
<td>
<textarea id="date" readonly="readonly" runat="server"></textarea></td>
</tr>
<tr>
<td class="meta-head">Amount Due</td>
<td>
<div class="due">
$
<asp:Label ID="lblTotal" runat="server" Text="Total"></asp:Label>
</div>
</td>
</tr>
</table>
</div>
<table id="items">
<tr>
<th>Property Title</th>
<th>Description</th>
<th>Status</th>
<th>Invoiced By</th>
<th>Total Payment</th>
</tr>
<tr class="item-row">
<td class="item-name">
<div class="delete-wpr">
<textarea readonly="readonly" id="tbTitle" runat="server"></textarea>
</div>
</td>
<td class="description">
<div contenteditable="true" id="tbDetail" class="blank" runat="server">
</div>
</td>
<td>
<textarea id="tbStatus" runat="server" readonly="readonly">PAID</textarea></td>
<td>
<textarea class="qty" readonly="readonly" id="tbInvoicedBy" runat="server"></textarea></td>
<td><span class="price">$
<asp:Label ID="tbTotal1" runat="server" Text="Total"></asp:Label></span></td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Vaccant</td>
<td class="total-value">
<div id="subtotal">$<asp:Label ID="lblVaccant" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Maintainance</td>
<td class="total-value">
<div id="total">$<asp:Label ID="lblMaintainance" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Property Insurance</td>
<td class="total-value">
<div id="Insurance">$<asp:Label ID="lblInsurance" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Dewa Bill</td>
<td class="total-value">
<div id="dewa">$<asp:Label ID="lblDewa" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Furnishing Cost</td>
<td class="total-value">
<div id="FurnishingCost">$<asp:Label ID="lblFurnishing" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Cleaning Fees</td>
<td class="total-value">
<div id="CleaningFees">$<asp:Label ID="lblCleaning" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">House Keeping</td>
<td class="total-value">
<div id="HouseKeeping">$<asp:Label ID="lblHouseKeeping" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Next Rent Due</td>
<td class="total-value">
<div id="paid">$<asp:Label ID="lblNextRent" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Rental Comission</td>
<td class="total-value">
<div id="RentalComission">$<asp:Label ID="lblRentalComission" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Credit Card Fees</td>
<td class="total-value">
<div id="CreditCardFees">$<asp:Label ID="lblCreditCardFees" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Pest Control</td>
<td class="total-value">
<div id="PestControl">$<asp:Label ID="lblPestControl" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Chillar Utilities</td>
<td class="total-value">
<div id="ChillarUtilities">$<asp:Label ID="lblChillarUtilities" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line">Du, etisilate wifi</td>
<td class="total-value">
<div id="DuEtisilatewifi">$<asp:Label ID="lblDuEtisilateWifi" runat="server" Text=""></asp:Label></div>
</td>
</tr>
<tr>
<td colspan="2" class="blank"></td>
<td colspan="2" class="total-line balance">Total Payment</td>
<td class="total-value balance">
<div class="due">$<asp:Label ID="lblTotal2" runat="server" Text=""></asp:Label></div>
</td>
</tr>
</table>
<div id="terms">
<h5>Terms</h5>
<textarea readonly="readonly">These payment details are final and non negotiable.</textarea>
</div>
</div>
</asp:Panel>
ASPX.CS
public void ExportToPDF()
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Panel.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
pnl.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
sw.Close();
htmlparser.Close();
Response.Write(pdfDoc);
Response.End();
}
also it says the HTMLWorker class is obsolete.

How to get rows from Html.grid when checked

I have a grid like so:
<div class="div_100">
#Html.Grid(Model).Named("grid").Columns(columns =>
{
columns.Add()
.Encoded(false)
.Sanitized(false)
.SetWidth(30)
.Titled("Verzenden")
.RenderValueAs(n => Html.CheckBox("Verzonden", !n.Verzonden));
columns.Add(n => n.StartDatum).Titled("Start datum").Sortable(true).SetWidth(100);
columns.Add(n => n.EindDatum).Titled("Eind datum").Sortable(true).SetWidth(100);
columns.Add(n => n.Impact).Titled("Impact").Sortable(true).SetWidth(100);
columns.Add(n => n.NotificatieType.Type).Titled("Type").Sortable(true).SetWidth(100);
columns.Add(n => n.Omschrijving).Titled("Omschrijving").Sortable(true).SetWidth(100);
columns.Add(n => n.Diensten).Titled("Diensten").Sortable(true).SetWidth(100);
columns.Add(n => n.ID).Titled("ID").Sortable(true).SetWidth(100);
}).Filterable().SetLanguage("nl")
</div>
With quite some effort I've been able to add checkboxes.
now when i create the checkboxes i check them by default !n.Verzonden = always false
i check them true by default since it's way less likely for one to be unchecked (9 out of 10 times they need to be checked so this saves the user some time)
Now when the user is done on this page and presses a button i want all the columns.Add(n => n.ID).Titled("ID") ID's from the rows which are selected.
so how do i get all the ID's of the checked rows?
I'm currently using $.post to communicate with my controller but maybe there's a better way, for example just sending the model, i used to populate the grid with, back by a submit button or something (not that good at the whole mvc thing yet)
EDIT
The rendered html:
<div class="div_100">
<div class="grid-mvc" data-lang="nl" data-gridname="grid" data-selectable="true" data-multiplefilters="false">
<div class="grid-wrap">
<table class="table table-striped grid-table">
<thead>
<tr>
<th class="grid-header" style="width:30px;">
<div class="grid-header-title">
<span>Verzenden</span>
</div>
</th>
<th class="grid-header" style="width:100px;">
<div class="grid-filter" data-filterdata="[]" data-name="StartDatum" data-type="System.DateTime" data-widgetdata="null">
<span class="grid-filter-btn" title="Filter this column"></span>
</div>
<div class="grid-header-title">
Start datum
</div>
</th>
<th class="grid-header" style="width:100px;">
<div class="grid-filter" data-filterdata="[]" data-name="EindDatum" data-type="System.DateTime" data-widgetdata="null">
<span class="grid-filter-btn" title="Filter this column"></span>
</div>
<div class="grid-header-title">Eind datum</div>
</th>
<th class="grid-header" style="width:100px;"><div class="grid-filter" data-filterdata="[]" data-name="Impact" data-type="System.String" data-widgetdata="null"><span class="grid-filter-btn" title="Filter this column"></span></div><div class="grid-header-title">Impact</div></th>
<th class="grid-header" style="width:100px;"><div class="grid-filter" data-filterdata="[]" data-name="NotificatieType.Type" data-type="System.String" data-widgetdata="null"><span class="grid-filter-btn" title="Filter this column"></span></div><div class="grid-header-title">Type</div></th>
<th class="grid-header" style="width:100px;"><div class="grid-filter" data-filterdata="[]" data-name="Omschrijving" data-type="System.String" data-widgetdata="null"><span class="grid-filter-btn" title="Filter this column"></span></div><div class="grid-header-title">Omschrijving</div></th>
<th class="grid-header" style="width:100px;"><div class="grid-filter" data-filterdata="[]" data-name="Diensten" data-type="System.String" data-widgetdata="null"><span class="grid-filter-btn" title="Filter this column"></span></div><div class="grid-header-title">Diensten</div></th>
<th class="grid-header" style="width:100px;"><div class="grid-filter" data-filterdata="[]" data-name="ID" data-type="System.Guid" data-widgetdata="null"><span class="grid-filter-btn" title="Filter this column"></span></div><div class="grid-header-title">ID</div></th>
</tr>
</thead>
<tbody>
<tr class="grid-row ">
<td class="grid-cell" data-name="">
<input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" />
</td>
<td class="grid-cell" data-name="StartDatum">25-7-2014 10:00:00</td>
<td class="grid-cell" data-name="EindDatum">25-7-2014 11:00:00</td>
<td class="grid-cell" data-name="Impact">Volledige onderbreking</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Test</td>
<td class="grid-cell" data-name="Diensten">Volledige dienstverlening</td>
<td class="grid-cell" data-name="ID">3a2a53b9-d92a-4504-874d-5a901ad01041</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">25-7-2014 12:00:00</td>
<td class="grid-cell" data-name="EindDatum">25-7-2014 13:00:00</td>
<td class="grid-cell" data-name="Impact">Volledige onderbreking</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Test</td>
<td class="grid-cell" data-name="Diensten">Volledige dienstverlening</td>
<td class="grid-cell" data-name="ID">4c499f6c-53c8-49e0-b529-8b045819be10</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">25-7-2014 13:00:00</td>
<td class="grid-cell" data-name="EindDatum">25-7-2014 15:00:00</td>
<td class="grid-cell" data-name="Impact">Volledige onderbreking</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving"></td>
<td class="grid-cell" data-name="Diensten">Volledige dienstverlening</td>
<td class="grid-cell" data-name="ID">977885c5-4c12-431b-ab72-59383b1824c6</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">28-7-2014 10:00:00</td>
<td class="grid-cell" data-name="EindDatum">28-7-2014 11:00:00</td>
<td class="grid-cell" data-name="Impact">Gedeeltelijke onderbreking van de dienstverlening</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Update print servers</td>
<td class="grid-cell" data-name="Diensten">Gedeeltelijke service</td>
<td class="grid-cell" data-name="ID">af4ed8cb-d033-47a4-96ae-f379bb484532</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">30-7-2014 10:00:00</td>
<td class="grid-cell" data-name="EindDatum">30-7-2014 14:00:00</td>
<td class="grid-cell" data-name="Impact">Gedeeltelijke onderbreking van de dienstverlening</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Niets</td>
<td class="grid-cell" data-name="Diensten">Volledige service</td>
<td class="grid-cell" data-name="ID">f2388fba-27ab-417a-ab39-a221d9d82fd3</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">30-7-2014 10:00:00</td>
<td class="grid-cell" data-name="EindDatum">30-7-2014 14:00:00</td>
<td class="grid-cell" data-name="Impact">Gedeeltelijke onderbreking van de dienstverlening</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Niets</td>
<td class="grid-cell" data-name="Diensten">Volledige service</td>
<td class="grid-cell" data-name="ID">3232fc33-0f82-4f76-a323-7ee988c4069a</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">30-7-2014 10:00:00</td>
<td class="grid-cell" data-name="EindDatum">30-7-2014 14:00:00</td>
<td class="grid-cell" data-name="Impact">Gedeeltelijke onderbreking van de dienstverlening</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Niets</td>
<td class="grid-cell" data-name="Diensten">Volledige service</td>
<td class="grid-cell" data-name="ID">b9c2ff88-f469-49f0-a23c-86ddb8bf7808</td>
</tr>
<tr class="grid-row ">
<td class="grid-cell" data-name=""><input checked="checked" id="Verzonden" name="Verzonden" type="checkbox" value="true" /><input name="Verzonden" type="hidden" value="false" /></td>
<td class="grid-cell" data-name="StartDatum">31-7-2014 11:00:00</td>
<td class="grid-cell" data-name="EindDatum">31-7-2014 14:00:00</td>
<td class="grid-cell" data-name="Impact">Gedeeltelijke onderbreking van de dienstverlening</td>
<td class="grid-cell" data-name="NotificatieType.Type">onderhoud</td>
<td class="grid-cell" data-name="Omschrijving">Niets</td>
<td class="grid-cell" data-name="Diensten">Volledige service</td>
<td class="grid-cell" data-name="ID">ecaa15da-0b91-4410-97ad-ba58148ebe4f</td>
</tr>
</tbody>
</table>
</div>
</div>
Try
$('input:checked').each(function () {
var row = $(this).closest('tr');
var ID = row.children('td').eq(7).text();
alert(ID); // for testing - don't know what you want to do with the ID's
});

Infragistics Grid Header Alignment Issue in all browsers except I.E

I am using Infragistics version 7.1 (NetAdvantage 2008 vol 3 ) . I have a problem with UltraWebGrid headers alignment. when the grid is shown the headers of columns lose their alignment in all browsers except IE from content and footers I have already searched a lot for solution. Some solutions i tried are as follows:
1) Setting UseFixedHeaders to False.
2) Adding HtmlTextWriter in Render Event.
3) Setting Percentages for width rather than pixels.
4) Setting percentages for headers along with columns.
5) Adding Scrollbar button to Header along with other contents.
I cannot remove/ replace infragistics grid with some other sorcery. Any guidance will be highly appreciated.
Aspx File:
<%# Register Assembly="Infragistics2.WebUI.UltraWebGrid.ExcelExport.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid.ExcelExport" TagPrefix="igtblexp" %>
<%# Register Assembly="Infragistics2.WebUI.Misc.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<%# Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<asp:Content ID="Content2" runat="Server" ContentPlaceHolderID="ContentPlaceHolder1">
<script language="javascript" type="text/javascript">
function SetVerticalScrollBar() {
var div = document.getElementById('ctl00xContentPlaceHolder1xgridReportMain_div');
var hasVerticalScrollbar = div.scrollHeight > div.clientHeight;
var div1 = document.getElementById('ctl00xContentPlaceHolder1xgridReportMain_hdiv');
// alert(hasVerticalScrollbar);
if (hasVerticalScrollbar) {
div1.style.overflowY = 'scroll';
} else {
div1.style.overflowY = 'hidden';
}
}
</script>
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="100%"
InitializePanel="WebAsyncRefreshPanel1_InitializePanel" RefreshComplete="WebAsyncRefreshPanel1_RefreshComplete" Width="100%"
ToolTip="Filter Records" RefreshTargetIDs="lblTest">
<igtbl:UltraWebGrid ID="gridReportMain" runat="server" OnInitializeLayout="gridReportMain_InitializeLayout"
OnInitializeRow="gridReportMain_InitializeRow" OnPageIndexChanged="gridReportMain_PageIndexChanged"
OnSortColumn="gridReportMain_SortColumn" Style="left: 0px; top: 0px" OnItemCommand="gridReportMain_ItemCommand"
Height="380px" Width="1000px">
</igtbl:UltraWebGrid>
</igmisc:WebAsyncRefreshPanel>
Aspx.cs File
protected override void Render(HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
HtmlTextWriter tw = new HtmlTextWriter(new System.IO.StringWriter(sb));
//Render the page to the new HtmlTextWriter which actually writes to the stringbuilder
base.Render(tw);
//Get the rendered content
string sContent = sb.ToString();
// sContent=Util.SetCaptionWidth(sContent, gridReportMain);
sContent = Util.HandleColGroup(sContent, null);
//Now output it to the page, if you want
writer.Write(sContent);
// .... render using the provided writUtier
}
public void BindGrid()
{
gridReportMain.Columns.FromKey("col1").Width = Unit.Percentage(8);
gridReportMain.Columns.FromKey("col1").CellStyle.HorizontalAlign = HorizontalAlign.Center;
gridReportMain.Columns.FromKey("col2").Width = Unit.Percentage(17);
gridReportMain.Columns.FromKey("col2").CellStyle.HorizontalAlign = HorizontalAlign.Center;
gridReportMain.Columns.FromKey("col3").Width = Unit.Percentage(35);
gridReportMain.Columns.FromKey("col3").CellStyle.Wrap = true;
gridReportMain.Columns.FromKey("col3").CellStyle.HorizontalAlign = HorizontalAlign.Left;
gridReportMain.Columns.FromKey("col4").Width = Unit.Percentage(20);
gridReportMain.Columns.FromKey("col4").CellStyle.HorizontalAlign = HorizontalAlign.Center;
gridReportMain.Columns.FromKey("col5").CellStyle.Width = Unit.Percentage(20);
gridReportMain.Columns.FromKey("col5").CellStyle.HorizontalAlign = HorizontalAlign.Right;
}
//Rendered HTML of code by chrome browser is as follows
<div id="ctl00_ContentPlaceHolder1_WebAsyncRefreshPanel1" style="width: 100%; height: 100%;">
<input type="hidden" id="ctl00_ContentPlaceHolder1_gridReportMain" name="ctl00xContentPlaceHolder1xgridReportMain" value="">
<table border="0" cellpadding="0" cellspacing="0" id="ctl00xContentPlaceHolder1xgridReportMain_main" style="overflow: hidden; table-layout: fixed; position: relative; width: 100%; height: 420px;" class="ig_a92c6fb9_0" onresize="igtbl_onResize('ctl00xContentPlaceHolder1xgridReportMain');" onmousemove="igtbl_tableMouseMove(event,'ctl00xContentPlaceHolder1xgridReportMain');" onmouseup="igtbl_tableMouseUp(event,'ctl00xContentPlaceHolder1xgridReportMain');">
<tbody>
<tr style="">
<td align="left" style="overflow: hidden; width: 100%;">
<div id="ctl00xContentPlaceHolder1xgridReportMain_hdiv" onscroll="igtbl_onStationaryMarginScroll(event, 'ctl00xContentPlaceHolder1xgridReportMain', 'ctl00xContentPlaceHolder1xgridReportMain_hdiv')" style="overflow: hidden; width: 100%; position: relative;">
<table border="0" cellpadding="0" cellspacing="0" style="position: relative; table-layout: fixed; height: 100%; left: 0px;" bandno="0" width="100%">
<colgroup>
<col width="3%">
<col width="8%">
<col width="17%">
<col width="35%">
<col width="20%">
<col width="">
</colgroup>
<thead class="ig_a92c6fb9_2 ig_a92c6fb9_4" onmousedown="igtbl_headerClickDown(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseup="igtbl_headerClickUp(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseout="igtbl_headerMouseOut(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmousemove="igtbl_headerMouseMove(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseover="igtbl_headerMouseOver(event,"ctl00xContentPlaceHolder1xgridReportMain");" oncontextmenu="igtbl_headerContextMenu(event,"ctl00xContentPlaceHolder1xgridReportMain");" ondblclick="igtbl_cellDblClick(event,"ctl00xContentPlaceHolder1xgridReportMain");">
<tr>
<th width="22px" height="21px">
<img src="/WebResource.axd?d=7pWSBIm8MJIGEb1Wa5NJl8vAQvyUcqnpFOduPjzVgdJugewSUhKHTQd6piYU4mvepwpZ0y9a-4ZQxtK6QCPcx7x1pdSR9sId6hyI6JggZaIW2Azd88swUnViW5RwSJFzBhHQxK_x-HAm2_7aBziVikxEEMyVFLgBQCk5MN44TpZWHnFoRlSrLaRv4OPBV-S3SAn5Jw2&t=634992170622404219" border="0" imgtype="blank" style="visibility: hidden;"></th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_c_0_0" columnno="0" height="21px">
<nobr>col1</nobr>
</th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_c_0_1" columnno="1" height="21px">
<nobr>Col2</nobr>
</th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_c_0_2" columnno="2" height="21px">
<nobr>col3</nobr>
</th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_c_0_3" columnno="3" height="21px">
<nobr>Col4</nobr>
</th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_c_0_4" columnno="4" height="21px">
<nobr>col5</nobr>
</th>
</tr>
</thead>
</table>
</div>
</td>
</tr>
<tr id="ctl00xContentPlaceHolder1xgridReportMain_mr" style="height: 100%;">
<td id="ctl00xContentPlaceHolder1xgridReportMain_mc" align="left" style="height: 100%; width: 100%; vertical-align: top;">
<div id="ctl00xContentPlaceHolder1xgridReportMain_div" style="overflow: hidden; overflow-y: auto; width: 100%; height: 100%;" onscroll="igtbl_onScroll(event,"ctl00xContentPlaceHolder1xgridReportMain");" tabindexpage="0" hidefocus="true">
<table id="G_ctl00xContentPlaceHolder1xgridReportMain" bandno="0" border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 100%; position: relative;" onselectstart="igtbl_selectStart(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmousedown="igtbl_cellClickDown(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseup="igtbl_cellClickUp(event,"ctl00xContentPlaceHolder1xgridReportMain");" oncontextmenu="igtbl_cellContextMenu(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmousemove="igtbl_cellMouseMove(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseover="igtbl_cellMouseOver(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseout="igtbl_cellMouseOut(event,"ctl00xContentPlaceHolder1xgridReportMain");" ondblclick="igtbl_cellDblClick(event,"ctl00xContentPlaceHolder1xgridReportMain");">
<colgroup>
<col width="3%">
<col width="8%">
<col width="17%">
<col width="35%">
<col width="20%">
<col width="">
</colgroup>
<thead class="ig_a92c6fb9_2 ig_a92c6fb9_4" style="height: 21px; display: none;" onmousedown="igtbl_headerClickDown(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseup="igtbl_headerClickUp(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseout="igtbl_headerMouseOut(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmousemove="igtbl_headerMouseMove(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseover="igtbl_headerMouseOver(event,"ctl00xContentPlaceHolder1xgridReportMain");" oncontextmenu="igtbl_headerContextMenu(event,"ctl00xContentPlaceHolder1xgridReportMain");">
<tr>
<th height="21px">
<img src="/WebResource.axd?d=7pWSBIm8MJIGEb1Wa5NJl8vAQvyUcqnpFOduPjzVgdJugewSUhKHTQd6piYU4mvepwpZ0y9a-4ZQxtK6QCPcx7x1pdSR9sId6hyI6JggZaIW2Azd88swUnViW5RwSJFzBhHQxK_x-HAm2_7aBziVikxEEMyVFLgBQCk5MN44TpZWHnFoRlSrLaRv4OPBV-S3SAn5Jw2&t=634992170622404219" border="0" imgtype="blank" style="visibility: hidden;"></th>
<th id="Th1" columnno="0" height="21px"> </th>
<th id="Th2" columnno="1" height="21px"> </th>
<th id="Th3" columnno="2" height="21px"> </th>
<th id="Th4" columnno="3" height="21px"> </th>
<th id="Th5" columnno="4" height="21px"> </th>
</tr>
</thead>
<tbody style="height: 100%" class="ig_a92c6fb9_2 ig_a92c6fb9_4">
<tr id="ctl00xContentPlaceHolder1xgridReportMain_r_0" style="height: 21px;" level="0">
<th id="ctl00xContentPlaceHolder1xgridReportMain_l_0" style="width: 22px; height: 21px;">
<img src="/WebResource.axd?d=7pWSBIm8MJIGEb1Wa5NJl8vAQvyUcqnpFOduPjzVgdJugewSUhKHTQd6piYU4mvepwpZ0y9a-4ZQxtK6QCPcx7x1pdSR9sId6hyI6JggZaIW2Azd88swUnViW5RwSJFzBhHQxK_x-HAm2_7aBziVikxEEMyVFLgBQCk5MN44TpZWHnFoRlSrLaRv4OPBV-S3SAn5Jw2&t=634992170622404219" border="0" imgtype="blank" style="visibility: hidden;"></th>
<td class="ig_a92c6fb9_15" level="0_0" id="ctl00xContentPlaceHolder1xgridReportMain_rc_0_0">
<nobr>1</nobr>
</td>
<td class="ig_a92c6fb9_16" level="0_1" id="ctl00xContentPlaceHolder1xgridReportMain_rc_0_1">
<nobr><div style="text-align:center">row1col2</div></nobr>
</td>
<td class="ig_a92c6fb9_17" level="0_2" id="ctl00xContentPlaceHolder1xgridReportMain_rc_0_2">
<div style="text-align: left">Row1Col3</div>
</td>
<td class="ig_a92c6fb9_18" level="0_3" id="ctl00xContentPlaceHolder1xgridReportMain_rc_0_3">
<nobr><div style="text-align:center">row1col4</div></nobr>
</td>
<td class="ig_a92c6fb9_19" level="0_4" id="ctl00xContentPlaceHolder1xgridReportMain_rc_0_4">
<nobr><div style="text-align:right">row1col5</div></nobr>
</td>
</tr>
</tbody>
<tfoot class="ig_a92c6fb9_2 ig_a92c6fb9_4 ig_a92c6fb9_5" style="height: 21px;" onmousedown="igtbl_headerClickDown(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseup="igtbl_headerClickUp(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseout="igtbl_headerMouseOut(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmousemove="igtbl_headerMouseMove(event,"ctl00xContentPlaceHolder1xgridReportMain");" onmouseover="igtbl_headerMouseOver(event,"ctl00xContentPlaceHolder1xgridReportMain");" oncontextmenu="igtbl_headerContextMenu(event,"ctl00xContentPlaceHolder1xgridReportMain");">
<tr>
<th height="21px">
<img src="/WebResource.axd?d=7pWSBIm8MJIGEb1Wa5NJl8vAQvyUcqnpFOduPjzVgdJugewSUhKHTQd6piYU4mvepwpZ0y9a-4ZQxtK6QCPcx7x1pdSR9sId6hyI6JggZaIW2Azd88swUnViW5RwSJFzBhHQxK_x-HAm2_7aBziVikxEEMyVFLgBQCk5MN44TpZWHnFoRlSrLaRv4OPBV-S3SAn5Jw2&t=634992170622404219" border="0" imgtype="blank" style="visibility: hidden;"></th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_f_0_0" height="21px" key="col1"> </th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_f_0_1" height="21px" key="col2">
<nobr>Total</nobr>
</th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_f_0_2" height="21px" key="col3"> </th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_f_0_3" height="21px" key="SubmissionDate"> </th>
<th id="ctl00xContentPlaceHolder1xgridReportMain_f_0_4" height="21px" key="TotalValueOfServices">
<nobr>10,302</nobr>
</th>
</tr>
</tfoot>
</table>
</div>
</td>
</tr>
<tr style="height: 1%">
<td id="ctl00$ContentPlaceHolder1$gridReportMain_pager" align="Right" class="ig_a92c6fb9_0 ig_a92c6fb9_1" style="border-top-width: 0px; height: 100%;" onclick="igtbl_onPagerClick('ctl00xContentPlaceHolder1xgridReportMain',event)"> </td>
</tr>
</tbody>
</table>
</div>

Parse HTML with HTML Agility Pack

I need to parse HTML file with HTML Agility Pack. Here is div with class attribute = divTableBodyText and table inside it. I need to get table's content. I created class for data but don't know how get data.
<html>
<body>
<div class="divTableBodyText">
<table class="tableBodyText fdff_L" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<span class="fontSize textBold">Выберите тариф.</span> Разница цен в пределах одного
типа тарифа может возникнуть из-за условий выполнения рейса, связанных с колличеством
пересадок и доступностью мест. Цены указаны для взрослого пассажира с учетом Сборов
/ Налогов.
</td>
</tr>
<tr>
<td>
</td>
</tr>
</tbody>
</table>
<div class="FFInfoPanel">
</div>
<table class="fdff_tableFF" cellspacing="0">
<tbody>
<tr>
<th>
</th>
<th>
Тип тарифа
</th>
<th width="55%">
Описание тарифа
</th>
<th>
Минимальная цена
</th>
<th>
Другие авиарейсы
</th>
</tr>
<tr class="">
<td style="background-color: rgb(255, 255, 255); border-right: medium none; padding: 0px 4px 0px 0px;">
</td>
<td class="textBold" width="15%">
Special-Kazakhstan
</td>
<td class="wrap" id="FN_0" width="55%">
Специальный тариф экономического класса с ограничениями <a href="javascript:fareFamilyDescriptionPopUp.redirectToAnExternalPopUp('http://www.airastana.com/int/ru/Fare-Family-Special-Kazakhstan.aspx');">
Дополнительная информация</a>
</td>
<td style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);" class="white"
id="FRB_1_0" _isdisabled="false" width="15%">
<input id="RB0" name="FamilyButton" value="0|1" onclick="javascript:FDFF.selectRecommendationSet('0', true,'0', 'FRB_1_0',false);"
checked="checked" type="radio">
47 917 KZT
</td>
<td class="white" id="FRB_2_0" _isdisabled="" width="15%">
</td>
</tr>
<tr class="bgrd">
<td style="background-color: rgb(255, 255, 255); border-right: medium none; padding: 0px 4px 0px 0px;">
</td>
<td class="textBold" width="15%">
Flexible-Kazakhstan
</td>
<td class="wrap" id="FN_1" width="55%">
Специальный тариф экономического класса с возможностью бесплатного перебронирования
до отправления. <a href="javascript:fareFamilyDescriptionPopUp.redirectToAnExternalPopUp('http://www.airastana.com/int/ru/Fare-Family-Flexible-Kazakhstan.aspx');">
Дополнительная информация</a>
</td>
<td class="white" id="FRB_1_1" _isdisabled="false" width="15%">
<input id="RB1" name="FamilyButton" value="1|1" onclick="javascript:FDFF.selectRecommendationSet('1', true,'1', 'FRB_1_1',false);"
type="radio">
52 397 KZT
</td>
<td class="white" id="FRB_2_1" _isdisabled="" width="15%">
</td>
</tr>
<tr class="">
<td style="background-color: rgb(255, 255, 255); border-right: medium none; padding: 0px 4px 0px 0px;">
</td>
<td class="textBold" width="15%">
Full flexible
</td>
<td class="wrap" id="FN_2" width="55%">
Нормальный тариф экономического класса без ограничений <a href="javascript:fareFamilyDescriptionPopUp.redirectToAnExternalPopUp('http://www.airastana.com/int/ru/Fare-Family-Full-Flexible.aspx');">
Дополнительная информация</a>
</td>
<td class="white" id="FRB_1_2" _isdisabled="false" width="15%">
<input id="RB2" name="FamilyButton" value="2|1" onclick="javascript:FDFF.selectRecommendationSet('2', true,'2', 'FRB_1_2',false);"
type="radio">
56 267 KZT
</td>
<td class="white" id="FRB_2_2" _isdisabled="" width="15%">
</td>
</tr>
<tr class="bgrd">
<td style="background-color: rgb(255, 255, 255); border-right: medium none; padding: 0px 4px 0px 0px;">
</td>
<td class="textBold" width="15%">
Business-Kazakhstan
</td>
<td class="wrap" id="FN_3" width="55%">
Нормальный тариф бизнес класса с некоторыми ограничениями <a href="javascript:fareFamilyDescriptionPopUp.redirectToAnExternalPopUp('http://www.airastana.com/int/ru/Fare-Family-Business-Kazakhstan.aspx');">
Дополнительная информация</a>
</td>
<td class="white" id="FRB_1_3" _isdisabled="false" width="15%">
<input id="RB3" name="FamilyButton" value="3|1" onclick="javascript:FDFF.selectRecommendationSet('3', true,'3', 'FRB_1_3',false);"
type="radio">
89 557 KZT
</td>
<td class="white" id="FRB_2_3" _isdisabled="false" width="15%">
<input name="FamilyButton" value="4|2" onclick="javascript:FDFF.selectRecommendationSet('4', true,'3', 'FRB_2_3',false);"
type="radio">
93 951 KZT
</td>
</tr>
<tr class="">
<td style="background-color: rgb(255, 255, 255); border-right: medium none; padding: 0px 4px 0px 0px;">
</td>
<td class="textBold" width="15%">
Business
</td>
<td class="wrap" id="FN_4" width="55%">
Нормальный тариф бизнес класса без ограничений. Почувствуйте настоящий комфорт!
<a href="javascript:fareFamilyDescriptionPopUp.redirectToAnExternalPopUp('http://www.airastana.com/int/ru/Fare-Family-Business.aspx');">
Дополнительная информация</a>
</td>
<td class="white" id="FRB_1_4" _isdisabled="false" width="15%">
<input id="RB4" name="FamilyButton" value="5|1" onclick="javascript:FDFF.selectRecommendationSet('5', true,'4', 'FRB_1_4',false);"
type="radio">
98 345 KZT
</td>
<td class="white" id="FRB_2_4" _isdisabled="" width="15%">
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
you can try somethink like this maybe it would help
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(//your html document);
foreach (HtmlNode div in doc.DocumentNode.SelectNodes("//div[#class='divTableBodyText']")){
foreach (HtmlNode table in div.DocumentNode.SelectNodes("table")) {
foreach (HtmlNode tbody in div.DocumentNode.SelectNodes("tbody")) {
foreach (HtmlNode row in tbody.SelectNodes("tr")) {
foreach (HtmlNode cell in row.SelectNodes("td")) {
Console.WriteLine(cell.InnerText);
}
}
}
}
}

Categories