FilterExpression

3 replies. Last post: May 20, 2013 1:40 AM by Bernard Xiang
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hi


I try to use 


ISDataSource1.Tables.GetNamedItem("Events").FilterExpression = "subject='02'";


for ISWebScheduler



 <ISWebScheduler:WebScheduler ID="WebScheduler1" runat="server" Height="100%" 

                Width="100%" DefaultStyleMode="Win7" Culture="Polish (Poland)"

                CategoriesDataMember="Categories" DataSourceID="ISDataSource1" 

                EventsDataMember="Events" ResourcesDataMember="Resources"   EnableFastJsonSerialization="True" >

                     <DataBinding>

                    <EventsBinding AllDayEventField="AllDayEvent" CategoryIDField="CategoryID" 

                        DescriptionField="Description" EndTimeField="EndTime" EventIDField="ID" 

                        LocationField="Location" ModeField="Mode" ReminderTimeSpanField="Reminder" 

                        ResourceIDField="ResourceID" StartTimeField="StartTime" 

                        SubjectField="Subject" />

       

So


I have not any error, but I have in my WebScheduler all data from table "events", the filter expression does not work ?


When I write wrong expression 

ISDataSource1.Tables.GetNamedItem("Events").FilterExpression = "subjectx='02'";

I have an error, because the column subjectx absent


I try run with parametrs, but still the same, 

ISDataSource1.Tables.GetNamedItem("Events").FilterExpression = " subject='{0}'";

ISDataSource1.Tables.GetNamedItem("Events").FilterParameters.Add("subject", "02");


any idea ?


My ISDataSource:ISDataSource


 <ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaName="StudioSystem.App_Code.kalendarz" >

            <tables>

<ISDataSource:ISDataSourceTable SelectMethod="GetData" OldValuesParameterFormatString="Original_{0}"

                    TableName="Events" TypeName="StudioSystem.App_Code.kalendarzTableAdapters.EventsTableAdapter" DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">

                    <DeleteParameters>

                        <asp:Parameter Name="Original_ID" Type="Int32" />

                    </DeleteParameters>

                    <InsertParameters>

                        <asp:Parameter Name="CategoryID" Type="String" />

                        <asp:Parameter Name="ResourceID" Type="Int32" />

                        <asp:Parameter Name="Mode" Type="Int32" />

                        <asp:Parameter Name="Subject" Type="String" />

                        <asp:Parameter Name="Description" Type="String" />

                        <asp:Parameter Name="Location" Type="String" />

                        <asp:Parameter Name="AllDayEvent" Type="Boolean" />

                        <asp:Parameter Name="StartTime" Type="DateTime" />

                        <asp:Parameter Name="EndTime" Type="DateTime" />

                        <asp:Parameter Name="Reminder" Type="Int32" />

                        <asp:Parameter Name="ReminderTimeSpan" Type="Int32" />

                    </InsertParameters>

                    <UpdateParameters>

                        <asp:Parameter Name="CategoryID" Type="String" />

                        <asp:Parameter Name="ResourceID" Type="Int32" />

                        <asp:Parameter Name="Mode" Type="Int32" />

                        <asp:Parameter Name="Subject" Type="String" />

                        <asp:Parameter Name="Description" Type="String" />

                        <asp:Parameter Name="Location" Type="String" />

                        <asp:Parameter Name="AllDayEvent" Type="Boolean" />

                        <asp:Parameter Name="StartTime" Type="DateTime" />

                        <asp:Parameter Name="EndTime" Type="DateTime" />

                        <asp:Parameter Name="Reminder" Type="Int32" />

                        <asp:Parameter Name="ReminderTimeSpan" Type="Int32" />

                        <asp:Parameter Name="Original_ID" Type="Int32" />

                    </UpdateParameters>

                </ISDataSource:ISDataSourceTable>


Adam


All times are GMT -5. The time now is 7:40 PM.
Previous Next