Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
igGrid issue with Grouping
posted

Hi,

I am trying to build a grid with Group By. It works well as long as I add

features:
[
{
name: "GroupBy",
type: "local",
columnSettings: [{ columnKey: "ExpenseTypeID", isGroupBy: true }]
}
]

If I do not add group by feature my grid displays data. After adding GroupBy Feature, the grid actually stops displaying data.

Parents
  • 250
    posted

    Complete code following. It stops working for Group By feature, otherwise it shows data and works well

    <script type="text/javascript" src="~/Scripts/IG/infragistics.loader.js"></script>
    @(Html.Infragistics().Loader()
    .ScriptPath(Url.Content("~/Scripts/IG/"))
    .CssPath(Url.Content("~/Content/IG/"))
    .Resources("igShared,igGrid.*,igCombo")
    .Render()
    )
    <script type="text/javascript">
    $('#gridExpenseTypeReviewerMatrix').igGrid(
    {
    dataSource: getExpenseTypeReviewer(),
    dataSourceType: 'json',
    autoGenerateColumns: false,
    autoGenerateLayouts: false,
    generateCompactJSONResponse: false,
    virtualization: false,
    width: '95%',
    columns:
    [
    { key: 'ExpenseTypeID', dataType: 'number', headerText: 'Expense Type Name', width: '20%', formatter: lookupExpenseTypeName },
    { key: 'ReviewerID', dataType: 'number', headerText: 'Reviewer Name', width: '20%', formatter: lookupExpenseReviewerName },
    { key: 'MinimumAmount', dataType: 'number', headerText: 'Minimum Amount', width: '20%' },
    { key: 'MaximumAmount', dataType: 'number', headerText: 'Maximum Amount', width: '20%' }
    ],
    features:
    [
    {
    name: "Updating",
    enableAddRow: true,
    addRowLabel: "Add new Expense Type Reviewer",
    editMode: "row",
    enableDeleteRow: true,
    columnSettings: [
    {
    columnKey: "ExpenseTypeID",
    editorType: "combo",
    required: true,
    validatorOptions: { keepFocus: true },
    editorOptions: { dataSource: getExpenseTypeList(), valueKey: "ExpenseTypeID", textKey: "ExpenseTypeName" }
    },
    {
    columnKey: "ReviewerID",
    editorType: "combo",
    required: true,
    validatorOptions: { keepFocus: true },
    editorOptions: { dataSource: getReviewerList(), valueKey: "ReviewerID", textKey: "ReviewerName" }
    },
    {
    columnKey: 'MinimumAmount',
    editorType: 'currency',
    editorOptions: { button: 'spin', symbol: '', minValue: 0, maxValue: 1000000000, validatorOptions: {} }
    },
    {
    columnKey: 'MaximumAmount',
    editorType: 'currency',
    editorOptions: { button: 'spin', symbol: '', minValue: 0, maxValue: 1000000000, validatorOptions: {} }
    }]
    },
    {
    name: "GroupBy",
    type: "local",
    columnSettings: [
    { columnKey: "ExpenseTypeID", allowGrouping: false },
    { columnKey: "ReviewerID", isGroupBy: true },
    { columnKey: "MinimumAmount", allowGrouping: false },
    { columnKey: "MaximumAmount", allowGrouping: false },
    ]
    }
    ]
    });
    </script>

    <table id="gridExpenseTypeReviewerMatrix"></table>

Reply Children