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]
  • #61 / Apr 03, 2008 7:24am

    paulopmx

    164 posts

    Do you have any plans to add grouping capability to FlexiGrid?  I love what you have so far and am already planning to use it in an enterprise level product, but grouping support would really push it over the top 😉

    Thanks,
    JC

    Hi JC,

    Thanks for your suggestion, I’ll consider adding this functionality if time permits me and that I don’t go over the size limit that I set for the project.

    The code is also open-source. So, hopefully, another person or you add this functionality you need, then I maybe able to add it to the main distribution code.

  • #62 / Apr 03, 2008 7:26am

    paulopmx

    164 posts

    awesome job with this script paulo! just wondering…is there a way to hide /toggle the grid by default when the page loads?

    just place the table in a div then hide that div

    well i dont want to hide it completely, i simply want the grid hidden, with only the title and toggle button visible…like what you see when you click on the toggle button.

    try this jQuery code that adds a class after calling the grid

    $('.flexigrid').addClass('hideBody');
  • #63 / Apr 03, 2008 8:11am

    Kevin Kietel

    22 posts

    Paulo,

    a quick question:

    I’m trying to add functionality to the ‘delete button’. I post an array with item id’s by using Ajax. Selected items will be deleted. How do I call the ‘reload’ function after successful Ajax results?

    function test(com,grid)
    {
        if (com=='Delete')
            {
               if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){
                var items = $('.trSelected',grid);
                var itemlist ='';
                for(i=0;i<items.length;i++){
                    itemlist+= items<i>.id.substr(3)+",";
                }
                $.ajax({
                   type: "POST",
                   dataType: "text",
                   url: "handler.php",
                   data: "action=delmultiple&items;="+itemlist,
                   success: function(text){
                                     ////////////how do i call the reload function?? ////
                     
                   }
                 });
                }
            }
        else if (com=='Add')
            {
                alert〈'Add New Item'〉;
            }            
    }
  • #64 / Apr 03, 2008 10:43am

    Kevin Kietel

    22 posts

    Paulo,

    a quick question:

    I’m trying to add functionality to the ‘delete button’. I post an array with item id’s by using Ajax. Selected items will be deleted. How do I call the ‘reload’ function after successful Ajax results?

    function test(com,grid)
    {
        if (com=='Delete')
            {
               if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){
                var items = $('.trSelected',grid);
                var itemlist ='';
                for(i=0;i<items.length;i++){
                    itemlist+= items<i>.id.substr(3)+",";
                }
                $.ajax({
                   type: "POST",
                   dataType: "text",
                   url: "handler.php",
                   data: "action=delmultiple&items;="+itemlist,
                   success: function(text){
                     $("#flex1").flexReload();
                  }
                 });
                }
            }
        else if (com=='Add')
            {
                alert〈'Add New Item'〉;
            }            
    }


    Never mind, found the solution: it’s in the flexigrid allready :red:

  • #65 / Apr 03, 2008 5:45pm

    davgino

    6 posts

    Hi,
    How i find id of row?

  • #66 / Apr 03, 2008 6:09pm

    paulopmx

    164 posts

    Hi,
    How i find id of row?

    is it the selected row? or any row.

  • #67 / Apr 03, 2008 6:12pm

    paulopmx

    164 posts

    Paulo,

    a quick question:

    I’m trying to add functionality to the ‘delete button’. I post an array with item id’s by using Ajax. Selected items will be deleted. How do I call the ‘reload’ function after successful Ajax results?

    function test(com,grid)
    {
        if (com=='Delete')
            {
               if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){
                var items = $('.trSelected',grid);
                var itemlist ='';
                for(i=0;i<items.length;i++){
                    itemlist+= items<i>.id.substr(3)+",";
                }
                $.ajax({
                   type: "POST",
                   dataType: "text",
                   url: "handler.php",
                   data: "action=delmultiple&items;="+itemlist,
                   success: function(text){
                     $("#flex1").flexReload();
                  }
                 });
                }
            }
        else if (com=='Add')
            {
                alert〈'Add New Item'〉;
            }            
    }


    Never mind, found the solution: it’s in the flexigrid allready :red:

    Great job. I see you your starting to get it :-).

    Still lots of API, documentation should be ready next week. Only can work on this on weekends.

  • #68 / Apr 04, 2008 3:44am

    dark_lord

    103 posts

    @@Kevin Kietel

    I’m trying to add functionality to the ‘delete button’. I post an array with item id’s by using Ajax. Selected items will be deleted. How do I call the ‘reload’ function after successful Ajax results?

    Can you help me how did you implement the Delete Functionality? I am only a Beginner in Ajax and JQuery.

    Thanks in advance dude.

  • #69 / Apr 04, 2008 4:56am

    Kevin Kietel

    22 posts

    @@Kevin Kietel

    I’m trying to add functionality to the ‘delete button’. I post an array with item id’s by using Ajax. Selected items will be deleted. How do I call the ‘reload’ function after successful Ajax results?

    Can you help me how did you implement the Delete Functionality? I am only a Beginner in Ajax and JQuery.

    Thanks in advance dude.

    Sure, I will try to set up an example today… 😊

  • #70 / Apr 04, 2008 5:03am

    davgino

    6 posts

    Hi,
    How i find id of row?

    is it the selected row? or any row.

    at both of them: the id of the selected row and array of the id’s selected.

  • #71 / Apr 04, 2008 5:17am

    paulopmx

    164 posts

    Hi,
    How i find id of row?

    is it the selected row? or any row.

    at both of them: the id of the selected row and array of the id’s selected.

    The id of the data is stored as id of the row it self with the format “row”+id;

    ok say you want to get the id of a selected row from a table with class ‘flexme’

    $('.flexme tr.trSelected').each
    (
        function () 
        { 
       rowid = this.id.substring(3);
       //use row id data here
       }
    );

    of course if you want to just get all just remove the word ‘trSelected’ in the jQuery Selector.

  • #72 / Apr 04, 2008 10:17am

    Kevin Kietel

    22 posts

    @@Kevin Kietel

    I’m trying to add functionality to the ‘delete button’. I post an array with item id’s by using Ajax. Selected items will be deleted. How do I call the ‘reload’ function after successful Ajax results?

    Can you help me how did you implement the Delete Functionality? I am only a Beginner in Ajax and JQuery.

    Thanks in advance dude.

    @whish_bear:

    I’ve put up a small example, you can find it on http://sanderkorvemaker.nl/test/flexigrid/, together with a complete zipfile (including the plugin, php pages and MySQL database dump).

    If you need more help, just ask!

  • #73 / Apr 04, 2008 10:43am

    Synergiq

    12 posts

    Hi, I think your script is fantastic but I’m a bit stuck.

    I’ve got pretty much the whole thing working using classic asp (coming from a Sybase database) but I’m stuck on the pagination. I cant figure out why the page number always goes back to one (the number in the input field). This means that you cant use the next and back buttons to get past page 2.

    Thanks for your help.

  • #74 / Apr 04, 2008 7:14pm

    paulopmx

    164 posts

    Hi, I think your script is fantastic but I’m a bit stuck.

    I’ve got pretty much the whole thing working using classic asp (coming from a Sybase database) but I’m stuck on the pagination. I cant figure out why the page number always goes back to one (the number in the input field). This means that you cant use the next and back buttons to get past page 2.

    Thanks for your help.

    Can you post your asp code here?

  • #75 / Apr 05, 2008 6:39am

    Synergiq

    12 posts

    Here’s the asp code for the page that generates the json:
    (I should also point out, there’s no LIMIT command in sybase so I’ve had to do some of the code slightly differently)

    (I’ve removed this code for now. I’m working on a tutorial for using flexigrid with asp)

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

ExpressionEngine News!

#eecms, #events, #releases