This is a migrated thread and some comments may be shown as answers.

what value should be for "Get All" option in RadComboBox to show all records in RadGrid?

1 Answer 53 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Damien Nast
Top achievements
Rank 1
Damien Nast asked on 14 Dec 2008, 10:19 PM
good day, guys,
I have a RadComboBox "RadComboBox_reject" with 2 options, "Rejected", and "Not Rejected", the value of "Rejected" is "true", the value of "Not Rejected" is "false",  RadGrid is bound to sqldatasource,  sqldatasource definition as following:

<asp:SqlDataSource ID="Sql_docket" runat="server"  SelectCommand ="SELECT DOCKET.DOCKETID ...................  FilterExpression ="reject='{0}'" > 
<FilterParameters>
    <asp:ControlParameter Name="reject" ControlID="RadComboBox_reject" PropertyName="SelectedValue" Type="Boolean"  ConvertEmptyStringToNull="true" />
</FilterParameters>
</asp:SqlDataSource>

Basically, my idea is to set "RadComboBox_reject" property "AutoPostback" = true, so that everytime user choose option from RadComboBox_reject, the selectedValue will be passed to sqldatasource by SqlDataSource  FilterParameters.

The above code is working fine. But, now,  I am trying to add "Get All" option to "RadComboBox_reject", so that RadGrid will show all records when user select "Get All". My question is: what value should be for "Get All" option that will be passed to FilterParameters?  Please note that FilterParameters type is "Boolean".

Thank you very much

1 Answer, 1 is accepted

Sort by
0
andy
Top achievements
Rank 1
answered on 15 Dec 2008, 06:34 PM
Hi,

Not sure if this work, but pls try.
 
1) opposite ur the value of ur rejected and not rejected
Rejected = 0 (FALSE)
Not Rejected = 1 (TRUE)
Get All = 2
2) Change the Type to integer
3) Then ur filterExpression use  "reject <> '{0}' "


Tags
ComboBox
Asked by
Damien Nast
Top achievements
Rank 1
Answers by
andy
Top achievements
Rank 1
Share this question
or