Create the best Web experiences in browsers and devices with our user interface controls designed expressly for jQuery, ASP.NET MVC, HTML 5 and CSS 3. You’ll be building on a solid and proven foundation without any plug-ins or extensions, just real world best practices and the most forward-thinking, robust Web technology.

Infragistics NetAdvantage jQuery API Reference

ig.DataSchema

The DataSchema handles transformations for Array, JSON and Xml data objects for the DataSource. Other data types should be handled by the DataSource itself. More examples of the DataSchema object can be seen in the DataSource API documentation.

Dependencies

jquery-1.4.2.js
jquery.ui.core.js
jquery.ui.widget.js
ig.util.js
  • schema

    Type:
    object
    Default:
    {}

    Code Sample

     
          var xmlSchema = new $.ig.DataSchema(
            "xml", 
                {fields:[ 
                    {name : "FirstName", xpath: "generalInfo/@firstName"}, 
                    {name : "LastName", xpath : "generalInfo/@lastName"}, 
                    {name : "Email",  xpath : "generalInfo"} ], 
                    searchField:"//person"
                }
            ); 
          
    • fields

      Type:
      array
      Default:
      []
      Elements Type:

      Code Sample

       
          var xmlSchema = new $.ig.DataSchema(
              "xml", 
                  {fields:[ 
                      {name : "FirstName", xpath: "generalInfo/@firstName"}, 
                      {name : "LastName", xpath : "generalInfo/@lastName"}, 
                      {name : "Email",  xpath : "generalInfo"} ], 
                      searchField:"//person"
                  }
              ); 
                
    • searchField

      Type:
      unknown
      Default:
      null

      Code Sample

       
                    var xmlSchema = new $.ig.DataSchema(
              "xml", 
                  {fields:[ 
                      {name : "FirstName", xpath: "generalInfo/@firstName"}, 
                      {name : "LastName", xpath : "generalInfo/@lastName"}, 
                      {name : "Email",  xpath : "generalInfo"} ], 
                      searchField:"//person"
                  }
              ); 
    • outputResultsName

      Type:
      unknown
      Default:
      null

      Code Sample

       
                var arrayOfObjectsSchema = new $.ig.DataSchema(
                      "array", 
                      { outputResultsName: 
                          "res_data", fields:[ 
                              {name: "make", type: "string"}, 
                              {name: "model", type: "string"}, 
                              {name: "year", type: "number"} 
                          ]
                      } 
                  );  
                  
The current widget has no events.
  • &nbspig.DataSchema

    .DataSchema( "ig.DataSchema", type:unknown, options:unknown );

    • type
    • Type:unknown
    • options
    • Type:unknown

    Code Sample

     
            var xmlSchema = new $.ig.DataSchema(
                "xml", 
                    {fields:[ 
                        {name : "FirstName", xpath: "generalInfo/@firstName"}, 
                        {name : "LastName", xpath : "generalInfo/@lastName"}, 
                        {name : "Email",  xpath : "generalInfo"} ], 
                        searchField:"//person"
                    }
                ); 
                
  • fields

    .DataSchema( "fields" );

  • isEmpty

    .DataSchema( "isEmpty", o:unknown );

    • o
    • Type:unknown
  • isObjEmpty

    .DataSchema( "isObjEmpty", obj:unknown );

    • obj
    • Type:unknown
  • transform

    .DataSchema( "transform", data:unknown );

    • data
    • Type:unknown

    Code Sample

     
              var arrayOfObjectsSchema = new $.ig.DataSchema("array", { 
                    outputResultsName: "res_data", 
                    fields:[ 
                        {
                            name: "make", 
                            type: "string"
                        }, 
                        {
                            name: "model", 
                            type: "string"
                        }
                    ]
                }); 
                
                var data = arrayOfObjectsSchema.transform(arrayOfObjects);