Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jdhosier@burgessnorton.co

Pages: [1]
1
API returns data using Newtonsoft JsonConvert.SerializeObject(listObj)

 

Following code appears to go into a recursive loop and populates approx. 900+  blank rows in the grid.

   var approverList = this.GetWFApproverRoles(plantID);  // API call
  rolesGrid = pq.grid("#AvailableRoles", rolesGridProps);
  approverGrid.option("dataModel.data", approverList);
  approverGrid.refresh();

When initially loading the page, the following Razor code does create the proper
format of the data

var rolesData = @Html.Raw(Json.Encode(Model.WorkflowApproverRoles));

var rolesGridProps = {
                height: "flex",
                width: "100%",
                title: "Available Roles with users for the selected facility",
                collapsible: false,
                //postRenderInterval: -1,
                complete: function () { this.flex(); },
                refresh: function (evt, ui) {
                    if (ui.source != "flex") {
                        this.flex();
                    }
                },
                colModel: $.extend(true, [], rolesColModel),
                dataModel: $.extend(true, [], rolesDataModel   <<- what’s difference [] vs {}
               //  dataModel: $.extend(true, {}, rolesDataModel),
                dragModel: {
                    on: true,
                    clsDnD: "dnd1",
                    diHelper: ["ID"]
                },
                dropModel: {
                    on: true,
                    accept: ".dnd2"
                }
            }





 


2
Help for ParamQuery Pro / Implement draggable with option: clone
« on: April 10, 2020, 11:38:00 pm »
I need to be able to drag a row from one grid to another grid without have it removed from the first grid. I tried using JQuery to set the option helper to clone, but the grid threw an exception. Is there a way to do this in pqGrid?

Thanks
JHosier

Pages: [1]