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 - urnerbarry

Pages: [1]
1
Ok Thanks for your quick reply! I will do some code re-factoring and let you know my end result.

2
Hello,

I am new to using ParamQuery Pro. I'm having trouble setting/changing the contents of row data dynamically. My grid has 7 Columns:
ItemName (DropDownList editor),
LineDesc,
ClassName (DropDownList editor),
UnitPrice (datatype:float),
Quantity (datatype:integer),
ExtendedAmount (datatype:float, editable=false) -- this is a computed column based on UnitPrice & Quantity,
Tax (DropDownList editor)

When an Item is selected in ItemName, I want to populate the remaining columns from my JSON data. I am using the cellSave event as follows:

cellSave: function (evt, ui) {
                        var dataIndx = ui.dataIndx;
                        var rowIndx = ui.rowIndx;

                        if (dataIndx == 'ItemName') {
                            var id = $('.itemsListData').val();

                            $.each(itemsJson, function (i, val) {
                                if (val.ItemLookupId == id) {
                                    ui.rowData['LineDesc'] = val.LineDesc;
                                    ui.rowData['ClassName'] = val.ClassName;
                                    ui.rowData['UnitPrice'] = val.UnitPrice;
                                    ui.rowData['Quantity'] = val.Quantity;
                                    ui.rowData['ExtendedAmount'] = val.ExtendedAmount (is present in JSON when no UnitPrice given);
                                    ui.rowData['TaxDesc'] = val.TaxDesc;
                                }

                            });
                        }


                        if (dataIndx == 'Quantity' || dataIndx == 'UnitPrice') {
                            $grid.pqGrid('refreshCell', { dataIndx: 'ExtendedAmount', rowIndx: rowIndx });
                        }
                    }

The LineDesc column works and displays properly, but none of the other columns are displaying. I'm not sure if I am setting the other drop down list editors properly. I also noticed that if I tab to the numeric datatype columns that the value is there in edit mode but does not display on screen. Can you please advise?

Thank you!

Pages: [1]