Welcome Guest, Not a member yet? Register   Sign In
Flexigrid CodeIgniter Implementation
#1

[eluser]Armorfist[/eluser]
Hello,

I just finished some documentation on the Flexigrid CodeIgniter Implementation. You can take a look in http://flexigrid.eyeviewdesign.com/ .
All feedback, improvements, etc are really welcome.

Thanks,
Frederico
#2

[eluser]daBayrus[/eluser]
Your implementation of add/delete was similar to mine, adding new elements through another form and delete by passing to a controller. I was able to add freely but somehow I wasn't able to delete, maybe because I was just using one controller (I converted the ajax controller as a method of the primary controller).

I made some changes though on the helper file. I added another parameter $title so I can set the title for the flexigrid and also for the showTableToggleBtn: true to work. Without the title, there's no toggle button right?

There are times when buttons are not needed on the flexigrid and it's not enough to set the $button variable to an empty array because it produces an error. And it doesn't look good if it has only a separator. So I added a condition which checks if the $button variable is not empty before completing $grid_js.

Many thanks for a great library. Nice work!
#3

[eluser]Armorfist[/eluser]
I think if you use "NULL" in the $button parameter it removes all buttons without problem with the original helper file.
Nice call on the $title, I totally forgot, going to add it.

Thanks Smile

*EDIT*
I just checked, it does give an error without $button. I did implement the NULL feature but it was on another project and forgot to pass it here.
#4

[eluser]abmcr[/eluser]
Many thanks for a great library. Best work!
Ciao!
#5

[eluser]Tanque[/eluser]
i love it... it's look great... later, i will download it and try to apply the library in my sites and tell u how it work...
#6

[eluser]andyroe[/eluser]
Hey Armorfist,

First I want to thank you for the great library and all the work and time ýuo've put into it!
It looks great.

But... on this forum I found another implementation of the Flexigrid component in CI.
And, in all my ignorance, I must say that this approach looks quite nice to me too; to be honest, even simpler and compacter than your version, though I can't judge the quality of the implementation and coding.
It is written by Czarchiac ( http://ellislab.com/forums/viewreply/401942/ ) and I have modified and optimized it a little so it works in IE6, IE7 and FF now.
You can find the implementation in an attachment of this reply. Maybe you want to try and compare?

EDIT: I just put the example online; you can find it at:
http://www.roelinkdrukwerk.nl/flexi/

I'm sorry to say that I cannot take advantage of the Flexigrid at all for the application I wanted to use it for (BambooInvoice), because I cannot avoid the conflicts of the coexistence of the Prototype and the jQuery code :-S

I'll try to find an alternative grid that makes use of the Prototype library.

Anyway, thanks again. Maybe I come up with another project where I can make use of the Flexigrid component.

Cheers,
Andy
#7

[eluser]Armorfist[/eluser]
Hello andyroe,

Thanks for your support Wink

Yes that version may be indeed more simple to learn and more straightforward. However, my implementation has a more solid code base. My approach is designed for easier code maintenance and easy updates.

If you compare the controller, model and view from both versions, you will notice that my implementation is much cleaner and has minimum code repetition. That's because all the data validation, generating javascript, handling and processing query's is all handled by the library and helper file.

Another great advantage in this is that if there is a major update to flexigrid (like paulo told the next release is going to be) where we must change the javascript code, and if we have 20 views with grids, the only thing you have to do is update the library and helper and you are good to go. In Czarchiac's version you have to change every controller and every view to get it working again.

Besides that, code separation, although it slightly complicates the implementation, is very important to code maintenance, that's why I have two different controllers, one for the AJAX requests and the other one to generate the javascript and load the view.

In conclusion, they are two very different implementations, mine is more solid and coded/structured for larger projects, Czarchiac's is more simple (in a way), but messier thus not very good to maintain.
I think my implementation is easy to work with once you get your head around it. Wink
#8

[eluser]andyroe[/eluser]
Hi Armorfist,

That's exactly what I expected to hear. The code separation seems to create a much more flexible approach for structured projects. It is easy to work with indeed, though the other version looks more like the original version, so the adjustments are easier to find and to make.
Anyway, I agree with your implementation for its solid code and hope I can use it for a nice project in the future.

Once again, thanks for your support.

Cheers, Andy
#9

[eluser]Guro[/eluser]
hello, big thanks for this nice project.
as i see in demo there are column Actions and delete button, but it didn't works.
im trying to make it work, i have added your test function to delete button but no success, as i understand test function needs 2 arguments com & grid, com is just a string but grid? how can i get grid name?
#10

[eluser]San2k[/eluser]
Hi!
Thanks . very nice!

I have a little problem with SORTABLE tables. I'am setting row to be sortable - but he is not. There is no picture on the name of the row and when i click on it - nothing happens. What can be? Everything else works good.




Theme © iAndrew 2016 - Forum software by © MyBB