Flexigrid
Flexigrid copied to clipboard
fixHeight doesn't work with ajax loading
It needs to call the fix height function after the data has been loaded, otherwise if the grid is empty, it's getting a height of 0px.
Also, if the fixHeight function is multiple times, it seems to switch between an auto height and a fixed height so half the time it isn't visible because of the overflow hidden.
Fix:
around line 99:
$(g.nDiv).height('auto');
var nd = parseInt($(g.nDiv).height());
if (nd >= newH) $(g.nDiv).height(newH).width(200);
Setting nDiv to height auto will set nd to the proper height. And making nd >= newH prevents it from going back to auto when they are the same after fixHeight is run a second time.
Then at the end of addData, round line 462 just add:
g.fixHeight();
so it's calculated for each change.
Interesting! Could it be why I was unable to display the grid as a partial view by calling from AJAX BeginForm? In other words, I had the grid working OK by itself, but I was unable to make it work from the AJAX form using partial view.
Please see my question on stackoverflow: http://stackoverflow.com/questions/12864199/how-to-use-flexigrid-as-a-partial-view-in-asp-net-mvc-application/12902546#12902546
Also, can I somehow contact you by e-mail? I've been struggling with some things for flexigrid and I am new to ASP.NET MVC development, so I definitely can use some help discussing the issues of flexigrid.
I posted a few of my questions in the FAQ and WiKi, but I am afraid I will not get answers.
@NaomiN, you might find the Google Group more appropriate - https://groups.google.com/forum/?fromgroups#!forum/flexigrid - because that's more oriented towards helping people work through individual issues whereas GitHub is more intended for resolving bugs & missing features in the code (such as @phazei's suggested changes.)
Eric,
I tried to ask a few questions there or participate in a discussion, but none of my questions / comments seem to appear. Do you know what needs to be done so I can post there?
Thanks again.
On Wed, Oct 17, 2012 at 12:00 AM, Eric Caron [email protected]:
@NaomiN https://github.com/NaomiN, you might find the Google Group more appropriate - https://groups.google.com/forum/?fromgroups#!forum/flexigrid- because that's more oriented towards helping people work through individual issues whereas GitHub is more intended for resolving bugs & missing features in the code (such as @phazei https://github.com/phazei's suggested changes.)
— Reply to this email directly or view it on GitHubhttps://github.com/paulopmx/Flexigrid/issues/37#issuecomment-9516090.
BTW, I tried asking questions in the forum, but I have an impression that none of the questions in that forum is actually answered now and users mostly ask questions. Say, I asked a couple and didn't get a single response.