I have a GridView
called myGrid
, I am retrieving some list items and adding them to GridView but I have set the rowlimit
of my GridView
to 10. So when the page is loaded, the myGrid
comes with 10 rows. which looks like this:
When I click at View next ten comments
through an AJAX call to a [WebMethod]
I am appending myGrid
with next 10 items with javascript, which looks like this:
But now when I click at Proccess
button it calls an C# function
and I am iterating throughout all grid rows with following code:
protected void Proccess_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in myGrid.Rows)
{
//TODO logic
}
}
when button is clicked I can see only 10 rows that were added first, which means rows added with ajax function(javascript) are not being shown to process.