EasyUI Forum
May 04, 2024, 04:19:50 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Customize datagrid filter row on: July 25, 2014, 03:14:16 AM
Thank you so much!
2  General Category / EasyUI for jQuery / Customize datagrid filter row on: July 24, 2014, 08:34:47 AM
Another day another question... (sorry, new to this)

There is a way to add filter kind to the filter row extension?

now for dates I use:
op: ['equal', 'notequal', 'less', 'greater']

users like to add: "past 3 days", "past 3 weeks" etc etc

Thank you!
3  General Category / EasyUI for jQuery / Re: Datgrid + filters on: July 24, 2014, 06:05:30 AM
Thank you, problem solved!
4  General Category / EasyUI for jQuery / Combobox: add item on: July 23, 2014, 08:11:22 AM
how can I add items to a combobox?

my c#

<select class="easyui-combobox" id="FormatoCarta" name="FormatoCarta">
                            @foreach (var item in @Model.FormatiCarta)
                            {
                                String selected = String.Empty;
                                if (@Model.Defaults != null)
                                {
                                    if (item.Id.Equals(@Model.Defaults.IDFormatoCarta))
                                    {
                                        selected = "selected=selected";
                                    }
                                }
                                <option @selected value=@item.Id>@item.Nome</option>
                            }
                        </select>


my add function (not working)
$('#FormatoCarta').append('<option value=\"' + msg + '\">' + $('#NewNomeFormato').val() + '</option>');

it add the option, but the combobox don't reflect the change.

Thankyou!!
5  General Category / EasyUI for jQuery / Datgrid + filters on: July 22, 2014, 09:01:58 AM
Again fighting with filters...

I have a master-detail situation

datgrid + filters, acting as detail.

On load I have the filters working, but when I use the mater table (selectin an ID) the filters gone. Below some code, in red the call that reset my grid:

MASTER:

    <table id="icomm" class="easyui-datagrid"
           url="~/IncomingOwnerMail/DataLoaderComm"
           pagination="false" fitcolumns="false"
           singleselect="true" striped="true"></table>

DETAIL:

 <table id="iom" class="easyui-datagrid"
           url="~/IncomingOwnerMail/DataLoader"
           pagination="true" fitcolumns="false"
           singleselect="true" pagesize="20" striped="true" fit="true"
           toolbar="#tiom"></table>

+Javascript definition:

      $(document).ready(function () {
            var grid = $('#iom');

            grid.datagrid({
                columns: [[
                {
                    field: 'stato', title: '@LabelMapping.Value("PRT_sel_stato", (User as LPEUser).Language)', width: 80, align: 'right', sortable: true
                },
                {
                    field: 'PROTOCOLLO', title: '@LabelMapping.Value("PRT_sel_PROTOCOLLO", (User as LPEUser).Language)', width: 80, align: 'right', sortable: true
                },
                {
                    field: 'PRT_EST', title: '@LabelMapping.Value("PRT_sel_PRT_EST", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'MITTENTE', title: '@LabelMapping.Value("PRT_sel_MITTENTE", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'DATA_PRT', title: '@LabelMapping.Value("PRT_sel_DATA_PRT", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'commessa', title: '@LabelMapping.Value("PRT_sel_commessa", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'Ente_Risposta', title: '@LabelMapping.Value("PRT_sel_Ente_Risposta", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'Subject', title: '@LabelMapping.Value("PRT_sel_Subject", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'PRT_risposta', title: '@LabelMapping.Value("PRT_sel_PRT_risposta", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'Data_risposta', title: '@LabelMapping.Value("PRT_sel_Data_risposta", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                },
                {
                    field: 'tempo_risposta', title: '@LabelMapping.Value("PRT_sel_tempo_risposta", (User as LPEUser).Language)', width: 100, align: 'right', sortable: true
                }
                ]],
                onLoadError: function (value) {
                    $.messager.alert('Warning', value.status);
                },
                onDblClickRow: function (rowIndex, rowData) {
                    dettagliProtocollo();
                },
                remoteFilter: true
            });

            grid.datagrid({
                rowStyler: function (index, row) {
                    if (row.stato == 'delay ') {
                        return 'color:red;'
                    }
                    else if (row.stato == 'completed ') {
                        return 'color:green;'
                    }
                }
            });

            grid.datagrid('enableFilter', [
            {
                field: 'stato',
                type: 'text',
                options: { precision: 0 },
                op: ['contains', 'equal', 'notequal']
            },
             {
                 field: 'PROTOCOLLO',
                 type: 'numberbox',
                 options: { precision: 0 },
                 op: ['equal', 'notequal', 'less', 'greater']
             },
             {
                 field: 'PRT_EST',
                 type: 'text',
                 options: {},
                 op: ['contains', 'equal', 'notequal']
             },
             {
                 field: 'MITTENTE',
                 type: 'text',
                 options: {},
                 op: ['contains', 'equal', 'notequal']
             },
             {
                 field: 'DATA_PRT',
                 type: 'datebox',
                 options: {
                     formatter: function (aDate) {
                         var y = aDate.getFullYear();
                         var m = aDate.getMonth() + 1;
                         var d = aDate.getDate();
                         return d + '-' + m + '-' + y;
                     },
                     parser: function (s) {
                         if (s != '') {
                             var ddd = s.split("-");
                             return new Date(ddd[2], ddd[1] - 1, ddd[0])
                         }
                         return new Date();
                     }
                 },
                 op: ['equal', 'notequal', 'less', 'greater']
             },
            {
                field: 'commessa',
                type: 'text',
                options: { precision: 0 },
                op: ['contains', 'equal', 'notequal']
            },
            {
                field: 'Ente_Risposta',
                type: 'text',
                options: { precision: 0 },
                op: ['contains', 'equal', 'notequal']
            },
            {
                field: 'Subject',
                type: 'text',
                options: { precision: 0 },
                op: ['contains', 'equal', 'notequal']
            },
            {
                field: 'PRT_risposta',
                type: 'text',
                options: { precision: 0 },
                op: ['contains', 'equal', 'notequal']
            },
             {
                 field: 'Data_risposta',
                 type: 'datebox',
                 options: {
                     formatter: function (aDate) {
                         var y = aDate.getFullYear();
                         var m = aDate.getMonth() + 1;
                         var d = aDate.getDate();
                         return d + '-' + m + '-' + y;
                     },
                     parser: function (s) {
                         if (s != '') {
                             var ddd = s.split("-");
                             return new Date(ddd[2], ddd[1] - 1, ddd[0])
                         }
                         return new Date();
                     }
                 },
                 op: ['equal', 'notequal', 'less', 'greater']
             },
             {
                 field: 'tempo_risposta',
                 type: 'numberbox',
                 options: { precision: 0 },
                 op: ['equal', 'notequal', 'less', 'greater']
             }
            ]);

            /*************************************************************/
            /* GRIGLIA COMMESSE **********************************************/

            var grid = $('#icomm');

            grid.datagrid({
                columns: [[
                {
                    field: 'commessa', title: '@LabelMapping.Value("PRT_sel_commessa", (User as LPEUser).Language)', align: 'right', sortable: true
                }
                ]],
                onLoadError: function (value) {
                    $.messager.alert('Warning', value.status);
                },
                onClickRow: function (rowIndex, rowData) {
                    $('#ienti').datagrid({
                        url: '@Url.Action("DataLoaderEnti", "IncomingOwnerMail")' + '?commessaId=' + rowData.commessa
                    });
    $('#iom').datagrid({
                        url: '@Url.Action("DataLoader", "IncomingOwnerMail")' + '?commessa=' + rowData.commessa + "&enteId="
                    });


                    $.getJSON('@Url.Content("~/IncomingOwnerMail/DataLoaderNoResponseTotal")', { "commessaId": rowData.commessa }, function (data) {

                        $('#NoResponseTotal').html(data.Text);
                    });

                    $.getJSON('@Url.Content("~/IncomingOwnerMail/DataLoaderNoProcessedTotal")', { "commessaId": rowData.commessa }, function (data) {

                        $('#NoProcessedTotal').html(data.Text);
                    });
                }
            });

6  General Category / EasyUI for jQuery / Re: DataGrid + DataGrid Filter Row: how to get the filter? on: July 15, 2014, 05:57:04 AM
Many thanks!
7  General Category / EasyUI for jQuery / DataGrid + DataGrid Filter Row: how to get the filter? on: July 15, 2014, 01:13:22 AM
Hi,
I have a DataGrid + DataGrid Filter Row (datagrid-filter.js) and work in c#.

My application successfully do filter the data etc etc. Now the client want an excel export of the FILTERED data... but I don't know how to get the filterrules.

Thank you!

Berzy
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!