jQWidgets Forums

jQuery UI Widgets Forums Grid Group/Edit column in Grid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Group/Edit column in Grid #48961

    Zylin
    Participant

    Trying to do a combination of Grouping and Editing to allow a user to control what group a row belongs to. When I started, the “Groups” column was editable; however, when I added it as the group column, I could no longer edit.

    Quick work around was to duplicate the column and hide the group column while keeping the exposed editable column – worked GREAT! When changing values from one existing group to the other, set the group cell to the value of edited cell and groups were automatically updated.

    Problem presents its self when changing the value to a value not in existence, in effect, creating a new grouping. The grid displays the groups correctly (including the new group); however, the last row is now supressed and will only appear if the new group value is changed to one of the original values. It behaves as if the new group heading does not add a row for its own use, thus supressing the final row of the grid.

    Tried adding logic to detect new group and if so, add new row ” $(“#gridViewDiv”).jqxGrid(“addrow”, null, []); “; however, getting error this.editcell.value is null or not an object. It seems to choke on the editable columns in the new row. Any help would be appreciated.

    Thanks,
    Steve

    Defined grid:
    var gPatientColumns = [
    { text: “Entity ID”, datafield: “EntID”, width: 0 },
    { text: “Group”, datafield: “grp”, width: 0},
    { text: “Groups”, datafield: “Group”, width: 55, cellsalign: “center”, editable: true, cellendedit: gEditGroupOrder, cellvaluechanging: gGroupOrderChange },
    { text: “Order”, datafield: “Order”, width: 48, cellsalign: “center”, editable: true, cellendedit: gEditGroupOrder, cellvaluechanging: gGroupOrderChange },
    { text: “sortfield”, datafield: “sortfield”, width: 0, editable: false },
    { text: “Match Rating”, datafield: “Crating”, width: 95, cellsalign: “center”, cellsrenderer: gRenderRating, editable: false },
    { text: “Unique ID”, datafield: “UniqueId”, width: 88, editable: false },
    { text: “First Name”, datafield: “trait.name.first”, width: 100, cellsrenderer: gRenderHighlight, editable: false },
    { text: “Middle Name”, datafield: “trait.name.middle”, width: 100, cellsrenderer: gRenderHighlight, editable: false },
    { text: “Last Name”, datafield: “trait.name.last”, width: 100, cellsrenderer: gRenderHighlight, editable: false },
    { text: “DOB”, datafield: “trait.dob”, width: 100, cellsrenderer: gRenderHighlight, editable: false },
    { text: “Gender”, datafield: “trait.gender”, width: 54, cellsalign: “center”, cellsrenderer: gRenderHighlight, editable: false },
    { text: “SSN”, datafield: “trait.ssn”, width: 112, cellsrenderer: gRenderHighlight, editable: false },
    //{ text: “Full Address”, datafield: “trait.fulladdress”, width: 240, cellsrenderer: gRenderHighlight, editable: false },
    { text: “Phone”, datafield: “trait.phone”, width: 124, cellsrenderer: gRenderHighlight, editable: false },
    { text: “Linked”, datafield: “LinkCount”, width: 48, cellsalign: “center”, editable: false },
    { text: “Last Edit”, datafield: “lastedit”, width: 240, editable: false, cellsrenderer: function (row, columnfield, value) { return cFormatAndMaskDateTime(value, “MM/dd/yyyy hh:mm tt”); } }];

    $(“#gridViewDiv”).jqxGrid({
    source: dataAdapter,
    theme: “custom”,
    editable: true,
    sortable: false,
    altrows: true,
    showemptyrow: false,
    rowsheight: 20,
    showsortmenuitems: false,
    showdefaultloadelement: false,
    editmode: ‘selectedcell’,
    selectionmode: ‘singlecell’,
    ready: function () { },
    columnsresize: true,
    columns: coldata,
    groupable: true,
    groupsrenderer: groupsrenderer,
    groups: [‘grp’],
    groupsexpandedbydefault: true,
    showgroupsheader: false
    });

    Group/Edit column in Grid #48972

    Peter Stoev
    Keymaster

    Hi Steve,

    I am afraid that we removed the Editing from a Grouped Column by design. The reason was that by changing the Grouped column’s value, the Grouping order would become invalid and for that reason we disabled it by default.

    Best Regards,
    Peter Stoev

    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.