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
Thanks Niven, it works now.
Thanks Niven, this works perfectly.
Hi Glenn,
Yeah, I tried that as well... while it's true that it prevents you from interacting with the grid while the hourglass is displayed it doesn't quite cover the solution for spamming edits, you can still make the grid crash.
Is there no way to disable the grid while refreshing?
Regards
For some reason setHeight onAfterInitialize and setHeight OnAfterResponseProcess behave differently (they don't resize the grid to the same height). My solution for this was way overkill but worked, used jQuery selectors to get the rowcount and the height of the elements inside the grid.
This solution doesn't work for grids with paging, once I go to a different page the grid will resize (incorrectly) again and I'm sure that some operations requiring a flypostback (sorting, refreshing) will resize the grid as well.
Try adding to the grid:
<LayoutSettings PagingMode="ClassicPaging" PagingSize="10"> <ClientSideEvents OnAfterInitialize="wgScroll_OnAfterInitialize" /> </LayoutSettings>
And on the DS:
protected void InitScroll(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { e.DataSource = new List<KeyValuePair<string, string>>() { new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test"), new KeyValuePair<string, string>("Test", "Test") }; }
Take a look at the grid behaviour on initial load and after paging. Is the ONLY solution giving it a fixed height?
Thanks for the workaround, Handy.
Hi Yudi,
Thanks for you reply, it's still not what I need (and I see autoheight still has issues with the XHTML Doctype so that's not an option).
I'm adding entries to my DataSource and refreshing the grid via a javascript Refresh()... problem is, your approach resizes the container, it's not really refitting the content in the grid to ocupy the new given height. Please see the attachments to see whatI'm talking about.... in ResizeGrid2 you can see the grid grows past the original position of the status bar but it displays as an empty canvas.
I went with another solution, instead of having a javascript function do the refresh, have it fire a customrequest.... then catch that onInitializePostback and there resize-refresh (with this effectively using two FlyPostBacks to refresh), but the same thing happens:
protected void ResizeAndRefresh(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { if (e.Action == ISNet.WebUI.WebGrid.PostBackAction.Custom) { webGrid.ClientAction.InvokeScript( string.Format("Resize({0});", GetNewGridHeight()) ); webGrid.ClientAction.Refresh(); } }
Is there any way to resize (and re-fit) the grid?
Edit: Ok, so much for the attach file... It's not working.
Hi,
Do you have a sample on this? I actually tried GetCachedDataSource() before. Even when I modify my IntiializeDataSource event to this I doesn't work.
protected void Initas(object sender, DataSourceEventArgs e)
{ var cachedDS = WebGrid1.GetCachedDataSource(); var cached = WebGrid1.IsDataCached(); if (!cached) e.DataSource = CommonService.GetCountries(); else e.DataSource = cachedDS; }
IsDataCached() keeps returning false. I have on my AllowAutoDataCaching="true" grid tag.
Thanks
Hi, we have this same problem. Do you really have no estimate on how much time this fix will take?
Hi Julia,
I'll look into the WebDialogBox option, but just for the record... do you fully support the XHTML doctype? Because i've had some issues with the grid sliding when a column resizes or the editors showing up slightly larger that the cell they're trying to modify.
See these threads:
thread
PS: We're using WebGrid 7 (2009 R1)
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