jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 136 through 150 (of 177 total)
  • Author
    Posts

  • Vladimir
    Participant

    Hello yangtsecxf,

    You can check this demo for a working example of jqxGrid used in virtual mode.

    In your code you seem to lack the source option for your grid, so it doesn’t know how many total rows it should display. In the provided fiddle you can see it is set to a dataAdapter linked to an empty object array with totalRecords option specified.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    in reply to: updatebounddata not work updatebounddata not work #75796

    Vladimir
    Participant

    Hello Rajesh,

    You can take a look at these two demos for examples on how to update the data in your grid.
    refresh data demo
    and
    create/remove/update demo.
    If you are still having an issue please provide a fiddle for further assistance.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    in reply to: Using knockout for a sub-menu Using knockout for a sub-menu #75774

    Vladimir
    Participant

    Hello alanfaux,

    Unfortunately we have no such demo.
    However what you can do is have a menu initialized by a dataAdapter connected to your json/knockout. Demo for json binding.
    And have logic inside one of the dataAdapter’s callback functions (for example loadComplete() callback function) that modifies your data so that has your fixed content along with your dynamic content. You may also need to reset the menu source in loadComplete if the databinding doesn’t update automatically.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com


    Vladimir
    Participant

    Hello brogen,

    To events area is handled by the following code:

    $('#chartContainer').jqxChart(settings)
                    .on('click mouseover mouseout toggle rangeSelectionChanging rangeSelectionChanged refreshBegin refreshEnd', function (event) {
                        if (event.args)
                            dumpEventInfo(event);
                    });
    

    It uses the dumpEventInfo function so if you remove the handler you can remove that function as well.
    And then you can remove the textarea from the html
    <textarea id="eventsTextArea" style="width:800px; height: 200px"></textarea>

    Regarding your fist question.
    Take a look at the formatFunction declarations. They are used to specify how the date is formatted, so you can edit them to fit your needs.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    in reply to: Get XAxisText with Click Event Get XAxisText with Click Event #75752

    Vladimir
    Participant

    Hello minsu0806,

    The event argument event.args.elementIndex holds the information of the records index. So in this case it would return 0, for the first day (e.g. Monday).
    So depending on your implementation you can map this value to your desired result. In this particular example you can have something like this:

       function myEventHandler(event) {
                    var daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
                    var day = '';
                    if (event.args.elementIndex !== undefined) {
                        day = daysOfWeek[event.args.elementIndex];
                    }
                    var eventData = '<div><b>Last Event: </b>' + event.type + '<b>, XaxisText: </b>' + day + '<b>, Serie DataField: </b>' + event.args.serie.dataField + '<b>, Value: </b>' + event.args.elementValue + "</div>";
                    if (event.type == 'toggle')
                        eventData = '<div><b>Last Event: </b>' + event.type + '<b>, Serie DataField: </b>' + event.args.serie.dataField + '<b>, visible: </b>' + event.args.state + "</div>";
                    $('#eventText').html(eventData);
                };

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com


    Vladimir
    Participant

    Hello nimli,

    You can do this in a couple of different ways.
    1. If you already have the structure for the html <select> code, you can directly create the jqxDropDownList from that. Here is the demo for it.
    2. If you want to only pass array data from php, you can use a dataAdapter, and load it from a JSON array. You can check the binding to json demo for it (note demo is using remote json, but you should be able to change it easily).

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: Identify object type Identify object type #75683

    Vladimir
    Participant

    Hello nimli,

    Unfortunately there is no direct way to check what type of widget an element is.
    If you need to remember what widget is assigned to what element you would need to store this information yourself. I.e. hold it in array for example.

    However if you only need to set/get the value of the field, you can try using the .val() method which is supported by a big part of the widgets so depending on your case it may work for you.

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: jqxGrid default filter operator jqxGrid default filter operator #75682

    Vladimir
    Participant

    Hello swagdiar,

    You can check the demo for filter conditions, for an example of how you can customize your filtering conditions.

    You can also find the full list of filter conditions that you can use in the API Reference page for addFilter function.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    in reply to: Populate Tree label? Populate Tree label? #75659

    Vladimir
    Participant

    Hello realtek,

    The Tree has no autobind functionality, so if the dataAdapter records get updated after the initialization, you need to reset the source manually.

    You can try to use loadComplete callback of the dataAdapter:

    
             loadComplete: function () {
                            $('#jqxTree').jqxTree({ source: dataAdapter.records});
                        },

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: Populate Tree label? Populate Tree label? #75650

    Vladimir
    Participant

    Hello realtek,

    Make sure you have called the dataAdapter.dataBind() method.
    Take a look at this sample with the json you provided.

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: Populate Tree label? Populate Tree label? #75647

    Vladimir
    Participant

    Hello realtek,

    Please try the method used in the binding to json demo.
    The mapping there is done in a records variable.

                    var records = dataAdapter.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label'}]);
    

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: Populate Tree label? Populate Tree label? #75636

    Vladimir
    Participant

    Hello realtek,

    The TreeGrid source functionality is explained in the demos in the API Reference section under source.
    You can find the full list of fields and how they need to be referenced there.
    You can use the dataAdapter map: functionality to map your own fields to the relevant value.

    Example:

                                { name: 'label' map: 'DisplayName'},
    

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/


    Vladimir
    Participant

    Hello LWCARAB,

    For cell content you can use the cellclick event.

    This example shows how you can use cellclick event.

    All events are listed in the grid API reference where you can find examples on how to use them.

    Best Regards,
    Vladimir

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: Copy from Cell without Copy from Cell without #75598

    Vladimir
    Participant

    Hello LWCARAB.

    I think that one of the things you can try is to try binding to the cellbeginedit and cellendedit events of the grid, and manually replace them with \n during the edit phase but I think that this approach would be very impractical.

    What I would suggest as a workaround is this:
    If you are printing your values in separate rows/cells, you can use the 'selectionmode': 'multiplecells' option to allow your users to select the data they need.

    In case you need it to be in the same cell, since you are most likely adding the <br/> tags yourself, you can add ‘\n’ symbols instead, and set the following css style:

    `.jqx-grid-cell-wrap {
    white-space: pre !important;
    }`
    The !important is needed, since the value is already set originally with !important.

    Note that since the grid doesn’t really support editing of multiline strings, editing the field will strip the new line symbols, so I would advise that you disable edit if you go this route.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com


    Vladimir
    Participant

    Hello Programmerswe,

    I am really sorry, I have missed to share it after I forked it.
    You should be able to see it now.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 15 posts - 136 through 150 (of 177 total)