OlegK

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 968 total)
  • Author
    Replies
  • OlegK
    Participant

    It’s a bug. One needs include return; line after the line of jqGrid code (see here). You can get the fixed version of jquery.jqGrid.src.js here.

    Best regards
    Oleg

    in reply to: Strange behaviour after updating to jqGrid 4.7.0 #103789
    OlegK
    Participant

    Hello Tony,

    I posted the pull request which contains the changes in addJSONData and normalizeData required to fix problem with the usage key:true in combination with the reader (jsonReader or localReader) having repeatitems:true.

    Here is the modified version of jquery.jqGrid.src.js.

    The problem come after you changed old keyIndex option to keyName. It was done to fix problem with non-updated keyIndex option after resorting columns in jqGrid (by usage columnChooser or drag and drop of column headers in case of the usage sortable:true).

    I hope that I tested all possible cases.

    Best regards
    Oleg

    in reply to: Strange behaviour after updating to jqGrid 4.7.0 #103785
    OlegK
    Participant

    Hi,

    usage of demos simplify all. The reason of the problem with sending wrong idCity – the rowids of the grid will be wrong assigned. It’s a bug in jqGrid. The bug exists in combination of the usage of arrays of strings as the input value of row like [“13570″,”Some name 1″,”Australia”] and the usage of key:true property in colModel. I will post later to github my suggestion how to fix the problem. As the workaround I suggest you to add jsonReader : {id: 0} option and remove key:true property from the first column definition.

    See http://jsfiddle.net/OlegKi/d26hzhu6/3/

    About the problem with the requirement to post idCity=3 instead of the text “Australia” I wrote you two times before. You used wrong configuration which worked in old versions of jqGrid, but the but are fixed some years ago (probably in the version 4.4.5). So you should decide whether you want that jqGrid hold values like 1,2,3 in idCity column (and displays still the texts “London”, “Washington”, “Australia”) or you use the texts “London”, “Washington”, “Australia” in the data. In the first case you the communication with the server will be in ids 1,2,3, but the values have to be used in both input of grid and the output. Exactly the example I used in the modified demo. Alternatively you can fill jqGrid with the data like “London”, “Washington”, “Australia”, but exactly the same data will be send to the server during editing.

    You still can use serializeEditData to remap any standard values like “London”, “Washington”, “Australia” to 1,2,3 or on the contrary, but I don’t recommend you to do so because I personally find such kind on communication transfer non-consequent.

    Best regards
    Oleg

    in reply to: Strange behaviour after updating to jqGrid 4.7.0 #103673
    OlegK
    Participant

    If you have an interest to prepare the jsfiddle demo which uses Ajax you can use http://jsfiddle.net/OlegKi/ntfw57zm/ as an example.

    I can repeat that I think that you use wrong value editoptions:{ value:”1:London;2:Washington;3:Australia”}. You use “Australia” and “Washington” in the input data. So you don’t use ids in the input data. It means that editoptions:{ value:”London:London;Washington:Washington;Australia:Australia”} will be correct.

    If you do want to use ids in the idCity column you should use [[“13570″,”Some name 1″,”3”],[“34233″,”Some name2″,”Washington”]] and

    In the way the data will hold only ids in idCity column but display texts. formatter:’select’ do the mapping. Because you use prmNames: {id: “idPer”, …} no hidden idPer column is required.

    Best regards
    Oleg

    in reply to: Strange behaviour after updating to jqGrid 4.7.0 #103670
    OlegK
    Participant

    To fix the problem one have to debug the code. So one needs to have the working demo which uses uncompressed version of jqGrid jquery.jqGrid.src.js (instead of jquery.jqGrid.min.js). If one can see that wrong information will be posted to the server that one don’t need and server part to debug such demo. So please prepare always a working demo if you report the bug.

    About the first issue which you report all sounds very strange. You write about “the id’s of the combos instead of the text“. So you use probably select with options having different value and the text. It seems me wrong if you use edittype:’select’ and not uses formatter:’select’. One uses different values and texts in select options only in the case that one fill the data with ids (values), but one want to display the texts for the user. formatter:’select’ do that. The only disadvantage of the approach is that the formatter have to know the mapping between ids and the texts during filling of the grid. One can’t make an additional asynchronous call to the server. So one uses formatter:’select’ with editoptions.value instead of usage of editoptions.dataUrl. If one need still build dynamic values of editoptions.value one can set it inside of beforeProcessing callback. See the answer for more details.

    About the problem with the date format you should try to use reformatAfterEdit: true option of formatter: “date”.

    Best regards
    Oleg

    in reply to: JQGrid Table Issue #103663
    OlegK
    Participant

    It’s a basis design part of the jqGrid implementation. Do you tried to set fixed height (some integer value) of jqGrid, so that vertical scroll bar appears? In the case the vertical scroll bar exist only in the body of the grid. During vertical scrolling the column header (which can contains searching toolbar or other elements) will stay on it’s place and only the grid data will be scrolled. There are some implementation alternatives which have always some disadvantages and restrictions in different version of web browser. So one have to make a choice and to follow it.

    Best regards
    Oleg

    in reply to: Bug in addRowData Method #103659
    OlegK
    Participant

    Hi Greg,

    I created the pull request based on your bug report.

    Best regards
    Oleg

    OlegK
    Participant

    Sorry, but where you get so bad code example!!!??? Please never fill the grid with respect of addRowData. The simplified code which do the same is http://jsfiddle.net/OlegKi/usqgrnau/3/. The problem is that the code of the example is still buggy. It uses

    Â instead of

    It’s not the same values. So the demo is buggy and the only problem which I see is that jqGrid generate a little strange looking grid in the case of wrong input data. Nevertheless one can change the code of jqGrid a little to improve the look of results in case of usage wrong type of hidden property of colModel. One can improve the code of jqGrid by replacing the lineÂ

    to

    (like the line of formatCol do) and the lineÂ

    toÂ

    Best regards
    Oleg

    in reply to: Display horizontal scrollbar even without data #102444
    OlegK
    Participant

    I wanted just add that

    seems be better as

    Best regards
    Oleg

    in reply to: SetGridWidth and Resize Problem with Group Headers #102428
    OlegK
    Participant

    If a problem exist one should provide the demo and the test case which describes how the problem can be reproduced.

    Best regards
    Oleg

    in reply to: Dynamically Disabling Buttons of JQGrid tool bar #102423
    OlegK
    Participant

    Sorry, but it seems to me that you didn’t read the referenced answer. I repeat: I suggest to create navGrid with all buttons which you could need make visible later. Then you hide unneeded buttons directly after creating and show it later when the button will be needed. The demo from the answer demonstrates how buttons from navGrid can be shown or hidden. 

    Regards
    Oleg

    in reply to: Edit form ok at first call, then always display same values #102422
    OlegK
    Participant

    Hi,

    the reason of the problem is the bug described starting from here. The bug should be already fixed in jqGrid code on github. As the workaround you can have two other options (one from the above workarounds can be used) which works in jqGrid 4.6.0:

    I hope that Tony will publish the current jqGrid code from github as new release of jqGrid.

    Best regards
    Oleg

    in reply to: Dynamically Disabling Buttons of JQGrid tool bar #102419
    OlegK
    Participant

    Hi Vignesh,

    look at the answer and this one in which included the corresponding demos. The idea is very easy: one can create all buttons and hide currently unneeded buttons. Later one can make some buttons visible depend on which row is selected. Alternatively on can disable/enable buttons instead of showing/hiding.

    Best regards
    Oleg

    OlegK
    Participant

    Hello Edotom,

    it’s definitively not a bug. Expanding of the subgrid is not the same as selection. Many subgrid can be expanded, but no row can be selected or the selected row can have no relation to the selected row.

    You don’t describe what exactly you try to do. The most scenarios can be implemented by usage subgrid callbacks (see the documentation). If you need to test whether some row is expanded (the “+” icon from the subgrid column was clicked before) then you can first get

    which contains “+” or “-” icon (the is the direct child having class “ui-sgcollapsed”) and then you can test whether the cell have “sgexpanded” class or “sgcollapsed” class.

    Best regards
    Oleg

    in reply to: improving performance of addJSONData #102392
    OlegK
    Participant

    Hello Tony,

    I expect possible memory leeks problems more in deleting of existing rows (in emptyRows), but placing replacing the table body with new content, where the only existing row is the first one, (at least in case of scroll:false) seems me safe. It’s strange, but setting of ts.grid.bDiv.scrollTop to 0 (even it the old value is already 0) take really a lot of time. I could not find any case when the setting is needed. Probably you can remind you better about such cases or just the condition in “if” is wrong.

    In any way it’s good to test the suggested modification.

    Best regards
    Oleg

    P.S. Please don’t forget about the pull request and about the post when you find time for it. We wait for new release of jqGrid too. Best wishes! 

Viewing 15 replies - 1 through 15 (of 968 total)

Stay connected with us in your favorite flavor!