Forum Replies Created

Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts

  • morgenweck
    Participant

    I also agree with wnema. I need to get what the person types if it is not a selected item.

    in reply to: Hide dropdown indicator Hide dropdown indicator #67653

    morgenweck
    Participant

    That’s perfect– I try to be diligent and look in the API on the demo page for all of my questions and I went back to look for showArrow but did not find it. Again– Thanks


    morgenweck
    Participant

    Has there been any update to this function? I agree having the arrow show on columns that are small is really non professional.


    morgenweck
    Participant

    Thanks I appreciate your input. For the most part that will work, however I was hoping for an easier built-in solution. I’m trying to convert my code from a competitors grid and theirs does build a grid without column names. Each column is the same width but that’s OK. I’m trying to build an ad hoc report writer tool and the data will be coming from many different sources. I think I need to stay with the other company.
    Thanks


    morgenweck
    Participant

    Hi,

    I got the basics of your answer but I’m going around in circles on my end. I’m trying to fill three different grids with the following data:
    {“site_code”:[{“DISEASE_SITE”:”ANAL”,”DESCRIPTION”:”Anal”,”CASES”:”5″,”BC”:”10 (5)”,”NL”:”15 (4)”,”PL”:”20 (5)”,”TP”:”9 (4)”}],”age_range”:[{“DBID”:”0″,”SITE_CODE”:”ANAL”,”MIN_AGE”:”26″,”MAX_AGE”:”81″}],”ethnicity”:[{“ETHNICTY”:”WHITE”,”DESCRIPTION”:”White (Caucasian)”,”COUNT”:”5″}]}
    For the most part I will not know the names of the columns until it comes back in the success callback but parsing that is what causing the trouble.
    Thanks for your help.

    in reply to: Build grid with unknow fields Build grid with unknow fields #51562

    morgenweck
    Participant

    If you know it on the server side and can you pass it down as JSON data and then build the structure in code? There has got to be a way that the client side code does not have to be changed for every different web server call. No?

    in reply to: jqzDataTable vs. jqxGrid vs ??? jqzDataTable vs. jqxGrid vs ??? #48164

    morgenweck
    Participant

    I found a close work-around. I’m using a jqxGrid with autorowheight: true, and pagermode: “simple”, pageable: true, pagesize: 100. Is there a way to not display the bottom paging navigator?

    in reply to: selectionmode: 'checkbox' selectionmode: 'checkbox' #47729

    morgenweck
    Participant

    I’ll try making this on a new page with only this code and see what happens.

    Thanks for your help I’ll let you know how I make out.

    Bill

    in reply to: selectionmode: 'checkbox' selectionmode: 'checkbox' #47716

    morgenweck
    Participant

    [{"ID":"1","Samples":"Yes","ICD9_Code":"1420","text":"<b>Short Description:</b><br/> Malig neo parotid<br/><b>Description:</b><br/> Malignant neoplasm of parotid gland Hollings: (1741)","Score":"1.355216"},{"ID":"2","Samples":"Yes","ICD9_Code":"1421","text":"<b>Short Description:</b><br/> Malig neo submandibular<br/><b>Description:</b><br/> Malignant neoplasm of submandibular gland Hollings: (118)","Score":"1.355216"}]

    This is some sample data. The ID is generated by code when the data is looped to produce the JSON i = i + 1 on each loop

    Thanks for your help.

    Using 3.1.0

    in reply to: selectionmode: 'checkbox' selectionmode: 'checkbox' #47683

    morgenweck
    Participant
        function LoadCodeGrid1() {
            $("#CodeGrid1").jqxGrid('clearselection');
            var t = document.getElementById('txtCode').value;
            var theme = getDemoTheme();
            var dbid = "0";
            var length = 15;
    
            $.ajax({
                type: "POST",
                url: "JSONService.asmx/Lucene_Index_Search",
                data: "{'t':'" + t + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                beforeSend: function () {
                },
                success: function (data) {
                    jQuery("#Text3").val(data.d);
                    var source =
                     {
                         datatype: "json",
                         datafields: [
                          { name: "Samples", type: 'string' },
                          { name: "ICD9_Code", type: 'string' },
                          { name: "text", type: 'string' },
                          { name: "Score", type: 'string' }
                         ],
                         id: "ID",
                         localdata: data.d
                     };
                    var theme = getDemoTheme();
                    var dataAdapter = new $.jqx.dataAdapter(source);
    
                    var dataAdapter = new $.jqx.dataAdapter(source, {
                        loadComplete: function () {
                            length = dataAdapter.records.length;
                            jQuery("#Text3").val(length);
                        }
                    }
                    );
    
                    var role = sessionStorage.getItem("role");
    
                    $("#CodeGrid1").jqxGrid(
                    {
                        width: "100%",
                     
                        autoheight: true,
                        autorowheight: true,
                        source: dataAdapter,
                        theme: theme,
                        pageable: true,
                        pagesize: 5,
                     
    
                        enablebrowserselection: true,
                                     editable: true,
                                       selectionmode: 'checkbox',
                                         sortable: true,
                        filterable: true,
                        columns: [                                            
                                 { datafield: "ICD9_Code", text: "ICD-9 Code", width: 100, editable: false },
                                 { datafield: "Samples", text: "Samples", width: 100, editable: false },
                                 { datafield: "Score", text: "Relevance", width: 75, editable: false },
                                 { datafield: "text", text: "Description", editable: false }
    
                        ]
                    });
                      $('#CodeGrid1').on('rowdoubleclick', function (event) {
    
                    });
    
                },
                error: function (e) {
                    alert("error: subgridCode");
                }
    
            });
    
            $("#loading").ajaxStop(function () {
                $(this).hide();
            });
        }
    
    in reply to: Conditional row format Conditional row format #47649

    morgenweck
    Participant

    I got it I used

    var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
    var datarow = $(“#subgrid3″).jqxGrid(‘getrowdata’, row);

    if (datarow.State === ‘NY’) {
    return ‘<span style=”margin: 4px; float: ‘ + columnproperties.cellsalign + ‘; color: #0000ff;”>’ + value + ‘</span>’;
    }
    else {
    return ‘<span style=”margin: 4px; float: ‘ + columnproperties.cellsalign + ‘; color: #008000;”>’ + value + ‘</span>’;
    }
    }

    in reply to: Conditional row format Conditional row format #47648

    morgenweck
    Participant

    I’m using
    var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
    if (value === ‘NY’) {
    return ‘<span style=”margin: 4px; float: ‘ + columnproperties.cellsalign + ‘; color: #0000ff;”>’ + value + ‘</span>’;
    }
    else {
    return ‘<span style=”margin: 4px; float: ‘ + columnproperties.cellsalign + ‘; color: #008000;”>’ + value + ‘</span>’;
    }
    }
    for the cell that has the condition that I want to format but how do I pass the same value for other cells?

    my grid looks like

    City State Zip

    how do I render the City and Zip cells based upon the State’s value?

    in reply to: autorowheight and scroll bar autorowheight and scroll bar #47385

    morgenweck
    Participant

    But even using paging I would have enough screen at times without the help of a scroll bar. I think I should start investigating the jqxDatatable or if I put the grid into a jqxPanel would that then show a scroll bar?

    in reply to: Filter- reload data- unfilter Filter- reload data- unfilter #33189

    morgenweck
    Participant

    Additional Information:
    If I save the filter using var filtersinfo = $(‘#jqxGrid’).jqxGrid(‘getfilterinformation’);

    How can I reapply it? Can I use $(‘#jqxGrid’).jqxGrid(‘addfilter’,?????)


    morgenweck
    Participant

    I appreciate the answer but that is not the question. I’m not looking to save the state or load a state, I’m looking to create the grid with different options of the column layout based upon an external condition without have to recreate the data source and all of the other code. In most of the demo examples the url is created by using

    var url = “../sampledata/products.xml”;

    and then using url as a

    root: “Products”,
    record: “Product”,
    id: ‘ProductID’,
    url: url
    };

    I want to expand that to the columns

    so instead of having

    columns: [
    { text: ‘Name’, datafield: ‘name’, hidden: true, width: 250 },
    { text: ‘Beverage Type’, datafield: ‘type’, width: 250 },
    { text: ‘Calories’, datafield: ‘calories’, width: 180 },
    { text: ‘Total Fat’, datafield: ‘totalfat’, width: 120 },
    { text: ‘Protein’, datafield: ‘protein’, minwidth: 120 }
    ]

    I have
    var columns = ‘”[
    { text: ‘Name’, datafield: ‘name’, hidden: true, width: 250 },
    { text: ‘Beverage Type’, datafield: ‘type’, width: 250 },
    { text: ‘Calories’, datafield: ‘calories’, width: 180 },
    { text: ‘Total Fat’, datafield: ‘totalfat’, width: 120 },
    { text: ‘Protein’, datafield: ‘protein’, minwidth: 120 }
    ]”

    and then I use

    columns: columns

    But that code does not work because of all of the single quotes and double quotes and I have tried many different combinations and I was hoping that you might know the right combination.

    Thanks

Viewing 15 posts - 16 through 30 (of 32 total)