Ok so basically I have a CheckBoxList with 6 options and I want to use that to filter my results shown in a GridView.
I am using a "for each" to iterate through each item in the Checkboxlist, and I have a temporary string variable.
If an item is selected, then the string is modified accordingly. I used some string functions to modify the string to get it how I want it.
Once the string is set, I change the SqlDataSource and set it equal to the string.
SqlDataSource1.SelectCommand = myString;
The GridView has sorting and paging enabled and when I click the check boxes it shows the correct results. (paging is set to ten items per page)
But when I click to see the next page, or if I try to sort by column, the gridview disappears.
It feels like I have data bind or bound issue. Any ideas guys?
Thanks in advance.
I am using a "for each" to iterate through each item in the Checkboxlist, and I have a temporary string variable.
If an item is selected, then the string is modified accordingly. I used some string functions to modify the string to get it how I want it.
Once the string is set, I change the SqlDataSource and set it equal to the string.
SqlDataSource1.SelectCommand = myString;
The GridView has sorting and paging enabled and when I click the check boxes it shows the correct results. (paging is set to ten items per page)
But when I click to see the next page, or if I try to sort by column, the gridview disappears.
It feels like I have data bind or bound issue. Any ideas guys?
Thanks in advance.