jQWidgets Forums

Forum Replies Created

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

  • watchman
    Member

    This is solution is worked but i use in my project layout view (MVC 4 C#) and jqxgrid location in partial view. Maybe problem is here? Can you show for me how i can use jqxwidgets with layout view and bundle config?


    watchman
    Member

    when i load data into jqxGrid without filters values selection work fine. When i apply one of the filters and loading new data, checkboxes are displaing. Now i try to select row, i do mouse click in checkbox, but row not displaying as selected. Jqxgrid are understand what this row are selected, but not displaying as selected((


    watchman
    Member

    Guys! What about my problem?


    watchman
    Member

    I am sure that i use the latest version of widjets. This is link http://www.jqwidgets.com/download/ for download. I choose the type of download as “personal, for non-comercial use”.


    watchman
    Member

    I can selected custom rows, but this not displaing as selected.


    watchman
    Member

    Oh! Yes of course!
    This is my js file:
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘FirstName’, type: ‘string’ },
    { name: ‘MiddleName’, type: ‘string’ },
    { name: ‘SurName’, type: ‘string’ },
    { name: ‘TabNomer’, type: ‘string’ },
    {name:’Podrazdelenie’, type: ‘string’}
    ],
    url: ‘OnePhoto/GetEmployees’,
    filter: function () {
    $(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘filter’);
    }
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    $(“#jqxdropdownbutton”).jqxDropDownButton({ width: 400, height: 25});
    $(“#jqxgrid”).jqxGrid(
    {
    width: 768,
    theme:’arctic’,
    selectionmode: ‘checkbox’,
    showfilterrow: true,
    filterable: true,
    source: dataAdapter,
    columns: [
    { text: ‘Фамилия’, datafield: ‘SurName’, width: 200 },
    { text: ‘Имя’, datafield: ‘FirstName’, filterable : false, width: 100 },
    { text: ‘Отчество’, datafield: ‘MiddleName’, filterable: false, width: 180 },
    { text: ‘Таб.номер’, datafield: ‘TabNomer’, filterable: false, width: 75, cellsalign: ‘right’ },
    { text: ‘Подразделение’, datafield: ‘Podrazdelenie’, filterable: false, width: 150 }
    ]
    });

    Server side code:
    [Authorize]
    public JsonResult GetEmployees()
    {
    var query = Request.QueryString;
    var SurNameFilter = String.Empty;
    if (filtersCount > 0)
    {
    var filterKey = query.GetKey(0);
    if (filterKey == “SurNameoperator”)
    {
    SurNameFilter = query.GetValues(1)[i];
    SurNameFilter = SurNameFilter.ToUpper();
    var rezreq = model.tblEmployees.Where(w =>w.colSurname.StartsWith(SurNameFilter)).Select(s => new { FirstName = s.colName, MiddleName = s.colMiddlename, SurName = s.colSurname, TabNomer = s.colTabNumber, Podrazdelenie = s.tblEnterpriseTree.colName }).ToList();
    return Json(rezreq, JsonRequestBehavior.AllowGet);
    }
    }
    return Json(null, JsonRequestBehavior.AllowGet);
    }

    And I can show screen with my problem.

Viewing 6 posts - 1 through 6 (of 6 total)