jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts

  • jbrahy
    Participant

    Where do these come from?

    
                    	datafield: 'someForeignData',
                      displayfield: 'foreignDataLookup',
    

    jbrahy
    Participant

    ok, so this is where I’m at. I definitely see the drop downs populating but I don’t see any text in them. I’m hoping that it’s just a little mistake somewhere that you can point out. I’m also going to re-read your examples and see what I can find.

    
    <script type="application/javascript">
      $(document).ready(function() {
    
        let duplication_control_types_source = {
          datatype: 'json',
          datafields: [
            {
              name: 'duplication_control_type_id',
              type: 'int',
            }, {
              name: 'duplication_control_type',
              type: 'string',
            },
          ],
          url: '/cgi-bin/duplication_control_types/dataset?rand=' + Math.random().toString(),
        };
        let duplication_control_types_data_adapter = new $.jqx.dataAdapter(duplication_control_types_source);
    
        let publisher_group_source = {
          datatype: 'json',
          datafields: [
            {
              name: 'publisher_group_id',
              type: 'int',
            }, {
              name: 'publisher_group',
              type: 'string',
            },
          ],
          url: '/cgi-bin/publisher_groups/dataset/?rand=' + Math.random().toString(),
        };
        let publisher_groups_data_adapter = new $.jqx.dataAdapter(publisher_group_source);
    
        let color_groups_source = {
          datatype: 'json',
          datafields: [
            {
              name: 'color_group_id',
              type: 'int',
            }, {
              name: 'color_group',
              type: 'string',
            },
          ],
          url: '/cgi-bin/color_groups/dataset/?rand=' + Math.random().toString(),
        };
        let color_groups_data_adapter = new $.jqx.dataAdapter(color_groups_source);
    
        let product_groups_source = {
          datatype: 'json',
          datafields: [
            {
              name: 'product_group_id',
              type: 'int',
            }, {
              name: 'product_group',
              type: 'string',
            },
          ],
          url: '/cgi-bin/product_groups/dataset/?rand=' + Math.random().toString(),
        };
    
        let product_groups_data_adapter = new $.jqx.dataAdapter(product_groups_source);
        let duplication_controls_source = {
          datatype: 'json',
          datafields: [
            {
              name: 'duplication_control_id',
              type: 'int',
            }, {
              name: 'duplication_control',
              type: 'string',
            }, {
              name: 'duplication_control_type_id',
              type: 'int',
              values: {
                source: duplication_control_types_data_adapter.records,
                value: 'duplication_control_type_id',
                name: 'duplication_control_type',
              },
            }, {
              name: 'duplication_control_type',
              type: 'string',
            }, {
              name: 'publisher_group_id',
              type: 'int',
              values: {
                source: publisher_groups_data_adapter.records,
                value: 'publishers_group',
                name: 'publisher_groups_id',
              },
            }, {
              name: 'color_group_id',
              type: 'int',
              values: {
                source: color_groups_data_adapter.records,
                value: 'color_group_id',
                name: 'color_group',
              },
            }, {
              name: 'product_group_id',
              type: 'int',
              values: {
                source: product_groups_data_adapter.records,
                value: 'product_group_id',
                name: 'product_groups',
              },
            }, {
              name: 'created_at',
              type: 'datetime',
            }, {
              name: 'updated_at',
              type: 'datetime',
            }, {
              name: 'deleted_at',
              type: 'datetime',
            },
          ],
          url: '/cgi-bin/duplication_control/dataset/?rand=' + Math.random().toString(),
          updaterow: function(rowid, rowdata, commit) {
            // synchronize with the server - send update command
            // call commit with parameter true if the synchronization with the server is successful
            // and with parameter false if the synchronization failed.
    
            commit(true);
          },
        };
    
        let duplication_controls_data_adapter = new $.jqx.dataAdapter(duplication_controls_source, {
          autoBind: true,
        });
    
        $('#duplication_controls_table').jqxGrid({
          source: duplication_controls_data_adapter,
          editable: true,
          width: '100%',
          height: '100%',
          theme: 'dark',
          columns: [
            {
              text: 'Duplication Control',
              columntype: 'textbox',
              datafield: 'duplication_control',
              width: 120,
            }, {
              text: 'duplication_control_type',
              columntype: 'dropdownlist',
              datafield: 'duplication_control_type',
              width: 150,
              createeditor: function(row, value, editor) {
                editor.jqxDropDownList({
                  source: duplication_control_types_data_adapter,
                  displayMember: 'duplicate_control_type',
                  valueMember: 'duplicate_control_type_id',
                  autoDropDownHeight: true,
                });
              },
            }, {
              text: 'Owner List Group',
              displayMember: 'publisher_group',
              valueMember: 'publisher_group_id',
              columntype: 'dropdownlist',
              datafield: 'publisher_group',
              width: 150,
              createeditor: function(row, value, editor) {
                editor.jqxDropDownList({
                  source: duplication_control_types_data_adapter,
                  displayMember: 'duplicate_control_type',
                  valueMember: 'duplicate_control_type_id',
                  autoDropDownHeight: true,
                });
              },
            }, {
              text: 'Routing Rule Group',
              displayMember: 'color_group',
              valueMember: 'color_group_id',
              columntype: 'dropdownlist',
              datafield: 'color_group',
              width: 150,
              createeditor: function(row, value, editor) {
                editor.jqxDropDownList({
                  source: duplication_control_types_data_adapter,
                  displayMember: 'duplicate_control_type',
                  valueMember: 'duplicate_control_type_id',
                  autoDropDownHeight: true,
                });
              },
            }, {
              text: 'Manager List Group',
              columntype: 'dropdownlist',
              datafield: 'product_groups',
              width: 150,
              createeditor: function(row, value, editor) {
                editor.jqxDropDownList({
                  source: duplication_control_types_data_adapter,
                  displayMember: 'duplicate_control_type',
                  valueMember: 'duplicate_control_type_id',
                  autoDropDownHeight: true,
                });
              },
            }, {
              text: 'created_at',
              datafield: 'created_at',
              width: 150,
            }, {
              text: 'updated_at',
              datafield: 'updated_at',
              width: 150,
            },
          ],
        });
      });
    </script>
    
    <div class="container">
        <div class="row">
            <div class="col-12">
                <div id="duplication_controls_table"></div>
            </div>
        </div>
    </div>
    
    

    jbrahy
    Participant

    Thank you Svetoslav Borislavov, I think this is exactly what I’m looking for. I’m going to put it into a test and see how it works.


    jbrahy
    Participant

    I was looking to see how add float group was implemented but it’s giving an error when loading that page.

    https://jseditor.io/?key=jqxdockinglayout-addfloatgroup-method

    Is there a way to add a document to a document group programmatically?


    jbrahy
    Participant

    Thank you. This is exactly what I needed!


    jbrahy
    Participant

    I need the row values to compute the value for the column. How do I access those?

    in reply to: JqxPivotGrid and json data JqxPivotGrid and json data #105172

    jbrahy
    Participant

    Thanks!

    in reply to: JqxPivotGrid and json data JqxPivotGrid and json data #105141

    jbrahy
    Participant

    Any update on this? I’m seeing the same problem with loading remote json and jqxPivot. The workaround of remotely pulling the data and then putting it into a local array works but I was just hoping for a fix to the issue.


    jbrahy
    Participant

    That’ll be perfect. Thanks!

    in reply to: dropdownlist filter contains dropdownlist filter contains #74470

    jbrahy
    Participant

    that’s perfect, thank you

    in reply to: Drag tab to window? Drag tab to window? #67536

    jbrahy
    Participant

    Hi Nadezhda,

    Thanks for the reply. I don’t see a way to detect if a drag is off the tab. I only see these two events. Is there anyway to detect if a user is trying to drag a tab off?

      
                //DragStart event
                $('#jqxTabs').on('dragStart', function (event) {
                    displayEvent(event);
                });
                //DragEnd event
                $('#jqxTabs').on('dragEnd', function (event) {
                    displayEvent(event);
                });
    

    Thanks,

    JB

    in reply to: storing data with a tooltip storing data with a tooltip #66025

    jbrahy
    Participant

    ok, thanks. This solution worked great for me.

    in reply to: storing data with a tooltip storing data with a tooltip #65946

    jbrahy
    Participant

    not sure why I called it a tooltip. Feel free to change the title to notification.

    and forgot to add this into the for loop
    $("#jqxNotification").attr("alert_log_id", alert.alert_log_id);

    in reply to: rangeSelector initial scope rangeSelector initial scope #65095

    jbrahy
    Participant

    ok, updated to 3.6 and still have the same issue. just in case that was the problem.

    I’ve also tried setRange on the jqxChart object with no luck.

    in reply to: rangeSelector initial scope rangeSelector initial scope #65088

    jbrahy
    Participant

    I see there is setRange which is exactly what I would like but how do I do that in a chart like this: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/index.htm?(arctic)#demos/jqxchart/javascript_chart_range_selector.htm It seems like you guys are already doing it but I don’t see the code.

    $("#rangeSelector").jqxRangeSelector('setRange', 30, 70)

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