In the next release can you include the string “Quick Search” and “Clear” from the search box feature as a property like “pagestat”?
I have to manually change this in every release
Thanks!
Sure, no problem, someone also suggested the post variables can be renamable as well, i’ll publish these two updates together.
Ok I found a major issue with my code. The grid breaks when I include an ajax function that I created. When I reorder the columns: Basically at the end of DragEnd I call my ajax function to store the new column order. Everything seems to look and work fine and my code writes out the sessions vars. If I reload the page it stays the way I left it.
However, if I use any of the grids functions like next page or change the rows per page or show/hide columns (basically anything the grid reloads the data but not the whole page) I get errors in the grid. They all are linked to this one action of mine. The biggest error is that the grid populates, but with the old column order. The headers are still correct, but the actual data is not. So my columns are not matching up. Once I reload, everything looks and operates as it should until I use one of the built in Flexi operations again.
This makes me think either the JS is taking care of managing its own column layout, independent of the XML, or my ajax command is somehow breaking the JS and not allowing it to update itself. Once I take out the Ajax it all works great.
I have also checked the XML after the columns have been reordered and it is correct, and I have “alerted” the column titles after the Grid populates, both are correct. My leaning towards something going haywire in this like of code, but not sure:
Ok the ordering works like this: at initial setup, the ordering of columns is base on the order of your colModel, and stored on the axis attribute. This must then be match by your backend. Now once the user reorders the columns and data is repopulated, the script looks at your old order and base the ordering through that.
Now to using your session vars, dynamically order the loading of the colModel using PHP base on your session vars, and on the backend dynamically order the columns base on your session vars as well.
hello,
i’m going to use flexigrid for my new programs.
however, i would like to dynamically parse the grid’s attributes to add new functions to the grids (printing, csv output, etc).
i’ve passed the all day trying to get the colModel definition but i didnt succeed.
i want to get the colModel definition, the sortname & sortorder attributes, in javascript, so that i can generate the sql command coresponding to the user choices once he had played with the grid appearance…
maybe someone here can help me ?
I actually don’t understand why you need the grid’s attributes to add new functions of (printing, csv output, etc).
But to get the attributes try this custom api method
$.fn.flexAttr = function(p) {
return this.each( function() { if (this.grid) return this.p; });
The flexgrid is shown, but the margin of each header didn’t match with the rows. If you access this page using IE7 more visual problems is shown. What have i done wrong?
Otherwise, how can i put a function to be executed when the user select one row?
Thank you!
Can’t access your link. But it could be a CSS conflict problem.
for single select, use the new option { singleSelect: true } when creating your flexigrid.
Apparently, showTableToggleBtn and showToggleBtn are distinct. Thus, there should be a showTableToggleButton default in parameters at top of flexigrid.js.
Further, to address the JS error mentioned when hover over header column name when showToggleBtn is false:
Node cannot be inserted at the specified point in the hierarchy” code: “3
[Break on this error] this.appendChild( a );
I fixed this, tho probably not optimally, by two edits in flexigrid.js:
Comment out/change:
// if (p.showToggleBtn) $(g.gDiv).prepend(g.nBtn); $(g.gDiv).prepend(g.nBtn);
Wrap an ‘if’ around hover processing:
if (p.showToggleBtn) // DLC patch { (g.nDiv).hide();$(g.nBtn).hide(); $(g.nBtn).css({'left':nl,top:g.hDiv.offsetTop}).show(); var ndw = parseInt($(g.nDiv).width()); $(g.nDiv).css({top:g.bDiv.offsetTop}); if ((nl+ndw)>$(g.gDiv).width()) (g.nDiv).css('left',onl-ndw+1); else $(g.nDiv).css('left',nl); if ($(this).hasClass('sorted')) $(g.nBtn).addClass('srtd'); else $(g.nBtn).removeClass('srtd'); }
Hi, I’m triing to use flexigrid, in the easy way… (without json or ajax), just a simple table (with all TRs and TDs tag), and in the flexigrid starter I had assigned buttons to test function, but when I try to retrieve a row reference (id), i get an empty string..
The script that I am using to get the list, is the same script that was posted early in this forum.
var items = $(’.trSelected’,grid);
var itemlist =’‘;
for(i=0;i<items.length;i++){
itemlist+= items.id.substr(3)+",";
}
alert(“Items selected: “+itemlist);
well.. what I am doing wrong ? how can I know what row was selected when test function is called ?
sorry about my poor english… is not my native language (I’m brazilian).. and thanks a lot
ah.. and congratulations about your amazing project…
Reference id comes from dynamic data which adds a id=“row”+id on every row. you can load this yourself on your static table by adding an id on your row in this format: ‘row’ + id.
I’ve been using flexigrid for a few different projects and I recently cut/pasted it into one i’m working on now but i’ve got some sort of glitch that i can’t locate. What is happening is the column headers and the data columns are displaying with different widths. Any ideas?
I just re-downloaded the CSS from the site and uploaded it as a double check, so it is the original css file, but that made no difference.
This can be a CSS conflict. try removing your own css and see if it makes a difference. if it does, then you know there is a conflict.
paulo:
Is it possible, by abdicating the “drag” and “resize” features, to be able to size the columns in %?
Thanks
Nope. for one thing the header and the main table is actually separate tables, that’s how you get the scrolling while having the column headers stay. for another reason, one of the main problems i’ve had (and I’m sure the guys that makes this kind of grid had) with tables is that browsers handle table sizes differently, specially %. So to fix this, i handle the size setting of the columns by placing a div within the cell, and I resize that div not the cell.
I have two text boxes (ids are #sdate and #edate) with search button(search) where these form controls are placed outside the flex grid container.
When i click on search button by entering values in two text boxes the value are passing correctly via URL but the problem comes when I modify values again and click on search button, the prior values which I have entered is taking up and I want the newly entered values should be passed in the URL string when I click on search button.