Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • in reply to: Button at bottom of nested grid Button at bottom of nested grid #97414

    rkamarowski
    Participant

    I accidentally came across a way to accomplish my original idea. This adds a button above the status bar:

        renderstatusbar: function (statusbar)
                                {
                                    // appends buttons to the status bar.
                                    var container = $("<div style='overflow: hidden; text-align: center; position: relative; margin: 5px;'></div>");
                                    var addButton = $("<div style='align: center; vertical-align: middle;'><span style='position: relative; '>Add New Order</span></div>");
                                    container.append(addButton);
                                    statusbar.append(container);
                                    addButton.jqxButton({  width: "98%", height: 20 });
                                    /* add new row.  */
                                    addButton.click(function (event)
                                        {
                                            alert("new order");
                                           /* var datarow = generatedata(1);
                                            $("#jqxgrid").jqxGrid('addrow', null, datarow[0]);*/
                                        }
                                    );

    rkamarowski
    Participant

    Got it! Thank you for your patience.

    Bob K.


    rkamarowski
    Participant

    Thinking about this another way, is there a way to add the standard status bar elements (Go to page, Show rows, etc.) to a custom status bar?


    rkamarowski
    Participant

    No problem. Thank you. So I guess the answer is that there is no way to add a button (or plus sign) to the standard status bar.


    rkamarowski
    Participant

    That link just returns ‘This is a test.’ 🙂


    rkamarowski
    Participant

    Thank you. Now back to the original question, is there a way to put an ‘add’ button on the standard status bar of a nested grid?


    rkamarowski
    Participant

    I’m not sure how I could break it down because there are so many tables accessed. Is there a way for your example code to work in JS Editor?


    rkamarowski
    Participant

    Hristo, I’m unable to get the code to work. Here is my nested grid code:

    ` if (grid != null)
    {
    var dataAdapter = new $.jqx.dataAdapter(sourceOrder,
    {
    autobind: true,
    contentType: ‘application/json; charset=utf-8’,
    formatData: function (data)
    {
    $.extend(data,
    {
    active: ‘1’,
    workRecordID: workRecord[“WorkRecordID”]
    });
    return data;
    },

    loadError: function (xhr, status, error)
    {
    console.warn(xhr.responseText);
    alert(error);
    },
    loadComplete: function ()
    {
    var text = dataAdapter.records;
    },
    downloadComplete: function (data, status, xhr) { },
    });

    grid.jqxGrid(
    {
    autoheight: true,
    pageable: true,
    rowdetails: true,
    selectionmode: ‘singlerow’,
    sortable: true,
    source: dataAdapter,
    width: ‘95%’,
    columns: [
    {text: ‘Order Date’, datafield: ‘OrderDate’, width: ‘20%’},
    {text: ‘Description’, datafield: ‘Description’, width: ‘60%’},
    {text: “Order Category”, datafield: ‘OrderCategoryName’, width: ‘20%’},
    ]
    }
    );
    grid.bind(‘rowselect’, function (event)
    {
    event.stopPropagation();
    var selectedRowIndex = event.args.rowindex;
    if (selectedRowIndex < 0)
    return;

    var data = grid.jqxGrid(‘getrowdata’, selectedRowIndex);

    OrdersWidgetsClear();

    TabsEnable(2);

    NewDataFields(false, 1);

    $(“#comboBoxRightOrderActive”).val(data.Active);
    $(“#numberInputOrderCost”).val(data.Cost);
    $(“#textAreaRightOrderDescription”).val(data.Description);
    $(“#textAreaRightOrderNotes”).val(data.Notes);
    $(“#comboBoxRightOrderCategory”).val(data.OrderCategoryID);
    $(“#dateTimeInputRightOrderDate”).val(data.OrderDate);
    $(“#inputRightOrderPartNumber”).val(data.PartNumber);
    $(“#numberInputOrderShipping”).val(data.Shipping);
    $(“#numberInputOrderTaxes”).val(data.Taxes);
    $(“#inputRightOrderTotalCost”).val(data.TotalCost);
    $(“#inputRightOrderWorkOrder”).val(workRecord[“WorkRecordName”]);
    $(“#inputRightOrderVendor”).val(data.VendorName);

    order[“Cost”] = data.Cost;
    order[“Description”] = data.Description;
    order[“Notes”] = data.Notes;
    order[“OrderCategoryID”] = data.OrderCategoryID;
    order[“OrderCategoryName”] = data.OrderCategoryName;
    order[“OrderDate”] = data.OrderDate;
    order[“OrderID”] = data.OrderID;
    order[“PartNumber”] = data.PartNumber;
    order[“Shipping”] = data.Shipping;
    order[“Taxes”] = data.Taxes;
    order[“TotalCost”] = data.TotalCost;
    order[“VendorID”] = data.VendorID;
    order[“VendorName”] = null;
    order[“WorkRecordID”] = data.WorkRecordID;
    });
    }
    }`


    rkamarowski
    Participant

    The problem with the example is that it changes the look of the status bar. Is there a way to add a button without changing the look? I’m trying to keep the grids consistent.

    in reply to: Rowexpand selectrow by index Rowexpand selectrow by index #96553

    rkamarowski
    Participant

    Thank you!

    in reply to: Rowexpand selectrow by index Rowexpand selectrow by index #96531

    rkamarowski
    Participant

    I’m having the same issue. Is there any way to call the ‘rowselect’ function from within ‘rowexpand’?

    in reply to: jqxNumberInput background-color jqxNumberInput background-color #91537

    rkamarowski
    Participant

    Is it possible to change the background color using style=”background: color”; I’m not getting any results. I want to change the background color of just the readOnly NumberInput widgets


    rkamarowski
    Participant

    Thank you. I have no idea how I missed this.

    in reply to: ENUM display ENUM display #91327

    rkamarowski
    Participant

    Figured it out. DataAdapter.


    rkamarowski
    Participant

    Thank you.

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