jQuery UI Widgets Forums Grid Scroll bar vanishes on 2nd search

This topic contains 10 replies, has 2 voices, and was last updated by  rharding98 11 years, 9 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • Scroll bar vanishes on 2nd search #28175

    rharding98
    Participant

    The grid works fine the first time it is loaded on a search but any search after that and the scroll bar vanishes. You also can’t access the header to sort, group etc. If you reload the page and search again the first search is fine but all subsequent searches cause it to lock up. You can only navigate it using the scroll wheel of the mouse.

    Any help would be appreciated.

    Thanks,
    Roy

    Scroll bar vanishes on 2nd search #28177

    Peter Stoev
    Keymaster

    Hi Roy,

    Please, provide a sample which demonstrates the behavior that you describe and your application scenario.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Scroll bar vanishes on 2nd search #28215

    rharding98
    Participant

    I’m creating the datafields, columns and data dynamically from a JSON object. I have run into several issues besides the scroll bar grid lockup problem.

    1) when setting the column width to an empty string all of the column widths are extremely small and pressed up against the left of the grid.

    2) when the width is removed from the column settings it appears that the column width is only based on the header length and not the data.

    3) can’t seem to be able to expand the width of the column manually in the browser. While fiddling with the jsFiddle I found that if I group the grid I can then change the width of a column manually.

    4) can’t figure out a way to remove the quotes from the cellsrenderer function name in the JSON object

    5) using ‘autoheight: true, autorowheight: true’ locks up the browser with 590 rows.

    6) figured out the scrollbar issue while setting up the jsFiddle. This only happens when the showdefaultloadelement is set to false.

    I have setup a jsFiddle as an example. All of these issues can be seen there with minor changes to the config of the grid.

    http://jsfiddle.net/Tm4ct/14/

    Thanks,
    Roy

    Scroll bar vanishes on 2nd search #28220

    rharding98
    Participant

    forgot to mention that i’m using chrome.

    Scroll bar vanishes on 2nd search #28227

    Peter Stoev
    Keymaster

    Hi Roy,

    1. That is, because you did not set the “width” property of the columns as expected.
    2. In general, the width should be always set. If you want the Grid to auto-resize your columns, set the width property of each column and call “autoresizecolumns” once the Grid is initialized
    3. When you group the Grid, you can change the column’s width. When you ungroup it, you may change the column’s width again. However, your manual setting will not be persisted during group/ungroup.
    4. cellsrenderer is expected to be a Function and nothing else. It will not work otherwise.
    5. “autoheight” is used for Grids with Paging because it turns off the virtualization so you will end up with UI Elements for each cell and row instead of UI elements only for the visible view.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Scroll bar vanishes on 2nd search #28230

    rharding98
    Participant

    me again 🙁

    I also can’t figure out what to put as the datafield name for a nested json object. This is also in the jsfiddle above.

    datafields:

    {"name":"PremQualData[0].value","type":"float"},{"name":"PremQualData[0].occupancy","type":"float"},{"name":"PremQualData[1].value","type":"float"},{"name":"PremQualData[1].occupancy","type":"float"}

    data snippet:

    {"PropertyStatusID":1,"PropertyTypeMajor":"Agricultural","PropertyTypeSub":"Agribusiness-Aquaculture","PropertyType":"Agricultural - Agribusiness-Aquaculture","PropertyTypeDesc":"","JobID":214,"City":"Cincinnati","ST":"OH","Retechsno":"05-000050","JobSequence":"01","FileNumber":"","ProjectID":153,"TaskCode":"","Obligor":"","LoanNumber":"","BorrowersName":"Large Customer","EffDOV":null,"PropertySize":"20000","PropUnit":"SF-GBA","PropertySize2":"","PropUnit2":".","LandSize":"2.00","LandSizeUnit":"Acres","OAR":"","MAGIM":"","EffValPerIdx":null,"IAStabilizedVal":"","IAPerIdx":"","IAOAR":"","IANOI":"","IAExpenseRatio":"","MAStabilizedVal":"","MAValPerIdx":"","DiscountRate":"","YearBuilt":2002,"PendingSaleAmt":null,"Address1":"123 Main","ZipCode":"45205","MapNumber":"","NumElevators":"Null","PremQualData":[{"id":1,"value":"","occupancy":""},{"id":5,"value":"","occupancy":""}]}
    Scroll bar vanishes on 2nd search #28233

    Peter Stoev
    Keymaster

    Hi Roy,

    for loading nested JSON, you should use the datafield mapping. For examples see: jquery-grid-datasources.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Scroll bar vanishes on 2nd search #28243

    rharding98
    Participant

    Thanks Peter but I just took a look at the mapping examples and am still a bit confused as to how I would map the following sub object?

    "PremQualData":[{"id":1,"value":"","occupancy":""},{"id":5,"value":"","occupancy":""}]
    Scroll bar vanishes on 2nd search #28244

    rharding98
    Participant

    I will reply by item number

    1. I would think that if the width is empty that it would be ignored.
    2. OK. I will try setting the width for all columns and then call “autoresizecolumns” once it is initialized. I tried this already but without setting the widths and I had to click search twice for the grid to autosize.
    3. OK
    4. How can I get those quotes removed 🙁 Any ideas? I have tried several way without success.
    5. OK
    6. BUG?

    Thanks for the quick reply,
    Roy

    Scroll bar vanishes on 2nd search #28255

    rharding98
    Participant

    “map”:”PremQualData>0>value” works 🙂

    Scroll bar vanishes on 2nd search #28321

    rharding98
    Participant

    Hope someone replies to the issue with showdefaultloadelement that is reproducible here http://jsfiddle.net/Tm4ct/15/ If it is on and you click the search twice the verticle scroll bar is pushed out of view and the default load element is displayed even though it is off. The grid also appears to be locked up.

    Thanks,
    Roy

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.