serverPaging, serverSorting and serverFiltering questions

6 posts, 0 answers
  1. JOHNY
    JOHNY avatar
    9 posts
    Member since:
    Oct 2012

    Posted 06 Nov 2013 Link to this post



    Question 1
    Is serverPaging, serverSorting and serverFiltering officially supported with javascript notation?
     

    Question 2

    To enable serverPaging, serverSorting and serverFiltering through javascript the dataSource schema must be changed to:

      schema: {                   
    data: "data",                   
    total: "total"               
    }

    Here
    is our previous schema which enabled us to define default values and specify types, how do we combine the two:
                   
    schema: {                   
    model: {                       
    id: "TransactionID",                       
    fields: {                           
    TransactionID: { editable: false, nullable: true, defaultValue : "00000000-0000-0000-0000-000000000000"
    },                           
    TicketNumber: {type: "string" },                           
    //TransactionTypeDesc: { type: "string",editable: false,
    defaultValue: "Fuel" },                           
    StatusName: {type: "string" },                           
    Departure_Date: { type: "date"},                           
    Arrival_Date: {type: "date"},                           
    FlightNumber: { type: "string" },                           
    AircraftName: {type: "string" },                           
    TerminalAndGate: { type: "string" },                           
    AirlineName: {type: "string", defaultValue: { AirlineID: 1,
    AirlineName: "135 Airways"} },                            
    DestinationAirportCode: { type: "string", defaultValue: { LocationID:1, AirportCode: "ATL"} },                          
    ArrivalAirportCode: { type: "string", defaultValue: { LocationID: 1, AirportCode: "ATL"} },                            
    ShipNumber: { type: "string" },                           
    TailNumber: { type: "string" },                           
    Product: { type: "string" },                           
    FuelQuantity: { type: "string" },
    Temperature: { type: "string" },
    Density: { type: "string" },                           
    StartTotalizer: { type: "string" },
    StopTotalizer: { type: "string" },
    TotalGallons: { type: "string" },
    FuelEquipment: { type: "string" },
    Fueler: { type: "string" },
    InOpGuage: { type: "string" },
    Supplier: { type: "string" },
    StartTime: { type: "string" },
    EndTime: { type: "string" },
    FuelCaps: { type: "string" },
    Notes: { type: "string" }
    }                
    }           
    }

  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2192 posts

    Posted 08 Nov 2013 Link to this post

    Hi Johny,

     
    Please find the answers of your questions below:

    1) You can check the dataSource API documentation for examples of using these properties. 

    2) This change is not required, however if you are ToDataSourceResult extension method you should include that configuration.

    var dataSource = new kendo.data.DataSource({
            transport: {
                /* transport configuration */
            },
            serverPaging: true,
            serverSorting: true,
            schema: {
                data: "Data",
                total: "Total"
            }
    Kind Regards,
    Vladimir Iliev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. JOHNY
    JOHNY avatar
    9 posts
    Member since:
    Oct 2012

    Posted 08 Nov 2013 Link to this post

    We are using ToDataSourceResult extension method. How do we define our schema for formatting control in this case?

  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2192 posts

    Posted 12 Nov 2013 Link to this post

    Hi Johny,


    I'm not sure that I understand your last question - could you please provide more information about what exactly do you mean with "formatting control in this case"?

    Kind Regards,
    Vladimir Iliev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. JOHNY
    JOHNY avatar
    9 posts
    Member since:
    Oct 2012

    Posted 14 Nov 2013 Link to this post

    We are asking how do we define our model and allow for dropdowns etc (i.e. AirlineName: {type: "string", defaultValue: { AirlineID: 1, AirlineName: "135 Airways"} }, ) in the case where we are using serverPaging. Please see the original question below. 

    Original Question 2

    To enable serverPaging, serverSorting and serverFiltering through javascript the dataSource schema must be changed to: 

      schema: {
                        data: "data",
                        total: "total"
                    }

     Here is our previous schema which enabled us to define default values and specify types, how do we combine the two:


                   
    schema: {
                        model: {
                            id: "TransactionID",
                            fields: {
                                TransactionID: { editable: false, nullable: true, defaultValue : "00000000-0000-0000-0000-000000000000" },
                                TicketNumber: {type: "string" },
                                //TransactionTypeDesc: { type: "string",editable: false, defaultValue: "Fuel" },
                                StatusName: {type: "string" },
                                Departure_Date: { type: "date"},
                                Arrival_Date: {type: "date"},
                                FlightNumber: { type: "string" },
                                AircraftName: {type: "string" },
                                TerminalAndGate: { type: "string" },
                                AirlineName: {type: "string", defaultValue: { AirlineID: 1, AirlineName: "135 Airways"} },
                                DestinationAirportCode: { type: "string", defaultValue: { LocationID: 1, AirportCode: "ATL"} },
                                ArrivalAirportCode: { type: "string", defaultValue: { LocationID: 1, AirportCode: "ATL"} },
                                ShipNumber: { type: "string" },
                                TailNumber: { type: "string" },
                                Product: { type: "string" },
                                FuelQuantity: { type: "string" },
                                Temperature: { type: "string" },
                                Density: { type: "string" },
                                StartTotalizer: { type: "string" },
                                StopTotalizer: { type: "string" },
                                TotalGallons: { type: "string" },
                                FuelEquipment: { type: "string" },
                                Fueler: { type: "string" },
                                InOpGuage: { type: "string" },
                                Supplier: { type: "string" },
                                StartTime: { type: "string" },
                                EndTime: { type: "string" },
                                FuelCaps: { type: "string" },
                                Notes: { type: "string" }
                            }
                        }
                    }

  6. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2192 posts

    Posted 19 Nov 2013 Link to this post

    Hi Johny,

    In current case you should only remove the type option for the "AirlineName", "DestinationAirportCode" and "ArrivalAirportCode" fields:

    AirlineName: {defaultValue: { AirlineID: 1, AirlineName: "135 Airways"} },

    Also you can check our "Editing custom editor" demo which demonstrates the same scenario. 

    Regards,
    Vladimir Iliev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top