Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pageSize = 10;
- $('#Cliente').select2(
- {
- minimumInputLength: 0,
- allowClear: true,
- ajax: {
- quietMillis: 150,
- url: '@Url.Action("clientes", "Cliente", new { area = "Comercial" })',
- dataType: 'json',
- data: function (filtro, page) {
- return {
- pageSize: pageSize,
- pageNum: page,
- Filtro: filtro
- };
- },
- results: function (data, page) {
- var more = (page * pageSize) < data.total;
- return {
- results: data.result,
- more: more
- };
- }
- },
- }).change(function (e) {
- e.val;
- });
- });
- var pageSize = 10;
- $('#Grupo').select2(
- {
- minimumInputLength: 0,
- allowClear: true,
- ajax: {
- quietMillis: 150,
- url: '@Url.Action("Grupos", "Cliente", new { area = "Comercial" })',
- dataType: 'json',
- data: function (filtro, page) {
- return {
- pageSize: pageSize,
- pageNum: page,
- Filtro: filtro,
- ClienteId: ??
- };
- },
- results: function (data, page) {
- var more = (page * pageSize) < data.total;
- return {
- results: data.result,
- more: more
- };
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement