CodeIgniter Forums
Flexigrid - Lightweight but rich data grid - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Flexigrid - Lightweight but rich data grid (/showthread.php?tid=7179)



Flexigrid - Lightweight but rich data grid - El Forum - 02-11-2010

[eluser]Unknown[/eluser]
addCellProp: function() {

var pthArray = $('th', g.hDiv);
var columns = pthArray.length;
var cellNum = 0;

$('tbody tr td', g.bDiv).each(function() {
var n = cellNum % columns;
var pth = pthArray[n];
cellNum++;

var tdDiv = "<div style='";

if (pth != null) {
if (p.sortname == $(pth).attr('abbr') && p.sortname) {
this.className = 'sorted';
}
tdDiv += $('div:first', pth).attr("style");

if (pth.hide) $(this).css('display', 'none');
}

if (p.nowrap == false) tdDiv += "white-space:normal;";

if (this[removed] == '') this[removed] = '&nbsp;';

tdDiv += "'>" + this[removed] + "</div>";

if (pth != null) {
var prnt = $(this).parent()[0];
var pid = false;
if (prnt.id) pid = prnt.id.substr(3);
if (pth.process) pth.process(tdDiv, pid);
}

this[removed] = tdDiv;
});

Hi Guy

i try to use your source but it has error at this[removed] = tdDiv;. so what is "removed"



Flexigrid - Lightweight but rich data grid - El Forum - 03-15-2010

[eluser]radomir_radojevic[/eluser]
Hi
Has anyone tried to implement multiple column search in fliexigrid?


Flexigrid - Lightweight but rich data grid - El Forum - 03-19-2010

[eluser]jikowhitewolf[/eluser]
How do I read the contents from this table "items"?

Code:
$items         = rtrim($_POST['items'],",");

I really need some help on how I can insert multiple selection, the same way how the delete.php works on delete multiple selection.

http://ellislab.com/forums/viewthread/148425/

Help pls.


Flexigrid - Lightweight but rich data grid - El Forum - 04-11-2010

[eluser]sujimohan[/eluser]
Hi,

I have a problem in the flexigrid. Instead of button in actions i used href link with text. But on click on the any row is hiding or making the href text to disappear. on Unselecting the row, its visible again. Can anyone help me please


Flexigrid - Lightweight but rich data grid - El Forum - 06-15-2010

[eluser]- Obonk -[/eluser]
guys any one here have implement more than 1 flexigrid on 1 page? please tell me how... ;-P


Flexigrid - Lightweight but rich data grid - El Forum - 06-18-2010

[eluser]Unknown[/eluser]
Hello,
I am implementing FlexiGrid with CI in an admin tool and have two columns in the database that I would like to concatenate into one column in a flexigrid. I've successfully created a query to merge the two columns into the grid. However, now the column is not sortable and is not search-able. I would really appreciate if someone could point me in the direction of how to do this.

Thanks in advance...


Flexigrid - Lightweight but rich data grid - El Forum - 06-19-2010

[eluser]- Obonk -[/eluser]
Guys how to baypass variable from the form so the variable can send to the ajax controller for making the WHERE clause Variable on the model. please help !!!


Flexigrid - Lightweight but rich data grid - El Forum - 06-28-2010

[eluser]Unknown[/eluser]
[quote author="radomir_radojevic" date="1268672605"]Hi
Has anyone tried to implement multiple column search in fliexigrid?[/quote]

I've created some new feature for multiple column searching, but, it's still in development..

here's the code


Flexigrid - Lightweight but rich data grid - El Forum - 07-13-2010

[eluser]khyqo[/eluser]
good day everyone.. i tried to connect it with my database but to no result was returned.. anyone who could guide me in setting it up?

i am got the code here >> http://sanderkorvemaker.nl/test/flexigrid

thanks in advance..


Flexigrid - Lightweight but rich data grid - El Forum - 08-09-2010

[eluser]Unknown[/eluser]
[quote author="Charles Bandes" date="1209511329"]Is it possible to make the rows clickable so that I can attach an action to the row? (Ferinstance, click a name, run an ajax call to bring up data in another div)[/quote]

Yes you can, see below:

1. Add this variable to the line 19 p = $.extend({ ondbclick: null,

2. Add .dblclick event as shown below

Code:
//line 724
$('tbody tr',g.bDiv).each
(
    function ()
    {
        $(this)
        .click(
            function (e)
            {
                var obj = (e.target || e.srcElement);
                                if (obj.href || obj.type) return true;
                                     $(this).toggleClass('trSelected');                                        
                if (p.singleSelect) $(this).siblings().removeClass('trSelected');
            }
        )

//below .click add this line        
.dblclick(
    
function (e)                                 {                                            
    if(typeof p.ondbclick == 'function'){
        p.ondbclick($(this).attr('id').substr(3));
    }
})


3. In flexigrid configuration add the name of you method to ondbclick
Code:
$("#flex1").flexigrid
(
    {
        url: 'post2.php',
        dataType: 'json',
        title: 'Countries',
        pagetext: 'Page',
        pagestat: 'Showing {from} to {to} of {total} items',
        outof: 'of',
        findtext: 'Find',
        procmsg: 'Processing, please wait ...',
        colModel : [
            {display: 'ISO', name : 'iso', width : 40, sortable : true, align: 'center'},
            {display: 'Name', name : 'name', width : 180, sortable : true, align: 'left'},
            {display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'},
            {display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'left', hide: false},
            {display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'right'}
        ],
        buttons : [
            {name: 'Add', bclass: 'add', onpress : test},
            {name: 'Delete', bclass: 'delete', onpress : test},
            {separator: true}
        ],
        searchitems : [
            {display: 'ISO', name : 'iso'},
            {display: 'Name', name : 'name', isdefault: true}
        ],
        sortname: "iso",
        sortorder: "asc",
        usepager: true,        
        useRp: true,
        rp: 15,
        showTableToggleBtn: true,
        width: 700,
        height: 200,
        ondbclick: editMe
    }
);

4. create the method that you need to make a call

Code:
function editMe(id){
    alert(id);
}