Posted 26 May 2023, 4:56 am EST - Updated 26 May 2023, 5:01 am EST
Hi, I am trying to limit the row is display in my form which only contain a specific text string “Rolling Cash” but I cannot get it to work.
Any advise would be most appreciated.
Here is my code
Thanks
[code]
var tbodyNodes = document.DocumentNode.SelectNodes(“//tbody[@class=‘yui-dt-data’]”);
if (tbodyNodes != null && tbodyNodes.Count > 1)
{
HtmlNode secondTbodyNode = tbodyNodes[2];
if (secondTbodyNode.InnerLength > 0)
{
foreach (HtmlNode row in secondTbodyNode.SelectNodes("tr"))
{
* if (dataTable.Rows.Contains = ("Rolling Cash"))*
{
HtmlNodeCollection cells = row.SelectNodes("td");
dataTable.Rows.Add(cells[0].InnerText, cells[1].InnerText, cells[2].InnerText, cells[3].InnerText, cells[4].InnerText, cells[5].InnerText, cells[6].InnerText, cells[7].InnerText, cells[8].InnerText, cells[9].InnerText);
}
}
}
else
{
dataTable.Rows.Add("", "", "", "", "", "", "", "");
}
}
OpenOrder.DataSource = dataTable;
return true;
}[/code]