Welcome Guest, Not a member yet? Register   Sign In
Flexigrid - Lightweight but rich data grid
#61

[eluser]paulopmx[/eluser]
[quote author="jcgrubbs" date="1207211712"]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 Wink

Thanks,
JC[/quote]

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

[eluser]paulopmx[/eluser]
[quote author="slith" date="1207212195"][quote author="paulopmx" date="1207211002"][quote author="slith" date="1207210254"]awesome job with this script paulo! just wondering...is there a way to hide /toggle the grid by default when the page loads?[/quote]

just place the table in a div then hide that div[/quote]

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.[/quote]

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

Code:
$('.flexigrid').addClass('hideBody');
#63

[eluser]Kevin Kietel[/eluser]
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?

Code:
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

[eluser]Kevin Kietel[/eluser]
[quote author="Kevin Kietel" date="1207239091"]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?

Code:
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');
        }            
}
[/quote]


Never mind, found the solution: it's in the flexigrid allready :red:
#65

[eluser]davgino[/eluser]
Hi,
How i find id of row?
#66

[eluser]paulopmx[/eluser]
[quote author="davgino" date="1207273538"]Hi,
How i find id of row?[/quote]

is it the selected row? or any row.
#67

[eluser]paulopmx[/eluser]
[quote author="Kevin Kietel" date="1207248230"][quote author="Kevin Kietel" date="1207239091"]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?

Code:
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');
        }            
}
[/quote]


Never mind, found the solution: it's in the flexigrid allready :red:[/quote]

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

[eluser]dark_lord[/eluser]
@@Kevin Kietel

Quote: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

[eluser]Kevin Kietel[/eluser]
[quote author="wish_bear" date="1207309464"]@@Kevin Kietel

Quote: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.[/quote]

Sure, I will try to set up an example today... Smile
#70

[eluser]davgino[/eluser]
[quote author="paulopmx" date="1207274961"][quote author="davgino" date="1207273538"]Hi,
How i find id of row?[/quote]

is it the selected row? or any row.[/quote]

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




Theme © iAndrew 2016 - Forum software by © MyBB