Giter Club home page Giter Club logo

flexigrid's People

Watchers

 avatar

flexigrid's Issues

Some colModel additional parameters

Example :
   ...
   colModel:[{
       display:'Header Caption',
       name:'colname',
       width:30,
       sortable:false,
       align:'left', // text align for row cells

// new paramaters
       undragable:true, // disables column drag-drop set true or false
       unresizeable : true, // disables column resizing, true or false
       headerAlign:'right' // text align for header cell, default 'center'
   },
   ... 

*) headerAlign 
=============================================
1.
find 
    var cm = p.colModel[i], th = document.createElement('th');
then put this code under it
    th.align = cm.headerAlign ? cm.headerAlign : 'center'; 
code
    var cm = p.colModel[i], th = document.createElement('th');
    th.align = cm.headerAlign ? cm.headerAlign : 'center';
2.
find 
    if (cm.align) {
    th.align = cm.align;
    }
replace it with
    if (cm.align) {
    th.calign = cm.calign; // <-- patched here
    }
3.
find 
   //add cell
   $('thead tr:first th',g.hDiv).each (
    function () {
    var td = document.createElement('td'), 
            idx = $(this).attr('axis').substr(3);
            td.align = this.align;
            td.innerHTML = row.cell[idx];
        $(tr).append(td);
        td = null
        }
   );
replace with
   //add cell
   $('thead tr:first th',g.hDiv).each (
    function () {
    var td = document.createElement('td'), 
            idx = $(this).attr('axis').substr(3);
            td.align = this.calign; // <-- patched here
            td.innerHTML = row.cell[idx];
        $(tr).append(td);
        td = null
    }
   );
4. 
find
    $('thead tr:first th',g.hDiv).each(function () {        
    var td = document.createElement('td'), 
            idx = $(this).attr('axis').substr(3);
    td.align = this.align;
    td.innerHTML = $("cell:eq("+ idx +")",robj).text();
    $(tr).append(td);
    td = null
    });
replace with
    $('thead tr:first th',g.hDiv).each(function () {        
    var td = document.createElement('td'), 
            idx = $(this).attr('axis').substr(3);
    td.align = this.calign; // <-- patched here
    td.innerHTML = $("cell:eq("+ idx +")",robj).text();
    $(tr).append(td);
    td = null
    });

5. 
find
    $(tdDiv).css({textAlign:pth.align,width:$('div:first',pth)[0].style.width});

replace with
    $(tdDiv).css({textAlign:pth.calign,width: $('div:first',pth)[0].style.width});

6. done

-------------------------
*) undragable
============================
1.
find 
    var cm = p.colModel[i], th = document.createElement('th');
then put this code under it
    th.undrag = cm.undragable ? true : false;
code
    var cm = p.colModel[i], th = document.createElement('th');
    th.undrag = cm.undragable ? true : false;

2.
find

thdiv.innerHTML = this.innerHTML;
$(this).empty().append(thdiv).removeAttr('width')
.mousedown(function(e){
    g.dragStart('colMove',e,this)
}).hover(function(){

replace with

thdiv.innerHTML = this.innerHTML;
var me = this; // <-- patched here
if(me.undrag) me.style.cursor = 'default'; // <-- patched here
$(this).empty().append(thdiv).removeAttr('width')
.mousedown(function(e){                     if(!me.undrag) // <-- patched here
    g.dragStart('colMove',e,this)
}).hover(function(){
   if(me.undrag) { // <-- patched here
    $(g.nDiv).hide(); // <-- patched here
    $(g.nBtn).hide(); // <-- patched here
    return // <-- patched here
   }; // <-- patched here
3. done

Original issue reported on code.google.com by [email protected] on 14 Apr 2011 at 10:43

Create a more flexible json type.

Hi folks, I just started to try out your lib, it's really awesome but I would 
sugest,I'm going to try implement it this week, when I do it I will send to 
you, any way, here my idea: 

create a new dataType, something like 'json-array' in order to process an array 
os rows like: 
[
   {fiedl1: 'value for field1', field2: 100, fieldN: 'value N'},
   {fiedl1: 'value for field1', field2: 100, fieldN: 'value N'}
];

this way is more simple to whom use java it's json libraries, so I would be 
able to return a List of Model Objects from my Servlets directly to the page 
just by parsing it to json.

ex: a list of clientes with name and age would return
[
  { cliName: 'my name', cliAge: 23 },
];

you can get the size using the size of the array.

What do you think about it ?

Any way I'm going to implement it and send to you, thanks in advice for your 
attention, sorry by my english - not my mother tong.

Original issue reported on code.google.com by [email protected] on 15 Jun 2011 at 3:15

Button's

What steps will reproduce the problem?

1. Buttons can i have on bottom of the grid
   ADD , Delete, etc..

2. Can I attached the Checkbox on grid

What version of the product are you using? On what operating system?
XP -SP2 with IIS+PHP5.2.6

regards
Feroz


Original issue reported on code.google.com by info%[email protected] on 13 Sep 2008 at 6:32

Filter on more than one column

What version of the product are you using? On what operating system?
Flexigrid 1.1 on windows XP, IE7

Please provide any additional information below.

I want to find the data with multi filters like MS Excel.


Original issue reported on code.google.com by [email protected] on 24 May 2011 at 7:41

Problems with Prototype + "ncol.hide" + "pth.hide" + "cm.hide" + "th.hide"

Steps to reproduce the problem :

1. Add Prototype + jQuery + jQueryUI :
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
    <script type="text/javascript">
    //<![CDATA[
      jQuery.noConflict();
    //]]>
    </script>
2. Use "Flexigrid" as usual.
3. All the columns will be "hiden" due to "Prototype" use the ".hide" method 
already.

The expected output is the "Flexgrid" without columns nor rows.

The "Flexgrid" version is the last one on Windows XP and all the mayor browsers.

I am attaching a file whith a test of this problem.

Thanks

Original issue reported on code.google.com by [email protected] on 20 Jan 2011 at 3:56

Attachments:

CSS improvement

Hi there,
I'm just starting using flexigrid and I love it simplicity and extendability. 
Great job!
As I'm using it to display multiple things (such as links), I quickly viewed a 
small problem in the CSS under firefox: columns of the grid (td) are 2 pixels 
larger than the title (th). I don't know exacly why, but this fix the problem 
and does not affects the look in Chrome and IE:
just add the following lines in the CSS:
.flexigrid div.hDiv th, .flexigrid  div.bDiv td  /* common cell properties*/ { 
...
    padding-left: 0;
    padding-right: 0;
}
Hope it could help :)
RvK.

Original issue reported on code.google.com by [email protected] on 18 Jan 2011 at 8:13

Integrate jQuery UI CSS Framework

To make it easier the theme Flexigrid, adopt the jQuery UI CSS Framework 
(http://jqueryui.com/docs/Theming/API).

Original issue reported on code.google.com by eric.caron on 3 May 2011 at 3:09

Fix/hack for accumulation of dynamic data

Hey all,
Had a specific use case for flexigrid... I was adding data to the table, but 
this data was randomly generated (and thus not available all at once for easy 
ajax loading). 

So I just did a quick mod to allow a parameter (data.keepold, boolean) to be 
passed that, if set, stops re-creation of the table and keeps all old data. 
This allows gradual accumulation of data through client-side javascript.

Hope this proves useful to someone.
Cheers!

Original issue reported on code.google.com by [email protected] on 26 Jun 2011 at 3:47

Attachments:

Why not support the "json" data type?

What steps will reproduce the problem?
1.The demo tell us that it is "json", but it actullay is xml!!
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Jun 2011 at 1:54

left attr is NaNpx

What steps will reproduce the problem?
use ie7/8

1. use serveral jquery tab(jquery ui.tabs);
2. every tab has a table;
3. switch one tab to another,and move mouse to header row

What is the expected output? What do you see instead?
js error oucur.left attribute of an element is NaNpx.

What version of the product are you using? On what operating system?
jQuery 1.0b3     Jul 2008    120 KB      44839 
jquery 1.3.2

Please provide any additional information below.

the following may deal this.
cdpos = cdpos + cdleft + cdpad;
if(isNaN(cdpos)){
  cdpos = 0
}



Original issue reported on code.google.com by [email protected] on 9 Jan 2010 at 6:53

Change in jQuery 1.6 attr behaviour causes errors with flexigrid

What steps will reproduce the problem?
1. Use jQuery 1.6
2. Add example 3 (the one with dynamic data) to a page
3. Run

What is the expected output? What do you see instead?
I expected to see a table similar to the example. Instead there is nothing. 
Firebug showed the following error:

elem.getAttribute is not a function
[Abort on this error] ret = elem.getAttribute( name );
jquery-1.6.js (regel 2217)

What version of the product are you using? On what operating system?
Chrome/Firefox. Windows 7

Please provide any additional information below.
It seems it has to do with a change in jQuery 1.6. See: 
http://stackoverflow.com/questions/5933895/jquery-attr-behaviour-in-version-1-6

Original issue reported on code.google.com by [email protected] on 9 May 2011 at 9:10

Columns not loaded from column defninition

What steps will reproduce the problem?
1. Create a Json Object with multiple fields
2. Instantiate the flexigrid with matching field names in a different order 
than the Json is returned.
3. When the flexigrid is shown, data will be in the incorrect columns.

What is the expected output? What do you see instead?
The table data should be in the order of the column definitions.

What version of the product are you using? On what operating system?
1.1.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 May 2011 at 5:45

browser Opera display text "null" in cells with null-data

typical code:

$grid = array();
$grid['rp'   ] =
$grid['page' ] =
$grid['query'] =
$grid['qtype'] =
$grid['sortname' ] =
$grid['sortorder'] =
$grid['total'] =
$grid['rows' ] = array();

foreach( $res as $arr ) {//$res ~ select query result
  $grid['rows'][] = array(
    'id'  => 'grid01'. $arr['id'],
    'cell'=> array( $arr['name'],$arr['desc'],$arr['status'] )
  );
}
return json_encode( $grid ); 


Server-side PHP script load data from DB. DB-result may contain NULL-values. 
This values come to grid and in different browsers displayed differently.
In IE, Firefox, Chrome NULL-values don't displayed. In Opera I see text 'null'.

My patch: in flexigrid addData 
change lines (2 times)
    td.innerHTML = row.cell[idx];

with line
    td.innerHTML = ( row.cell[idx] != null ) ? row.cell[idx] : '';

Original issue reported on code.google.com by [email protected] on 7 Mar 2011 at 10:55

No method to get data for a cell

There is no method to get data for a specific cell. I am building a sample 
application where i need to get the data for some columns(using column name 
specified in colModel) of the last row in the grid.


Original issue reported on code.google.com by [email protected] on 11 Sep 2008 at 1:02

CSS not getting applied for particular row on updating the value

What steps will reproduce the problem?
1. Load Flexigrid having 2 columns and 3 rows
2. After loading, update the value in column2 row 3.
Example - Change the value of column2 row3 from "x" to "y"
3. CSS gets disturbed. The value gets pushed from the center to the left top.

What is the expected output? What do you see instead?
The value should be in the center of the cell instead it is seen in the top 
left corner of the cell.

What version of the product are you using? On what operating system?
OS - Windows XP

Please provide any additional information below.
I am not performing refresh on update of the grid.

Original issue reported on code.google.com by [email protected] on 12 May 2011 at 6:36

pager bug in multiple instances

http://groups.google.com/group/flexigrid/browse_thread/thread/5f83d37c6b881193

Fix:
replace line
    if (p.usepager) g.pDiv = document.createElement('div');
with this
    g.pDiv = document.createElement('div');
    if (!p.usepager) g.pDiv.style.display = 'none';


We need in pDiv container, because used it many times.

PS. I divide my patch by issues.

Original issue reported on code.google.com by [email protected] on 7 Mar 2011 at 9:58

Attribute 'abbr' assigned to cells only if the column is sortable.


How to get data from a table? For example, data of the selected row.
This question has already been asked: 
http://code.google.com/p/flexigrid/issues/detail?id=4&can=1

The difficulty lies in linking: column_name - data. That is why the order of 
columns can be changed, and we can not use index in the array of row cells.

I suggested to use the attribute 'abbr' for table cells. And this patch is 
included in version 1.1.

But. Attribute 'abbr' assigned to cells only if the column is sortable.
I found a place in the code where it is defined. Lines ~690:


if (p.colModel) { //create model if any
    thead = document.createElement('thead');
    var tr = document.createElement('tr');
    for (var i = 0; i < p.colModel.length; i++) {
        var cm = p.colModel[i];
        var th = document.createElement('th');
        th.innerHTML = cm.display;
/*!*/       if (cm.name && cm.sortable) {
            $(th).attr('abbr', cm.name);
        }
        $(th).attr('axis', 'col' + i);
        if (cm.align) {
            th.align = cm.align;
        }
        if (cm.width) {
            $(th).attr('width', cm.width);
        }
        if ($(cm).attr('hide')) {
            th.hidden = true;
        }
        if (cm.process) {
            th.process = cm.process;
        }
        $(tr).append(th);
    }
    $(thead).append(tr);
    $(t).prepend(thead);
} // end if p.colmodel


But the simple removal of the condition leads to the column becomes sortable, 
regardless of the definition in colmodel.

Thus, working with the attribute 'abbr' is only possible in sortable columns. 
Or we need to revise the code.

Original issue reported on code.google.com by [email protected] on 16 Jun 2011 at 8:07

All columns hidden (hide function / attribute name conflict)

version: 1.0b3 [+ jquery 1.2.3]

On my first try to use FlexiGrid (I only transform existing tables - no
special arguments/data) all the columns where gone after the execution of
flexigrid().

On debugging I found the following line to be responsible for that:

if (this.hide) $(this).hide();

Firebug was showing the jquery hide FUNCTION as value of "this.hide" [not a
boolean] - Javascript then evaluates that as TRUE and hides every column.

I fixed it by replacing every occurrence of .hide (the boolean one) with
.hidden so that the function name does not match the attribute.

so now there are lines like: 

if (this.hidden) $(this).hide();
if (pth.hidden) $(this).hide();

I don't know how exactly to reproduce the bug but maybe you can find out /
guess where that conflict is coming from.

Original issue reported on code.google.com by [email protected] on 28 Jul 2008 at 9:53

  • Merged into: #15

jQuery 1.3.2 breaks Flexigrid in Chrome 1.0.154.53 & FF3.0.8

What steps will reproduce the problem?
1. Update to jQuery 1.3.2
2. Open page in Chrome 1.0.154.53 or FF3.0.8

What is the expected output? What do you see instead?

Chrome initial ajax data doesn't load (paging will correct issue)
FF has ui issues with columns size/short

What version of the product are you using? On what operating system?

Flexigrid for jQuery 1.0b3 & jQuery 1.3.2 (Windows XP)

Please provide any additional information below.

raziel057 has found the jQuery selector bug(?) and provided a solution.

Replace line 1215 in flexigrid.js with the following.(Break up selector)
$('input[name=q]',g.sDiv).keydown(function(e){if(e.keyCode==13) 
g.doSearch()}); 
$('select[name=qtype]',g.sDiv).keydown(function(e){if(e.keyCode==13) 
g.doSearch()});

http://www.nabble.com/jQuery-1.3.2:-error-in-Safari-when-running-a-multi-
selector-query-in--the-context-of-an-element-not-yet-added-to-DOM-
td22210425s27240.html#a22993712  



Original issue reported on code.google.com by [email protected] on 10 Apr 2009 at 8:33

Issue with the dropdown list.

Hi,
I am facing a strange problem, there are some dropdownlist in my web page, when 
the mouse move over the item in the grid, the dropdownlist are disappeared when 
I using IE7 to open it.

Please contact me when you get any process.
my email: [email protected]

Thanks
Peter


Original issue reported on code.google.com by [email protected] on 28 Dec 2010 at 8:40

thailand

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 16 Jun 2011 at 11:03

Need one help

What is the expected output? What do you see instead?
i expected output particular column sum of total appear in the bottom side?????

What version of the product are you using? On what operating system?
i using PHP 5.3.1 , MY SQL 5.1.4 , Windows Operating System



Original issue reported on code.google.com by [email protected] on 31 May 2011 at 10:12

data not rendering in table

My json string is 

{ "sourceAsset" : "test" , "host" : "localhost" , "port" : 8080 , "statusCode" 
: "ERROR" , "data" : 0.0 , "dataType" : "NA" , "timestamp" : 1298986463617},{ 
"sourceAsset" : "drew" , "host" : "localhost" , "port" : 8080 , "statusCode" : 
"UNKNOWN" , "data" : 0.0 , "dataType" : "NA" , "timestamp" : 1299089866673},{ 
"sourceAsset" : "drew" , "host" : "localhost" , "port" : 8080 , "statusCode" : 
"UNKNOWN" , "data" : 0.0 , "dataType" : "NA" , "timestamp" : 1299089935972},{ 
"sourceAsset" : "sadfasdf" , "host" : "localhost" , "port" : 8080 , 
"statusCode" : "UNKNOWN" , "data" : 0.0 , "dataType" : "NA" , "timestamp" : 
1299165258137} 

and my html is 

<%@ page session="false"%>
<jsp:useBean id="pageSize" scope="request" class="java.lang.String" />
<html>
<head>
<title>AMAC Metrics &amp; Events</title>
<!--<link type="text/css" href="static/styles/main.css" rel="stylesheet">-->
<link type="text/css" href="static/styles/dark-hive/jquery-ui-1.8.4.custom.css" 
rel="stylesheet" />
<link type="text/css" href="static/styles/flexigrid/flexigrid.css" 
rel="stylesheet" />
<script type="text/javascript" 
src="static/scripts/jquery-1.4.2.min.js"></script>
<script type="text/javascript" 
src="static/scripts/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" src="static/scripts/grid.locale-en.js"></script>
<script type="text/javascript" src="static/scripts/flexigrid.js"></script>
</head>
<body>
<table id="flex1" style="display:none"></table>
<br />
<script type="text/javascript">
            $("#flex1").flexigrid
            (
            {
            url: 'event/getList',
            dataType: 'json',
            colModel : [
                {display: 'sourceAsset', name : 'sourceAsset', width : 150, sortable : true, align: 'left'},
                {display: 'host', name : 'host', width : 100, sortable : true, align: 'left'},
                {display: 'Port', name : 'port', width : 100, sortable : true, align: 'left'},
                {display: 'statusCode', name : 'statusCode', width : 150, sortable : true, align: 'left'},
                {display: 'data', name : 'data', width : 100, sortable : true, align: 'left'},
                {display: 'dataType', name : 'dataType', width : 100, sortable : true, align: 'left'},
                {display: 'timestamp', name : 'timestamp', width : 200, sortable : true, align: 'right'}
                ],
            searchitems : [
                {display: 'sourceAsset', name : 'sourceAsset'},
                {display: 'statusCode', name : 'statusCode', isdefault: true}
                ],
            sortname: "sourceAsset",
            sortorder: "asc",
            usepager: true,
            title: 'xyz',
            useRp: true,
            rp: 15,
            showTableToggleBtn: true,
            width: 1000,
            height: 200
            }
            );
</script>
</body>
</html>


Does anyone know what I am doing wrong?

Original issue reported on code.google.com by [email protected] on 8 Mar 2011 at 8:20

flexigrid asp.net patch

hey guys,

I have developed a commercial product for ASP.NET using the jQuery flexigrid 
plugin.

Since I modified the source code of the flexigrid, I tought I'd share some of 
my changes.

Have a look at the attached patch, and if you decide to include some of my 
changes, feel free.

Also, if you have any questions related to the changes, feel free to ask.

Thanks,
Flexigrid ASP.NET team

Original issue reported on code.google.com by [email protected] on 3 Feb 2011 at 7:59

Attachments:

On create table with no width columns in IE

What steps will reproduce the problem?
1. When you have an column with no width size like Id
e.g.:
colModel : [
        {
            display: 'Id',
            name : 'id',
            sortable : true,
            align: 'center'
        }, ...
2. On create table in IE 8 have error
3.

What is the expected output? What do you see instead?

Message: Invalid argument.
Line: 965
Char: 8
Code: 0
Id URI: http://localhost/adder7/branches/adder/js/flexigrid.js

What version of the product are you using? On what operating system?

Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 
2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Sygnatura czasowa: Tue, 5 Apr 2011 07:36:57 UTC

Please provide any additional information below.

Solution:

Replace line 965:
$(thdiv).css({textAlign:this.align, width: this.width + 'px'});

With:
if(this.width > 0)                                                   
$(thdiv).css({textAlign:this.align, width: this.width + 'px'});



Original issue reported on code.google.com by [email protected] on 5 Apr 2011 at 7:44

variables in global scope

With Firebug I see some variables in global scope. It may be a problem, 
especially the use of generic names.

I suggest to clean the code. I attach my patch and result flexigrid.
This patch includes bug fixes and some improvements specified in Issues:
http://code.google.com/p/flexigrid/issues/detail?id=4#c4
http://code.google.com/p/flexigrid/issues/detail?id=19
http://code.google.com/p/flexigrid/issues/detail?id=20
http://code.google.com/p/flexigrid/issues/detail?id=21

Original issue reported on code.google.com by [email protected] on 7 Mar 2011 at 11:13

Attachments:

Row filtering

Hello fellow Developers, 

Please help me with this issue. I am developing an ASP.NET application. I am 
using Flexigrid-1.1 and found it very useful. How do I add row filtering to all 
the columns. Currently, the flexigrid has column filtering feature, which is 
not very useful feature to me. Any help in this regard is highly appreciated!

Thanks
Vinny


Original issue reported on code.google.com by [email protected] on 29 Jun 2011 at 7:45

  • Merged into: #38

Column resizing fails if the cell contains a div or a table

What steps will reproduce the problem?
1. create a 3 column table with a div in cell one
<table id="x">
    <thead>
        <tr>
            <th width="100px">a</td> </th>
            <th width="100px">b</td> </th>
            <th width="100px">c</td> </th>
        </tr>
    </thead>
    <tr>
        <td><div>1</div></td>
        <td>2</td>
        <td>3</td>
    </tr>
</table>
2. resize column 
3. width is changed on the div in the table cell

What is the expected output? What do you see instead?

header and cell dividers should have the same width when resized
width is changed on the div in the table cell
column sizing misaligned

What version of the product are you using? On what operating system?
1.0b3 2008-07-14

Original issue reported on code.google.com by [email protected] on 18 Jul 2008 at 10:43

Preset in search bar

I use a custom site-wide search bar that leads to my page with a flexigrid 
table. When doing so, i set p.query dynamically in order to get filtered 
results. However, the flexigrid's search bar remains empty. It would be nice if 
it was pre-filled with p.query. 

I've attached a diff file, but this is trivial to fix, simply add a 
value='p.query' on line 1218... from : 

$(g.sDiv).append("<div class='sDiv2'>"+p.findtext+" <input type='text' 
size='30' name='q' class='qsbox' /> <select name='qtype'>"+sopt+"</select> 
<!--input type='button' value='Clear' /--></div>");

to

$(g.sDiv).append("<div class='sDiv2'>"+p.findtext+" <input type='text' value='" 
+ p.query +"' size='30' name='q' class='qsbox' /> <select 
name='qtype'>"+sopt+"</select> <!--input type='button' value='Clear' 
/--></div>");

I can't find my version, it's written nowhere... but it was downloaded 2 days 
ago:

Thanks,
Jni

Original issue reported on code.google.com by [email protected] on 16 Mar 2011 at 6:53

Attachments:

Event "onSuccess" does not occur if (total == 0). But this is the proper empty set.

When grid load dataset, if (total==0) we lost call "onSuccess".
I propose add call "onSuccess" in special block of code for (total==0). Because 
this is the correct empty set, as stated here:
http://groups.google.com/group/flexigrid/msg/fa225a8a47fa8ed1

addData: function (data) { //parse data

if (p.total==0)
{
    $('tr, a, td, div',t).unbind();
    $(t).empty();
    p.pages = 1;
    p.page = 1;
    this.buildpager();
    $('.pPageStat',this.pDiv).html(p.nomsg);
/*+*/   if (p.onSuccess) p.onSuccess();
    return false;
}

PS. I attach my full patch and result flexigrid.
This patch includes bug fixes and some improvements specified in Issues:
http://code.google.com/p/flexigrid/issues/detail?id=4#c4
http://code.google.com/p/flexigrid/issues/detail?id=19
http://code.google.com/p/flexigrid/issues/detail?id=20
http://code.google.com/p/flexigrid/issues/detail?id=21
http://code.google.com/p/flexigrid/issues/detail?id=22

Original issue reported on code.google.com by [email protected] on 25 Mar 2011 at 10:48

Attachments:

Problem with tables in IE8

Hi,

I had a problem only with IE8 when I tried apply flexgrid in a table :

$(".tableequipamentos").flexigrid({
                  title: 'Cadastro de Equipamentos',
                  width: '300',
                  height: '100',
                  resizable: false,
                  singleSelect:true,
                  showToggleBtn: false, 
                  colModel : [

                              {display: 'Equipamento', name : 'equipamento', width : 80, sortable : false, align: 'left'},
                              {display: 'Localidade', name : 'localidade', width : 80, sortable : false, align: 'left'},
                              {display: 'Editar', name : 'editar', width : 35, sortable : false, align: 'center'},
                              {display: 'Excluir', name : 'excluir', width : 35, sortable : false, align: 'center'}

                            ],

                  buttons : [
                                {name: 'Adicionar', bclass: 'add', onpress : AdicionaEquipamento},
                                ]

              });
              ///Fim Grid de Equipamentos



The solution was (line 753):

From : if (!btn.separator) {

To : if ((btn) && (!btn.separator)) {

Regards

Original issue reported on code.google.com by [email protected] on 1 Jun 2011 at 4:18

Flexibility fix: add third parameter to cell process function pointing to flexgrid container

Hello,

Bit from my column mode:

colModel : [
  {
    display: '',
    name : 'select',
    process: flexgrid_checkbox_process,
    width : 25,
    sortable : false,
    align: 'left'
  },
  {
    display: 'Name',
    name : 'name',
    width : 150,
    sortable : true,
    align: 'left'
  },
  ...
]

The process function receives two parameters (flexgrid.js, line 700:)
----
    if (pth.process) pth.process(tdDiv,pid);
----
tdDiv at that moment is not attached to document tree so there's no easy way to 
find the owner of this div.

What I'd suggest is add third parameter to that function call that points to 
flexgrid containerd div, ie:
----
    if (pth.process) pth.process(tdDiv,pid,g.gDiv);
----
Benefits? I can have multiple flexgrids in the same page + do things like 
saving state of checkboxes across different pages since now I know which 
flexgrid owns the cell being processed.

Original issue reported on code.google.com by [email protected] on 24 Jan 2011 at 12:40

Images for navigation of pages not getting disabled on moving next / previous

What steps will reproduce the problem?
1. I have a flexigrid with 20 rows in which the rp count is 15. The flexigrid 
displays Page 1 of 2 of 1 to 15 items.
2. On navigation, it displays Page 2 of 2 of 16 - 20 items.
3. But, even after clicking the last page ( 2 Of 2), the next image is not 
getting disabled. How to handle this?

What is the expected output? What do you see instead?
Either in the last page or in the first page, the next / previous images should 
get disabled.

What version of the product are you using? On what operating system?
Windows XP. Firefox 3.6 version.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 May 2011 at 6:44

grid freeze on unexpected server answer

In security reason I check page query for user permissions.
If user haven't rights, server answer contains some specific commands to page 
and no grid data.
But flexigrid wait grid structure long time.
I propose to use default structure in answer processing.

addData: function (data) { //parse data

/*!*/  data = $.extend({rows:[], page:0, total:0}, data);


Original issue reported on code.google.com by [email protected] on 7 Mar 2011 at 10:18

Send grid object to onSuccess method

User defined method onSuccess() could be given the grid object as a parameter.

In my case, this allows me to work on grid content after data is loaded

line 529
--  if (p.onSuccess) p.onSuccess();
++  if (p.onSuccess) p.onSuccess(this);

Thanks for advance

Original issue reported on code.google.com by [email protected] on 16 Apr 2009 at 10:58

Hide not working in Column definition

What steps will reproduce the problem?
1. View the demo on the flexigrid website. ISO3 should be hidden yet it shows. 

What is the expected output? What do you see instead?
I assume that the column should be hidden upon the rendering of the table.


What version of the product are you using? On what operating system?
v1.1, Windows XP, ASP.Net 4.0, Jquery 1.4.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Apr 2011 at 12:17

Capturing more user events from Flexigrid in PHP

Feature/Enhancement Request:
I am using Flexigrid in numerous 'desktop PC application replacements' where 
the users of my PHP webapps are using the software full-time.  I've created a 
system where I can store the user's sessionID against predetermine display 
preferences for Flexigrid, so that when a user returns to a webpage that 
displays Flexigrid, it will revert the display to what they were seeing the 
last time they viewed that page.  This applies not only to the data in range in 
the grid, but also the display properties of the grid.

I am able to get back to PHP many properties of the grid as users change them, 
however there are many properties that are not reported back, meaning that each 
time a user goes to a page, they are expected to have to manually adjust the 
grid to their likings.  As a result, I get constant complaints from users that 
they have to do this, which is reducing the user experience in my applications.

The specific properties that I need to get back are:

1.  Adjustments to column width - I display the Flexigrid columns with a 
default width, and I can give the user the ability to alter that.  But if they 
adjust it while viewing the grid, I don't get any callback to PHP that the 
column size has been adjusted.  I do get back if the sorted column order 
changes, which I can capture and accommodate, but not resizing of column widths.

2.  Adjustments to Flexigrid area (vertical and horizontal resizing).  Some 
users on different devices (ie. Tablets, PC desktops, etc.) will resize the 
Flexigrid area, and I need to capture those resize events so I can store their 
preference against their session data for redisplay again on subsequent calls 
back to the webpage.

3.  Column Ordering - If a user wishes to change the column positions, I don't 
get back any information that they have done this.

-- There may be other user events that can be captured and returned back to 
PHP, but these are the most common requests I get.  I do successfully get back 
things like no of rows displayed, sorted column, sort order (ascending or 
descending), current page user is displaying, etc.  This works great and I 
capture and store that where appropriate.  But its not the full compliment of 
user events that I need to get back.

Thanks
Myles


Original issue reported on code.google.com by myleswakeham0 on 29 Dec 2010 at 4:40

attributes cellPadding, cellSpacing -> use lowercase

Please change the attribute names in the following code to lowercase

 $(t)
  .show() //show if hidden
  .attr({cellPadding: 0, cellSpacing: 0, border: 0})  //remove padding and
spacing
  .removeAttr('width') //remove width properties
  ;


=> .attr({cellpadding: 0, cellspacing: 0, border:0})

Original issue reported on code.google.com by [email protected] on 21 Jul 2008 at 4:12

wiki: particular technique "dynamic columns", "parameter to server"

I see that many people are interested in two topics: "dynamic columns" and 
"parameter to server".

Some forum links:
http://groups.google.com/group/flexigrid/browse_thread/thread/c982b3538e4e90b6/a
fac3041a5e350e5?lnk=gst&q=colmodel#afac3041a5e350e5
http://groups.google.com/group/flexigrid/browse_thread/thread/c7038751b545e84c/c
80802fd4be01b68?lnk=gst&q=colmodel#c80802fd4be01b68
http://groups.google.com/group/flexigrid/browse_thread/thread/786c7363d3300010/1
08e2d226dbd32fc?lnk=gst&q=colmodel#108e2d226dbd32fc
http://groups.google.com/group/flexigrid/browse_thread/thread/77b75b5968abfa4/70
52ae3be8b98308?lnk=gst&q=colmodel#7052ae3be8b98308
http://groups.google.com/group/flexigrid/browse_thread/thread/f9a8760ddfa9f49a/8
68c1935893c3a0d?lnk=gst&q=flexOptions#868c1935893c3a0d
http://groups.google.com/group/flexigrid/browse_thread/thread/4e673e6195c6121a/0
f996632e63eb43c?lnk=gst&q=flexOptions#0f996632e63eb43c

And one from latest:
http://groups.google.com/group/flexigrid/browse_thread/thread/e066791f68f48041

I suggest to add to the wiki this example:
http://groups.google.com/group/flexigrid/browse_thread/thread/e066791f68f48041

We see here both "dynamic columns" and "transmission parameter to the server".

Original issue reported on code.google.com by [email protected] on 3 May 2011 at 8:49

does not display data with nl2br contents

I am using php 5.2.

I need to display contents of comments input by users.
User can input multi line comments by entering 'enter key'. 
Hence the input data will contains nl2br contents.
I have also set 'nowrap' property as false.

But it does not display the required contents.

Using 1.1 version On windows xp.




Original issue reported on code.google.com by [email protected] on 18 Jun 2011 at 5:30

Lower menu bar moves down in IE9

What steps will reproduce the problem?
1. Open the flexigrid in IE9
2. When hovering over the rows, the lower bar begins to drop down

What is the expected output? What do you see instead?
The lower bar should stay in the same place. Instead, the lower bar moves down 
the page and leaves blank space in between the lowest row and the menu bar.

What version of the product are you using? On what operating system?
V1.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Jun 2011 at 11:53

Column resizing in latest Flexigrid with latest jQuery

What steps will reproduce the problem?
1. grab any dragline to change column width
2. drag to change size
3. release the dragline

What is the expected output? What do you see instead?

I would expect the column to be resized, but instead the previous column is 
being resized. To be more clear, the header for the column works perfectly, but 
the column cells below it don't change, and the column cells one column to the 
left change to match the header of the actual column being changed.

What version of the product are you using? On what operating system?
The latest download, working on CentOS but using various OS/browsers to view 
and manipulate the table.

Please provide any additional information below.
I have attached a patched version for your perusal. The relevant code is found 
on lines 247 thru 252 in the patched version.

Original issue reported on code.google.com by [email protected] on 11 Feb 2011 at 5:03

Attachments:

Can't set relative width

Probably the largest inconvenience about Flexigrid is that I can't set it
to a relative width (to stretch to fit the page width). Fixing this would
of course require stretching the column widths as well. I searched around
online and found only one solution:
http://groups.google.com/group/flexigrid/browse_thread/thread/ec34168526a3783d?p
li=1.
But that solves only the table width issue, not the column widths. Any
assistance would be extremely appreciated by myself and probably a few
hundred other people! :)

Original issue reported on code.google.com by [email protected] on 21 Feb 2010 at 2:57

Pass column names to server script

I think it would be good for a future release of Flexigrid to provide an option 
for the script to pass the column names through to the server-side script. The 
colModel part of the script is formatted like this:
colModel: [display: 'ID', name: 'CUSTOMER.CUST_ID' ...etc...] for each of the 
columns required in the table. Since the 'name' part of the column corresponds 
to a column that would be in the query to the database, I was thinking you 
could pass all of these column names to the server-side script so that the 
query could be completely dynamic, rather than needing to type in a individual 
query for every table you need generated. This would allow you to use a single 
file to dynamically generate the XML or JSON for every table that you would 
need generated, rather than using a single file and specifying the query for 
each table, or using separate files and still needing to type each query 
manually.

An option could be put into the Flexigrid setup like boolean 'sendColumns' and 
if it is true then the script would send all the column names to the 
server-side script when the ajax call is made (possibly in an array for easy 
iteration). Or you could have it as an option for each column separately, if 
you wanted to be that specific to only send some columns.

I would post specific code, but I don't know how to do much plug-in coding with 
jQuery. Hopefully I described this well enough to be understood.

Original issue reported on code.google.com by [email protected] on 29 Apr 2011 at 1:40

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.