iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi, We are using Webgrid 10 with Ajaxtoolkit Accordion. The height of webgrid is not working properly. I created a sample page using Northwind database with seven section pane using different number of rows in table. I also tried 3 different ways to tackle grid height issue. Please, see that what need to do to fix the height issue. We used IE browser 10 , 11 normal and comp mode to check but height issue was present in all versions.Sample contains aspx, aspx.cs and sample css file.regardsSachin
Hello,
I've taken a look at your sample, it just need a little adjustment to make the height working properly. Just remove AutoHeight property that you set on server side, then using your 1st approach, change DynamicGrid Height value the same as your GridContainerPanel Height which is Unit.Pixel(450);
Now all your WebGrid height should work the way it should be.
*AutoHeight property specifies whether WebGrid will calculate its height automatically based on available page’s height.
Hope this helps.
Best Regards,Erwin Sanders
Hi Erwin, As per your suggestion I removed AutoHeight property from Dynamic Grid and changed DynamicGrid Height same as panel ie, 450 px. Now issues are nearly same as earlierFirst Grid height is proper. But third grid height is not proper; although it has 12 rows but its height is somehow adjusted like second grid which has 1 row only. Rest of grid's height are also not proper. I am attaching modified sample and screenshot of pages . regardsSachin
Hi Sachin,
Thank you for the screenshots. Actually this issue can be resolved by calling wgDoresize(true, true) method after the accordion is clicked, however I think there's no way for the ajaxToolkit to do that (correct me if i'm wrong). Since you bought our WebUI Studio, have you considered using our WebAccordion instead?
Anyway, if you still insist on using the ajaxToolKit, add the following code to the Page_Load event.
ClientScript.RegisterStartupScript(this.GetType(), "init", "" + "window.addEventListener(\"load\", function(){ " + "var pane = document.querySelectorAll(\".accordionHeader\");" + "for (var i = 0; i < pane.length; i++)" + "{" + "pane[i].addEventListener(\"click\", function(){" + "setTimeout(function(){wgDoResize(true, true);},300); }, false); " + "} " + "}, false);" + "", true);
In my opinion, this isn't exactly the best practice as it forced an additional event to the accordion, but it does the job.
Hello Sachin,
Here I made a sample for you in which you can add a new accordion item. If you want to add the grid inside the accordion item, I suggest that you use an IFrame for such case. Call the webform with a QueryString to show the desired grid. Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname