the quest is gridView and SQLdataSourse
I have a gridview and a SQLdataSource connected to it. I filtrate my database base like this:
"SELECT ItemID, Name, Category FROM table WHERE Category = @Category";
The variable @Category is DropDownList's selected value
And... then... my default scheme of SQLdatasource's selecting is "SELECT ItemID, Name, Category FROM table", and so, after I've filtrated the data using my dropdownlist, it's ok, it shows what I need, but when I click next page on my gridview (yeah, I NEED paging), it moves onto the next page but the selecting's switched to default, I mean, without conditions, it shows everything from my DB. And how do I fix it? I thought PostBack was the point, but it didn't appear to. Yeap, I'm currently at Web Application
And what should I do in that situation? Perheaps, the whole method is wrong? What should I use then?
|