jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 50 total)
  • Author
    Posts
  • in reply to: Remove Underscores Remove Underscores #54555

    Benji6996
    Participant

    Hi Peter,

    Sorry for my very belated reply to this!

    Thank you for pointing this out, feel very dumb that I didn’t notice it!!

    As an additional point, the ‘simple’ mode is basically what I want, however, I want the user to be able to enter the specified ‘groupSeparator’ as well as numbers and decimals… Is is possible to add this functionality to a future release?

    In other words, I do not want the input to look like this:

    _,___,__.__

    but I want the user to be able to enter this:

    5,111,22.10 (notice the group separators)

    Thanks,

    B

    in reply to: Row Details on Particular rows Row Details on Particular rows #31292

    Benji6996
    Participant

    No problem, thanks anyway

    in reply to: Removing Grid's Tabindex Removing Grid's Tabindex #22552

    Benji6996
    Participant

    This is how I am currently doing it, is there a better way?

    ready: function(){
    // Remove any tabindex's set by the grid
    $('#grid [tabindex]').removeAttr('tabindex');
    }
    in reply to: Incorrect rowdata Returned Incorrect rowdata Returned #22163

    Benji6996
    Participant

    I think I have solve it by changing the following:

    var rowindex = $('#sh_grid').jqxGrid('getselectedrowindex');
    var rowdata = $('#sh_grid').jqxGrid('getrenderedrowdata',rowindex);

    to

    var rowindex = $('#sh_grid').jqxGrid('getselectedrowindex');
    var rowdata = $('#sh_grid').jqxGrid('getrowdata',rowindex);

    Why has this fixed my issue?


    Benji6996
    Participant

    Didn’t think about that, I was using autosize. This should do the trick, thanks


    Benji6996
    Participant

    Dont worry all sorted with the paging, it was an SQL error 🙂

    But I would still like to know info about the ‘dataadapter.loadjson’. Can I use this to map my json data and then pass it to the grid?


    Benji6996
    Participant

    That’s awesome, all sorted as far as data displaying goes…

    What is the ‘dataadapter.loadjson’ method? I cannot find this in the documentation… Does this handle the mapping etc??

    I am now experiencing another issue with the paging whereby, on the first page, my data object contains 20 items, but as soon as I press the next page button, my new loaded object contains all my rows not just the next 20… This is obviously a server side issue, but it may be caused by the parameter that is being sent to the server. I am about to debug it and see what I can find, if you have any insight on this then please share…


    Benji6996
    Participant

    I only placed ‘obj.data’ there because I saw it in a ‘virtualmode’ example… I wasnt too sure what it was doing but it seemed to work.

    I have now debugged it and it seems that ‘rendergridrows’ is not even being called… I have done the following:

    rendergridrows: function(obj){
    console.log('test');
    console.log(obj);
    return obj.data;
    },

    Absolutely nothing is appearing in the console. I cannot see where else I could be going wrong…

    in reply to: Cross Domain Requests Cross Domain Requests #21650

    Benji6996
    Participant

    Just sent through, thanks Peter 🙂

    in reply to: Cross Domain Requests Cross Domain Requests #21641

    Benji6996
    Participant

    If ‘records’ is meant to be an array, how does it know which fields to map to which values.

    Consider this result structure:

    [{"Shipment_Reference":"","Shipment_Date":"","Buyer_Address":"","Buyer_Reference":"","Main_SO_Reference":"","Base_Total":"","Terms_of_Delivery":"","Bill_Of_Lading_Date":,"Bill_Of_Lading_Number":"","Goods_Description":""}]

    Whereas, in array format it will just be indexed like so and it cannot be multidimensional:

    ["0":"","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":""]

    How should I structure my result?

    Update

    Furthermore, ‘data.results’ is actually an array or results. My callback now looks like this:

    callback({ records: data.results, totalrecords: data.rows });
    in reply to: Cross Domain Requests Cross Domain Requests #21636

    Benji6996
    Participant

    This looks like the perfect solution, thank you!

    I have tried to implement this myself but have run into trouble. Am I missing something?

    Here is my code:

    // Prepare the response data
    var source = {
    datatype: "json",
    datafields: [
    { name: 'reference', map: 'Shipment_Reference' },
    { name: 'date', map: 'Shipment_Date', type: 'date' },
    { name: 'so_reference', map: 'Main_SO_Reference' },
    { name: 'goods_description', map: 'Goods_Description' },
    { name: 'total', map: 'Base_Total', type: 'float' },
    { name: 'buyer_details', map: 'Buyer_Address' },
    { name: 'buyer_reference', map: 'Buyer_Reference' },
    { name: 'terms_of_delivery', map: 'Terms_Of_Delivery' },
    { name: 'bol_date', map: 'Bill_Of_Lading_Date', type: 'date' },
    { name: 'bol_number', map: 'Bill_Of_Lading_Number' }
    ]
    };
    // Get the shipments
    var settings = {
    loadServerData: function(serverdata,source,callback){
    MN.ajax({
    url: '//api.domain.net/documents/?'+query,
    dataType: source.datatype,
    success: function(data){
    console.log(data);
    // Send the data to the data adapter
    callback({ records: data });
    },
    error: function(msg){
    console.log('error');
    }
    });
    }
    };
    // Initialize the data adapter
    var dataAdapter = new $.jqx.dataAdapter(source,settings);
    in reply to: Source Adapter Data bug Source Adapter Data bug #20794

    Benji6996
    Participant

    Thanks for your help, I have managed to sort it after some extensive debugging in my code.

    Thanks again 🙂

    in reply to: Source Adapter Data bug Source Adapter Data bug #20789

    Benji6996
    Participant

    I am doing exactly what it states in the example, as shown here:

    var source = {
    url: '//www.example.net/test.php',
    datatype: "json",
    datafields: data.datafields,
    data: {reference:'test'},
    root: 'items',
    cache: false,
    filter: function(){
    // Update the grid and send a request to the server.
    $("#mfs_grid").jqxGrid('updatebounddata', 'filter');
    },
    sort: function(){
    // Update the grid and send a request to the server.
    $("#mfs_grid").jqxGrid('updatebounddata', 'sort');
    },
    beforeprocessing: function(data){
    if(data != null){
    // Update the total records
    // THIS NEEDS UPDATING
    //source.totalrecords = data[0].TotalRows;
    }
    }
    };

    I am sure I could get it to work using the format data property, but just want to make sure I am not doing anything wrong…

    in reply to: Source Adapter Data bug Source Adapter Data bug #20787

    Benji6996
    Participant

    All updated, now running version 2.8.3 and I am still having trouble sending the parameters with the data property. I assume it is sent as a GET variable?


    Benji6996
    Participant

    I do apologise, that was the one page I forgot to check!

    Thank you very much, sorry to waste your time

Viewing 15 posts - 31 through 45 (of 50 total)