Grid View filter posting wrong rows?

I have a Grid View bound to a data source on my web page. I can filter by values just fine, but when I do any action that submits the page, I get the wrong rows returned in the Rows collection. For example, if I filter 100 rows by a value that will give me 10 rows, and then click a button for submit, I get a gridview.rows collection with the first 10 rows, but they are the first 10 rows of the data source.

Here is the code I'm using:

protected void bn1_click(object sender, EventArgs e)

{

foreach (C1GridViewRow GR in C1GridView1.Rows)

{

string value = GR.Cells[4].Text;

}

}

The problem is that the data I'm parsing is from the first row in the UNFILTERED data table and each addition row is the next in the UNFILTERED data table to the COUNT of the filtered rows.

looks like you perform filtering via callbacks, between callbacks control ViewState is not persisted, that is why cells initially contain the very first text. Try to call C1GridView.DataBind() before foreach statement.

I have check boxes that get loaded during the databind, and can be "Unchecked" by the user before the post back (commit). If the user "Unchecks" the boxes, then during the for each loop that row is not processed.

if I call databind before my foreach statement, the grid values revert to the loaded values overwriting the selections from the users.

If I remove the callback then the filter works as expected but the filter drop downs will not clear the screen after making a selection.

I've got the same problem. I've set callback options to none and it works by loose the ajax functionality.

It also happens if you have more tha one page, go to any page that is not the first and do a postback from a linkbutton in a template field in the grid, it will show afterwards the first records but the grid will still be at the page you were.

No, we don't plan this. C1GridView should not show wait spinner during postback, especially for another control.

BTW, why don't you like UpdateProgress here? I think that basing on it your can implement something similar to C1GridView wait spinner, just put the same icon into ProgressTemplate and center it to C1GridView when button is pressed.

I am now using an UpdateProgress panel here. I liked the fact the the wait spinner was centered on the C1GridView control and looked like it was part of the control. The Update Progress panel that I have used greys out the entire screen and then centers a gif on the screen. Like I said... the wait spinner just looks a little more polished than what I had.