Docs
API
  • setUrl(url: Object|String)


    Method is used for changing url requests.

    Example: Change read url

    
    var grid = new FancyGrid({
      ...
      data: {
        proxy: {
    	  url: 'ajax.php'
    	}
      },
      ...
    ...
    grid.setUrl('new-ajax.php');
    grid.load();
    

    Example: Change RESTful

    
    var grid = new FancyGrid({
      ...
      data: {
        proxy: {
    	  type: 'rest',
    	  url: 'app.php/users'
    	}
      },
      ...
    ...
    grid.setUrl('app.php/staff');
    grid.load();
    

    Example: Change CRUD

    
    var grid = new FancyGrid({
      ...
      data: {
        proxy: {
    	  api: {
            create: 'new.php',
            read: 'load.php',
            update: 'update.php',
            destroy: 'destroy_action.php'
          }
    	}
      },
      ...
    ...
    grid.setUrl({
      create: 'changed-new.php',
      read: 'changed-load.php',
      update: 'changed-update.php',
      destroy: 'changed-destroy_action.php'
    });
    grid.load();