ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Flexigrid - Lightweight but rich data grid

March 28, 2008 10:13am

Subscribe [82]
  • #676 / Jun 13, 2011 10:26pm

    - Obonk -

    10 posts

    I have successfully implement Flexigrid with CI 2.0.2. but my problem come when I connected to more than with 1 database on CI.

    When I use flexigrid with :

    $this->db->select('schedule.id_schedule, schedule.group AS groups');
    $this->db->from($table_name);
    
    $this->flexigrid->build_query();

    The flexigrid work perfectly, but when i use flexigrid with another database connection :

    $this->dbsms = $this->load->database('sms', TRUE);
    $this->dbsms->select('schedule.id_schedule, schedule.group AS groups');
    $this->dbsms->from($table_name);
    
    $this->flexigrid->build_query();

    The flexigrid Limit, Sort & search is not working.

    is there some bugfix for this? I hope some one could help me.

    Thanks alot

  • #677 / Nov 15, 2011 1:47am

    iijb

    4 posts

    Hi all,

        I am not sure whether I am posting my question in right area.

        I am facing a problem with datepicker along with flexigrid. I have view page in which I have a flexigrid and also datepicker field. My datepicker not working and got error: datepicker is not a function.

    Please help me
    Thanks in advance
    iijb

  • #678 / Jan 17, 2012 4:01pm

    Big-A-Rob

    1 posts

    How can I integrate a code where a downloadable link is listed in the table like an enitities listed for (e.g. Printable_Name) is a link? How can I do that?...

    2 ways:

    1. You can send the data with a link already in it. This is easier if your not into Javascript. Just remember to handle the quotes and double quotes.

    2. In the colModel

    {display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'},

    add a property called process

    {display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left', process: makeLink},

    then create a function with the name makeLink

    function makeLink(celDiv)
    {
           $(celDiv).html('<a href="http://thisisalinkfolder/">Link</a>');
    }

    The assumption here is that what ever data you are passing to that column is what you need to create your link.

    Hope this helps. 😊

    I have used both methods to wrap the text with DOM elements.  The issue I am having is that doing so it breaks the column resizing.  The column header width and column width get out of sync until you hit the refresh button.

    The first method I used was exactly like you did above, the second was modifying my json with a div element and title so I could display a tooltip on hover.  Both methods work great except for the column resizing.  The issue does not exist with just the text.  Any suggestions?  Is there something else I need to modify?

    The width and height of the grid are set to ‘auto’ if that helps.

  • #679 / Jan 30, 2012 11:01am

    Predrag Simic

    1 posts

    Hi to all…

    I started to use FlexiGrid few weeks ago and I am preety happy with functionality of it.

    Have one issue and need someone to help me how to solve it, and on the net I didn’t find any example of this. The problem is that I have in one column of table color that is represented by name or code (red, green etc.). I need to color that cell with color that is in it. Is it possible to do that in Flexigrid?

    $(document).ready(function() {
     $("#newTable").flexigrid({
     url: 'agendaTipoAppuntamentoInitJson.do',
     dataType: 'json',
     colModel : [
      {display: 'ID',             name : 'idTipoAppuntamento', width : 40, sortable : false, align: 'center', hide: true},
      {display: 'Codice',         name : 'codice', width : 60, sortable : false, align: 'left'},
      {display: 'Descrizione',   name : 'descrizione', width : 130, sortable : false, align: 'left'},
      {display: 'Descr. breve',   name : 'descrBreve', width : 80, sortable : false, align: 'left'},
      {display: 'Colore',         name : 'colore', width : 80, sortable : false, align: 'left'},
      {display: 'ID Struttura',    name : 'idStruttura', width : 60, sortable : false, align: 'left', hide: true},
      {display: 'Descr. Struttura',   name : 'descrizioneStruttura', width : 150, sortable : false, align: 'left'},
      {display: 'ID Spec',     name : 'idSpecializzazione', width : 60, sortable : false, align: 'left', hide: true},
      {display: 'Descr. Spec',    name : 'descrizioneSpecializzazione', width : 150, sortable : false, align: 'left'},
      
      
      ],
     usepager: true,
     title: 'Gestione tipi appuntamento',
     useRp: true,
     rp: 15,
     showTableToggleBtn: true,
     width: 'auto',
     height: 'auto',
     singleSelect: true,
     click: editMe
     
    }); });

    This is def. for table.

    Thanks…

  • #680 / Apr 24, 2012 11:29am

    anthrotech

    14 posts

    Kevin - How did you get Pagination to work??? I think my issue may be related to a joined table query. But I am not sure how to get Pagination to work. Please advise.

    Trying the example made by Kevin Kietel at http://sanderkorvemaker.nl/test/flexigrid/ I saw that the search based on letters doesn’t work. This is a great functionality. Can anyone help me to solve this issue? I tried but I don’t know what to do.

    @Roberto:

    I’ve updated the example on http://sanderkorvemaker.nl/test/flexigrid/ (the zip file is also updated)
    The search based on letters is functional now. You can use the letters on the top of the grid to find items that start with a certain letter. The search criteria are set by the select box in the quick search bar. So when the quick search bar is set to ‘name’, and you press the letter F, the MySQL query will be like:

    SELECT id,iso,name,printable_name,iso3,numcode FROM country WHERE `name` LIKE 'F%'

    When you want to see all numerical items, the MySQL query will be:

    SELECT id,iso,name,printable_name,iso3,numcode FROM country WHERE `name` REGEXP '[[:digit:]]'

    Hope this will help you and other users!

  • #681 / May 18, 2012 4:42am

    zeronet

    1 posts

    Nice, very nice

  • #682 / Aug 08, 2013 10:57am

    Truth

    1 posts

    I can’t set my database properties instead of the example codes.
    Whereas I replace my database properties as well in the codes.
    should I change the codes of the .js or .css files too?
    Any help is appreciated.

  • #683 / Sep 05, 2013 8:03am

    rajmohansoft

    1 posts

    Hi
        I’m new to codeigniter,flexigrid and i have problem in flexigrid.How can subgrid create in flexigrid using controller.I was try some other way,but i can’t do it. Any one know how to done this.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases