c# - How to filter a grid view with a RadioBUttonList and Where Clausole -
i use c# in asp.net 4.
i have gridview , entitydatasource binding database.
source db table contains bool column (0,1).
i filter result in gridview using radiolist button or similar.
adding whereparameters entity set error:
string not recognized valid boolean.
any idea how solve it? thanks
<whereparameters> <asp:controlparameter controlid="uxfiltermessagetypeselector" name="typemessage" propertyname="selectedvalue" type="string" /> <asp:controlparameter controlid="uxfilterisreplied" name="isreplied" propertyname="selectedvalue" dbtype="boolean" /> </whereparameters>
<asp:radiobuttonlist id="uxfilterisreplied" runat="server" autopostback="true"> <asp:listitem value="y">1</asp:listitem> <asp:listitem value="f">0</asp:listitem> </asp:radiobuttonlist>
change radiobuttonlist following:
<asp:radiobuttonlist id="uxfilterisreplied" runat="server" autopostback="true"> <asp:listitem value="true">1</asp:listitem> <asp:listitem value="false">0</asp:listitem> </asp:radiobuttonlist>
then string recognized boolean value.
Comments
Post a Comment