General Category > Help for ParamQuery Pro

Filter header box

<< < (2/4) > >>

paramvir:
[ Only Pro members may read this post. ]

rebound.support:
Hi,

Can you guide me to how to bind filter options dynamic?
Following code I have added but not working.

create: function (evt, ui) {
$.getJSON("Common.ashx?Action=MonthNew", function (response) {
                            var column = grid.getColumn({ dataIndx: 'MonthName' });
                            column.filter.options = response;
                        });
},

paramvir:
[ Only Pro members may read this post. ]

rebound.support:
Hi,

Code:
================
For DropDown:

{
                            title: "Month", dataIndx: "MonthName", width: 110, valueIndx: "Month", align: "center",
                            filter: {
                                crules: [{ condition: 'range' }], 
                                options: [
                                ],
                            },
                            editor: {
                                type: 'select',
                                valueIndx: "ID",
                                labelIndx: "Name",
                                mapIndices: { "Name": "MonthName", "ID": "Month" },
                                options: [
                                ]
                            },
                            validations: [{ type: 'minLen', value: 1, msg: "Required" }]
                        },
========================

For Filling data to filter:

create: function (evt, ui) {
$.getJSON("Common.ashx?Action=MonthNew", function (response) {
                            var column = grid.getColumn({ dataIndx: 'MonthName' });
                            column.filter.options = response;
                        });
},

===================
Response from  Handler is:

{1:"January"},{2:"February"},{3:"March"},{4:"April"},{5:"May"},{6:"June"},{7:"July"},{8:"August"},{9:"September"},{10:"October"},{11:"November"},{12:"December"}

==============================

Value in Filter dropdown:

No row to display.

==================================

Console Error:
 No Error.


paramvir:
[ Only Pro members may read this post. ]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version