jQuery Grids - really simple

preview_player
Показать описание
Everyone needs grids. But people make them too convoluted to implement. My solution uses a simple table, include a js, and css file. Then write you PHP method which just creates a new Grid object. Its all open source and really simple to implement.

Not shown in this video:
complex queries - i can do complex joins, concat selects, its all really simple
Рекомендации по теме
Комментарии
Автор

i havent been on youtube in a while because i've been working on a project but now that i've checked out your latest stuff, this is so helpful, please keep it up! <3

not to mention gorgeous

trzown
Автор

So the reason this whole guy works well is because i did all the JS and mySQL/php. A lot of work is done in the php / mysql to do the sorting, searching, limiting etc. So just feeding the grid your result wouldn't give you all the sorting, searching, deleting, adding stuff.

You can do VERY complex queries with openJS Grid though. I do tons of aggregate functions, ton of joins etc. I'm sure there are things you can't do, but you can do still pretty tough things.

optikalefx
Автор

@optikalefxx basically its a shortcut to join a bunch of matched elements' attributes by comma

optikalefx
Автор

@naturalpsychic123 It is still using the normal plugin call. Its just my file is calling it. Yes im getting all items by class, but im still calling $grid.loadGrid() at the bottom of the JS file.

Plugins should all be built in a standard way so that the community knows what to do with them. IMO anyway.

optikalefx
Автор

I will work on updating the docs for that
use $grid->joins = array("LEFT JOIN table1 ON table1.value = table2.value")
and $grid->fields =

to select data from other tables

optikalefx
Автор

JQwidgets is very complicated and takes hours digging around for fixes to oddities in it. However once you get a decent grid working it can be included in other projects. I found using Entity framework made it much slicker. Trying to use sql server basically is a pain. Any grid you use is going to be complicated as its a complicated process.

nigelwright
Автор

@mjcarraco If you're new to web programming, check out my blog on debugging first. You will be able to see any errors that you have. Usually when the grid is not working its due to a mis typed filed name.

optikalefx
Автор

I usually use jQuery DataTables but will definitely play around with your solution and let you know my thoughts ;-).

TimK
Автор

It's not possible to publish here a web address with my table for you to check the "loading bar" always visible?
Thanks,
Mário

mjcarraco
Автор

Great teaching, however, I am only getting loading when I try the example. I have changed the ajax page to mysql parameters any suggestions?

horacemiles
Автор

@agillbb Its an interesting concept that data web apps should be desktop like. The reason my company makes money is the inverse of this. We make things fully custom, because interfaces need to be optimized for whatever subject it is. That's why using desktop like interfaces doesn't really work for most (of my) clients.

optikalefx
Автор

Hi,

I want to add jqxnotification widget on my js page.. i have a save button on my js page .. now i want to call jqxnotification widget everytime i click on this button..

Things which i did:
In my html added a div tag and in my js I added this notification widget on a function but the problem is it comes only for the first time when we click on save button... The next time the widget doesn't come. Can you please help

kapiljain
Автор

where do you release it when you're done?

mqx
Автор

You are very smart. Thanks. It is important to keep it simple.

allrightenergy
Автор

@willzurmacht Yea I got tired of the endless config that flex grid had

optikalefx
Автор

Can we edit records too using this grid?

arz
Автор

When I tried to run your code it gives me this error:

string(94) " SELECT `orders`.``, orders.id FROM `orders` ORDER BY LIMIT 0, " You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, ' at line 8

What that means?
Thank you

mjcarraco
Автор

Hey! So first make sure you grab the latest version of the grid from github. second, make sure the fields you're specifying in your table are all perfect from your main table, or fields you've specifically defined in $grid->fields. All else fails, zip it up and send it over and I'll take a look see.

optikalefx
Автор

Hi
I am trying to use Open JSGrid Version 2
When I run the grid, I get an error : Undefined index: cols
for the line ---> $colsArray = explode(", ", $post['cols']);
COuld you be of help to solve this problem.

Thank you.

danielnallapujoseph
Автор

Can you help me where can I connect this to my database? I'm trying but with no success (I'm new on web programming). As I understood, the "only" thing I have do configure is the ajax.php file to connect to my database?
I've tried to run this as you post (with the orders table) but didn't appear any data in the table. What I'm doing wrong? Thank you and congrats, very-very powerfull grid!

mjcarraco