jQuery UI Widgets › Forums › Grid › Scroll bar vanishes on 2nd search
Tagged: datagrid control
This topic contains 10 replies, has 2 voices, and was last updated by rharding98 11 years, 9 months ago.
-
Author
-
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,
RoyHi Roy,
Please, provide a sample which demonstrates the behavior that you describe and your application scenario.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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.
Thanks,
Royforgot to mention that i’m using chrome.
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 StoevjQWidgets Team
http://www.jqwidgets.com/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":""}]}
Hi Roy,
for loading nested JSON, you should use the datafield mapping. For examples see: jquery-grid-datasources.htm.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks 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":""}]
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“map”:”PremQualData>0>value” works 🙂
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 -
AuthorPosts
You must be logged in to reply to this topic.