jQWidgets Forums

jQuery UI Widgets Forums Getting Started How to set setcellvalue for jqx widget grid dropdownlist ??.

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 6 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Ethirajram
    Participant

    How to set grid dropdownlist specific value as customised, for ex:- if i choose Bank Text in dropdownlist based on From database FundingAmount will come incase FundingAmount 0 means it reverse to Own, i tried to setcellvalue to reverse Own but it showing same Bank Text itself, how to enforce to set desired value to show text in jqx widget grid dropdownlist

    code:-

    {
    text: ‘Funding Mode’, datafield: ‘FundMode1’, displayfield: ‘FundingMode’, cellsalign: ‘left’, align: ‘left’,
    width: ‘100px’, columntype: ‘dropdownlist’, editable: true,
    createeditor: function (row, cellvalue, editor) {
    var source = [{ value: ‘O’, label: ‘Own’ }, { value: ‘B’, label: ‘Bank’ }, { value: ‘H’, label: ‘Hold’ }];
    editor.jqxDropDownList({ source: source, displayMember: ‘msds’, valueMember: ‘msid’, placeHolder: “–Select–” });
    },
    cellendedit: function (row, datafield, columntype, newvalue, oldvalue, obj) {
    $(“#jqxgridAdd”).jqxGrid(‘setcellvalue’, row, “FundMode”, oldvalue.value);
    
    if (oldvalue.value == ‘B’) {
    var value = $(“#jqxgridAdd”).jqxGrid(‘getrowdata’, row);
    var params = ”;
    var factid = $(‘#<%=ddlFactory.ClientID%>’).val();
    if (!isEmpty(factid))
    params += “@FactoryId$” + factid;
    
    var payno = $(‘#<%=ddl_PaymentNo.ClientID%>’).val();
    if (!isEmpty(payno))
    params += “~@PaymentNo$” + payno;
    
    if (!isEmpty(value.RyotNumber))
    params += “~@RyotNumber$” + value.RyotNumber;
    
    var data = GetData(“DBSP_GetPaymentFundingBankRyotAmount”, params);
    if (!isEmpty(data.Table[0].FundingAmount)) {
    if (data.Table[0].FundingAmount == 0) {
    $(“#jqxgridAdd”).jqxGrid(‘setcellvalue’, row, “FundMode1”, “O”);
    $(“#jqxgridAdd”).jqxGrid(‘setcellvalue’, row, “FundMode”, ‘O’);
    }
    }
    }
    }
    }

    Hristo
    Participant

    Hello Ethirajram,

    Could you clarify it? What you try to achieve?
    Because the cellendedit is an event.
    I would like to suggest you look at this demo.
    You could find that you could change the final result that will be set in the cell via the cellvaluechanging.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.