jQWidgets Forums

Forum Replies Created

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

  • mpfromindia
    Member

    Thanks Peter! I would still need textbox for entering my search string to filter rows on each column.


    mpfromindia
    Member

    Don’t know how to write this in MVC 3 using Entityframework. Is there a way I can disable virtual scrolling as soon as user enters search string for any of the column filters & enable it when there’s no search string for any of filters?

    in reply to: Filtertypes for jqxGrid Filtertypes for jqxGrid #8603

    mpfromindia
    Member

    Found the solution after spending sometime playing with it. Thanks Peter!

    in reply to: Filtering numeric type Filtering numeric type #8249

    mpfromindia
    Member

    Hello Peter,

    Trying to paste some code here, let me know if it doesn’t make any sense to you. BTW, I am using MVC3.

    var codeTypeCol = ‘City Name’; // sets column name based on user selection
    if(type==’z’ || type==’Z’) // type is a variable that reads user selection ,if he/she wants it by Zip Code or by City Name
    codeTypeCol=’Zip Code’;

    $.ajax({
    datatype: “json”,
    url: “/websitename/controllername/FindCityofEmployees”, //url
    data: { state: state, codeType: type }, // parameter to controller action
    beforeSend: function (result) {
    $(‘#jqxgrid’).toggle(); // hide grid
    $(‘.processbar’).toggle(); //show processbar
    },
    success: function (result) {
    $(‘#jqxgrid’).toggle(); //show grid once we have results
    $(‘.processbar’).toggle(); // hide processbar

    var source = {
    datatype: “json”,
    datafields: [{ name: ‘FName’ }, { name: ‘LName’ },
    { name: ‘City’ }],
    localdata: result
    };

    var dataAdapter = new $.jqx.dataAdapter(source, { downloadComplete: function (data, status, xhr) { }, loadComplete: function (data) { }, loadError: function (xhr, status, error) { } });

    $(“#jqxgrid”).jqxGrid({

    width: 930,
    showfilterrow: true,
    filterable: true,
    selectionmode: ‘singlecell’,
    source: dataAdapter,
    theme: ‘ui-redmond’,

    columns: [{ text: ”, datafield: ‘City’, width: 60, cellsrenderer: chkboxrenderer }, { text: codeTypeCol, datafield: ‘City’, width: 150},
    { text: ‘First Name’, datafield: ‘FName’, width: 350 },
    { text: ‘Last Name’, datafield: ‘LName’,width: 300}]
    });
    }
    });

    var chkboxrenderer = function (row, datafield, value) {
    ‘input type=”checkbox” name=”chkCity” id=”chkCity” value=”‘ + value + ‘” />’;
    Thanks!

    in reply to: Filtering numeric type Filtering numeric type #8247

    mpfromindia
    Member

    I used that as an example for my development, not sure if I am missing something .Let me try to simulate what I am trying to do. Say for ex: you have a column called ‘City’ in your grid. You also have Radiobutton say ‘City Name’ or ‘Zip Code’. If you select city name grid column would be of type string & numeric in case user selected by zip code. I need to change filter type based on user selection. The one for string is working fine but not the one for numeric. I want the filter row column to be textbox & not select list with options like ‘null,not null, greater than…’

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