jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts

  • letos07
    Participant

    Peter but where I must do call hide columns method?


    letos07
    Participant

    Peter maybe you have any updates for me?


    letos07
    Participant

    Also I should change the hidding property after server request. That I cannot set hidden property in grid initialization


    letos07
    Participant

    Peter can you provide me with example?


    letos07
    Participant

    Peter as I can see in my test application this behaviour happens only when I have hidden columns.
    I write in bindingcomplete event code that hide my columns(use hidecolumn method)
    Can you please check this?


    letos07
    Participant

    Hey Peter!

    Updating to jqWidgets 3.8.2. don’t resolve my problem.
    Id for filter inputs regenerating after ‘filter’ event(

    Maybe there is a way to bind datafields to filter input?


    letos07
    Participant

    Hey Guys!
    I have a same problem with losting focus, but I am use a :

     filter: function () {
                    $("#jqxgrid_").jqxGrid('updatebounddata', 'filter');
                },

    And I trying to Christophe Opoix solution but unsuccessfully

    Also I am trying this:

     $("#jqxgrid_").on('filter', function (event) {
                event.args.owner.focusedfilter.focus();
            });

    but the focusedfilter input not available because the id was changed

    in reply to: Grid Custom Filtering Grid Custom Filtering #72115

    letos07
    Participant

    yep, I know it. But I ask can I using two filters at one time for one column. First – its string filter in filterrow and second – filter from this http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/customfiltering.htm example.

    in reply to: Render performance Render performance #70028

    letos07
    Participant

    Benny can you share your solution? It was be very helpful to me and my project, thanks!

    in reply to: Date Filter not working Date Filter not working #66243

    letos07
    Participant

    Hi Peter!

    You dont understand me. My server filtering working fine on server side and client side.
    I dont show date filter which I choosed – what date I choose before filtering

    in reply to: Date Filter not working Date Filter not working #65947

    letos07
    Participant

    Nadezhda, do you have any updates for me?

    in reply to: Date Filter not working Date Filter not working #65714

    letos07
    Participant

    hi Nadezhda!

    1.I select range of dates in your datepicker
    2. I doesnt see any dates in datepicker after first selection, but if i go to step 1 again i see selected dates in datepicker
    3. In both cases grid show successfully information, but i see the dates in datepicker only on second time

    in reply to: Date Filter not working Date Filter not working #65665

    letos07
    Participant
    <script type="text/javascript">
        $(document).ready(function () {
            // prepare the data
    
            var source =
            {
                id: 'Id',
                datatype: "json",
                url: "http://localhost:50126/Service/GetGridData?table=" + "Posada",
                datafields: [
    
    { name: 'Name',type:'string'},{ name: 'Description',type:'string'},{ name: 'isdeleted',type:'bool'},
                     { name: 'UpdateDate',type:'date',format:'D' },{ name: 'LastUpdate'},                            ],
                root: "data",
                beforeprocessing: function (resp) {
                    if (resp['result'] == true) {
                        var returnData = {};
                        returnData.totalrecords = resp.data['total'];
                        returnData.records = resp.data.items;
                        return returnData;
                    }
                    else {
                        site.ErrorEvent(resp['error']);
                        return [];
                    }
    
                },
                filter: function () {
                    $("#jqxgrid_" + 'Posada').jqxGrid('updatebounddata', 'filter');
                },
                sort: function () {
                    $("#jqxgrid_" + 'Posada').jqxGrid('updatebounddata', 'sort');
                }
                
    
            };
            var dataAdapter = new $.jqx.dataAdapter(source, {
                loadComplete: function (data) { },
                loadError: function (ex, status, error) {
                    if (ex.status != 567) { site.ErrorEvent(JSON.parse(ex.responseText)['error']); }
                    else { site.GetRedirect(ex); }
                }
            });
            var cellsrendererLastUpdate = function (row, columnfield, value, defaulthtml, columnproperties) {
                var data = $("#jqxgrid_" + 'Posada').jqxGrid('getrowdata', row);
                if (data != undefined) {
                    var lastupdate = '<img align="left" class="status-user-JSVarUserId" width="20" height="20" alt="статус" src="/Home/ThumbnailAvatars/JSVarUserAvatar" /> <div><span>JSVarUserName,</span> <span>JSVarDate</span></div>';
    
                    return "<div style='text-overflow: ellipsis; overflow: hidden;text-align:center;margin-top:10px;'>" + lastupdate.replace("JSVarUserId", data.LastUpdate.UserLastUpdateId).replace("JSVarUserAvatar", data.LastUpdate.AvatarFileName).replace("JSVarUserName", data.LastUpdate.FullNameInitials)
                        .replace("JSVarDate", Format(data.UpdateDate)).replace("JSVarUserName", value) + "</div>";
                }
                else return "";
            };
            function Format(date) {
                //var d = new Date(parseInt(date.substr(6)));
                var d = new Date(date);
                var options = {
                    weekday: "long", year: "numeric", month: "short",
                    day: "numeric", hour: "2-digit", minute: "2-digit"
                };
                return d.toLocaleString('ru',options);
            }
            
    
            $("#jqxgrid_" + 'Posada').jqxGrid(
                    {
                        width: '92%',
                        showdefaultloadelement: false,
                        height: 500,
                        columnsheight: 50,
                        rowsheight: 40,
                        autorowheight: true,
                        columnsresize: true,
                        enabletooltips: true,
                        showfilterrow: true,
                        filterable: true,
                        sortable: true,
                        pageable: true,
                        scrollmode: 'logical',
                        theme: "metro",
                        enablebrowserselection: true,
                        pagesize: 20,
                        pagesizeoptions: [10, 20, 40, 80],
                        virtualmode: true,
                        rendergridrows: function () {
                            return dataAdapter.records;
                        },
                        autoshowfiltericon: false,
                        localization: getLocalization(),
                        source: dataAdapter,
                        columns: [
    {text: 'Название', datafield: 'Name',sortable: true,filterable: true,align:'center',cellsalign:'center',},{text: 'Описание', datafield: 'Description',sortable: true,filterable: true,align:'center',cellsalign:'center',},{text: 'Удален', datafield: 'isdeleted',sortable: false,filterable: false,align:'center',cellsalign:'center',},                                        {width:200,text: 'Последнее изменение',datafield:'UpdateDate',align:'center',cellsrenderer: cellsrendererLastUpdate,filtertype:'range',cellsformat:'D'}         ]
                    });
    
            $("#jqxgrid_Posada").on("bindingcomplete", function (event) {
                console.log('Posada' + ' binding complete');
    $('#jqxgrid_Posada').jqxGrid('hidecolumn', 'isdeleted');                                    //if (Model.Columns.Count>6)
                        });
            $('#clearfilteringbutton_Posada').jqxButton({ height: 25, theme: "metro" });
            $('#clearfilteringbutton_Posada').click(function () {
                $("#jqxgrid_Posada").jqxGrid('clearfilters');
            });
    
            
                $('#isdeleted_Posada').jqxCheckBox({ width: 120, height: 25, theme: "metro", rtl: true, checked: 'False' == 'True' ? true : false });
                $('#isdeleted_Posada').bind('change', function (event) {
                    $.ajax({
                        url: 'http://localhost:50126/Service/ChangeIncludeDeleted?state=' + event.args.checked + '&table=Posada',
                        type: "PUT",
                        success: function (resp) {
                            debugger
                            if (resp['result'] == true) {
                                site.UpdateGrid('Posada');
                            }
                            else site.ErrorEvent(resp['error']);
    
                        },
                        error: function (ex, a2) {
                            site.ErrorEvent(JSON.parse(ex.responseText)['error']);
                        },
                    })
                });
            
            
            
                $("#excelExport_Posada").jqxButton({ theme: 'metro' });
                $("#excelExport_Posada").click(function () {
                    
                    $("#jqxgrid_Posada").jqxGrid('exportdata', 'xls', 'Posada');
                   
                });
            
            
                $("#print_Posada").jqxButton({ theme: 'metro' });
                $("#print_Posada").click(function () {
                    var gridContent = $("#jqxgrid_Posada").jqxGrid('exportdata', 'html');
                    var newWindow = window.open('', '', 'width=800, height=500'),
                    document = newWindow.document.open(),
                    pageContent =
                        '<!DOCTYPE html>\n' +
                        '<html>\n' +
                        '<head>\n' +
                        '<meta charset="utf-8" />\n' +
                        '<title>.Um Consult</title>\n' +
                        '</head>\n' +
                        '<body>\n' + gridContent + '\n</body>\n</html>';
                    document.write(pageContent);
                    document.close();
                    newWindow.print();
                });
            
        });
    </script>

    JSON
    {"result":true,"data":{"items":[{"Id":5139,"UpdateByUserId":1,"UpdateDate":"\/Date(1419374055273)\/","Name":"HNZQFLaaAd","Description":"cJCMv26Gm7","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5138,"UpdateByUserId":1,"UpdateDate":"\/Date(1419373762863)\/","Name":"OJ9d1Dcvln","Description":"S37wNg1bF2","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5137,"UpdateByUserId":1,"UpdateDate":"\/Date(1419373420603)\/","Name":"ibHIC3FPZN","Description":"hK2yXsknCU","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5136,"UpdateByUserId":1,"UpdateDate":"\/Date(1419373301683)\/","Name":"elrfZsnPyu","Description":"oHOOLGoBT6","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5135,"UpdateByUserId":1,"UpdateDate":"\/Date(1419372974477)\/","Name":"gKL9CzYSr9","Description":"AJekQJ2zCk","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5134,"UpdateByUserId":1,"UpdateDate":"\/Date(1419372876740)\/","Name":"vJcPITT2gt","Description":"qIVsc6P6XI","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5133,"UpdateByUserId":1,"UpdateDate":"\/Date(1419372760997)\/","Name":"AI3n8STYPW","Description":"bAMYm5vetd","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5132,"UpdateByUserId":1,"UpdateDate":"\/Date(1419372681213)\/","Name":"rO22Rzjagr","Description":"FrSl2i0ntf","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5129,"UpdateByUserId":1,"UpdateDate":"\/Date(1419368187980)\/","Name":"brCeNGdCZ0","Description":"S5TOu1pmHw","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5128,"UpdateByUserId":1,"UpdateDate":"\/Date(1419368092010)\/","Name":"VrJHOdzQ4y","Description":"7mx7SU8Lcg","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5127,"UpdateByUserId":1,"UpdateDate":"\/Date(1419368015070)\/","Name":"ZzCBMEp7zj","Description":"4lV48iZvGZ","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5126,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367969847)\/","Name":"yhiUJda07s","Description":"9SyzPII1nZ","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5125,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367926440)\/","Name":"4vwiIjpjOz","Description":"r2W8cfWgzx","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5124,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367895497)\/","Name":"aip4Q3Msbg","Description":"MrqH2fUw3O","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5123,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367560510)\/","Name":"MOWiN6qSbW","Description":"Ok1yZhleem","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5122,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367436743)\/","Name":"pb5w9K7YNa","Description":"O6qhu58XxA","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5121,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367403750)\/","Name":"GrD4eaYMot","Description":"rDuufbMlWs","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5120,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367347390)\/","Name":"lrQhysGLro","Description":"CXX3YcwPRT","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5119,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367201920)\/","Name":"6ndoVf0NIH","Description":"rXQ6WGrdZE","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}},{"Id":5118,"UpdateByUserId":1,"UpdateDate":"\/Date(1419367154337)\/","Name":"ZcDOnwrup0","Description":"wTTld8DCWK","isdeleted":false,"LastUpdate":{"UserLastUpdateId":1,"FullNameInitials":"Куниц А.В","ConectionId":"cb217741-8605-4e28-807f-879f2d97f4d5;8b452865-687b-4403-9164-8838add8f4fb;4c03095e-6514-4642-8fd8-161bad86db2d","AvatarFileName":"avatar008_b90d0b795b9f4e9a827aba595392277b.jpg"}}],"total":75},"error":""}

    in reply to: Date Filter not working Date Filter not working #65632

    letos07
    Participant

    first of all in link which you send me i see only grid and nothing documentation about virtualmode.
    And my asp.net server filter worked correctly, and grid rows are in color when i use datefilter, but i DONT see datetime which i selected before, the datetime filter row is EMPTY

    in reply to: Date Filter not working Date Filter not working #65558

    letos07
    Participant

    maybe my problem is I using grid in virtual mode?
    The filter request is send successfully and grid render new data good,
    and the filter information is good ($(‘#jqxgrid’).jqxGrid(‘getfilterinformation’))
    but i dont see date filter text in filterrow(

Viewing 15 posts - 1 through 15 (of 17 total)