You are not logged in.

Important Note: This forum is being archived and will be completely locked down on the 7th of February. The new forum can be found at http://laravel.io.

Announcement

    Laravel 4 Advanced Architecture: Book Now On Sale

#1 2013-12-12 18:10:48

mgallegos
Artisan
From: El Salvador
Registered: 2013-12-04
Posts: 5

[Package] Laravel 4 jqGrid package

Hi everybody!

I developed a Laravel 4 package to use the popular jQuery Grid Plugin (jqGrid) in your PHP applications.

Features
  • Config file with global properties to use in all grids of your application.

  • PHP Render to handle javascript code.

  • Datasource independent (you are able to create your own datasource implementation).

Documentation

You can find information and documentation at http://github.com/mgallegos/laravel-jqgrid

Live Demo

A live demo of Laravel 4 jqGrid package is available at the following address: http://goo.gl/s8uNBR

The source code of the demo is available at http://github.com/mgallegos/laravel-jqgrid-demo

Cheers,
Mario Gallegos

Last edited by mgallegos (2014-01-24 22:15:35)

Offline

#2 2013-12-12 19:17:38

d~l
Artisan
Registered: 2013-07-03
Posts: 187

Re: [Package] Laravel 4 jqGrid package

I also built a prototype workbench package based on jqxwidgets .. as an integration exercise (but not public).
My understanding from jqwidgets forum and website is that you might have to add some comment in your
package  licence that a commercial licence is payable (to jqwidgets) for commercial usage.

Offline

#3 2013-12-12 19:41:53

mgallegos
Artisan
From: El Salvador
Registered: 2013-12-04
Posts: 5

Re: [Package] Laravel 4 jqGrid package

d~l wrote:

I also built a prototype workbench package based on jqxwidgets .. as an integration exercise (but not public).
My understanding from jqwidgets forum and website is that you might have to add some comment in your
package  licence that a commercial licence is payable (to jqwidgets) for commercial usage.

You are talking about a different product, my package is intended to work with the jqGrid plugin, this plugin is developed by Trirand (trirand.com/blog/) and dual licensed under the MIT and GPL license.

Offline

#4 2013-12-12 20:01:14

d~l
Artisan
Registered: 2013-07-03
Posts: 187

Re: [Package] Laravel 4 jqGrid package

Sorry .. my mistake ... it looks similar to jqxgrid which does require a commercial licence

http://www.jqwidgets.com/jquery-widgets … 8arctic%29

Offline

#5 2014-01-21 05:32:33

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

Hi i m using ur Jqgrid on laravel.. I am able show my datum in grid  , i don't know how to add edit , update and delete functionalities.

Last edited by sureshamk (2014-01-21 05:40:42)

Offline

#6 2014-01-21 08:11:09

sineld
Moderator
From: Bursa, Türkiye
Registered: 2012-05-18
Posts: 524
Website

Re: [Package] Laravel 4 jqGrid package

I have updated the post with corrected links.

Offline

#7 2014-01-21 16:40:33

mgallegos
Artisan
From: El Salvador
Registered: 2013-12-04
Posts: 5

Re: [Package] Laravel 4 jqGrid package

sureshamk wrote:

Hi i m using ur Jqgrid on laravel.. I am able show my datum in grid  , i don't know how to add edit , update and delete functionalities.

The jqGrid JavaScript plugin includes client-side functionality to accomplish basic CRUD functions, you can enable them through the navigator options:

GridRender::setNavigatorOptions('navigator', array('add'=>true, 'edit'=>true, 'del'=>true, 'search'=>false, 'view'=>true, 'refresh'=>false))

Remember that in the add and edit form, only those columns with property 'editable' = true will be shown:

GridRender::addColumn(array('index'=>'name', 'editable'=>true))

Now, you have to specify an URL to handle add, edit and delete operations (the same URL will be use for all operations, but the varible 'oper' will be set automatically to let you know which operation you are dealing with):

GridRender::setGridOption('editurl',URL::to('example/grid-edit-add-del'))

The package does not includes server-side functionality to deal with CRUD operations, so you have to implement it yourself.

Make sure to read the following documentation as it will show you how the data is posted to the server:

http://www.trirand.com/jqgridwiki/doku. … rm_editing

How this helps!

Last edited by mgallegos (2014-01-24 22:23:02)

Offline

#8 2014-01-22 06:21:57

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

Thank you so much.. its works fine... I coded server side to edit and update the data , but i don't How get validation errors after click the submit on EDIT model...

Offline

#9 2014-01-22 08:53:12

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

How can i able to add beforeSubmit event for form Add and  edit ..?

Offline

#10 2014-01-22 08:54:01

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

mgallegos wrote:
sureshamk wrote:

Hi i m using ur Jqgrid on laravel.. I am able show my datum in grid  , i don't know how to add edit , update and delete functionalities.

The jqGrid JavaScript plugin includes client-side functionality to accomplish basic CRUD functions, you can enable them through the navigator options:

GridRender::setNavigatorOptions('navigator', array('add'=>true, 'edit'=>true, 'del'=>true, 'search'=>false, 'view'=>true, 'refresh'=>false))

Remember that in the add and edit form, only those columns with property 'editable' = true will be shown:

GridRender::addColumn(array('index'=>'name', 'editable'=>true))

Now, you have to specify an URL to handle add, edit and delete operations (the same URL will be use for all operations, but the varible 'oper' will be set automatically to let you know which operation you are dealing with):

GridRender::setGridOption('edturl',URL::to('example/grid-edit-add-del'))

The package does not includes server-side functionality to deal with CRUD operations, so you have to implement it yourself.

Make sure to read the following documentation as it will show you how the data is posted to the server:

trirand.com/jqgridwiki/doku.php?id=wiki%3aform_editing

How this helps!

Thank you so much.. its works fine... I coded server side to edit and update the data , but i don't How get validation errors after click the submit on EDIT model...

Offline

#11 2014-01-22 17:19:18

mgallegos
Artisan
From: El Salvador
Registered: 2013-12-04
Posts: 5

Re: [Package] Laravel 4 jqGrid package

sureshamk wrote:

Thank you so much.. its works fine... I coded server side to edit and update the data , but i don't How get validation errors after click the submit on EDIT model...

What you have to do is to define the "afterSubmit" event for the edit form. First define a JavaScript function to handle the event, the function receives as parameters the data returned from the request and an array of the posted values. When used this event should return an array with the following items [success, message]  where  success is a boolean value if true the process continues, if false a error message appear and all other processing is stooped.

<script type='text/javascript'>
     function afterSubmitEvent(response, postdata) 
    { 
    … 
    return [succes,message] 
   }
</script>

Now you have the add the event for the edit form using the package GridRender:

GridRender::setNavigatorEvent('edit', 'afterSubmit', 'afterSubmitEvent')

And if you want to validate your forms fields before submitting, using "editrules" you can specify validations for each column:

GridRender::addColumn(array('index'=>'name', 'editable'=>true, 'editrules'=>array('required'=>true, 'integer'=>true)));

For more information about "editrules" check out the following link:

http://www.trirand.com/jqgridwiki/doku. … #editrules

sureshamk wrote:

How can i able to add beforeSubmit event for form Add and  edit ..?

Just as before after you defined your JavaScript functions, all you have to do is define the events using the package GridRender:

GridRender::setNavigatorEvent('add', 'beforeSubmit', 'yourJavascriptFunctionName')
          ->setNavigatorEvent('edit', 'beforeSubmit', 'yourJavascriptFunctionName')

Dealing with jqGrid events could be a little bit tricky, I recommend you to take a good look to the JqGrid documentation:

http://www.trirand.com/jqgridwiki/doku. … rm_editing

Last edited by mgallegos (2014-01-24 22:23:58)

Offline

#12 2014-01-24 11:05:57

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

mgallegos wrote:
sureshamk wrote:

Thank you so much.. its works fine... I coded server side to edit and update the data , but i don't How get validation errors after click the submit on EDIT model...

What you have to do is to define the "afterSubmit" event for the edit form. First define a JavaScript function to handle the event, the function receives as parameters the data returned from the request and an array of the posted values. When used this event should return an array with the following items [success, message]  where  success is a boolean value if true the process continues, if false a error message appear and all other processing is stooped.

<script type='text/javascript'>
     function afterSubmitEvent(response, postdata) 
    { 
    … 
    return [succes,message] 
   }
</script>

Now you have the add the event for the edit form using the package GridRender:

GridRender::setNavigatorEvent('edit', 'afterSubmit', 'afterSubmitEvent')

And if you want to validate your forms fields before submitting, using "editrules" you can specify validations for each column:

GridRender::addColumn(array('index'=>'name', 'editable'=>true, 'editrules'=>array('required'=>true, 'integer'=>true)));

For more information about "editrules" check out the following link:

trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#editrules

sureshamk wrote:

How can i able to add beforeSubmit event for form Add and  edit ..?

Just as before after you defined your JavaScript functions, all you have to do is define the events using the package GridRender:

GridRender::setNavigatorEvent('add', 'beforeSubmit', 'yourJavascriptFunctionName')
          ->setNavigatorEvent('edit', 'beforeSubmit', 'yourJavascriptFunctionName')

Dealing with jqGrid events could be a little bit tricky, I recommend you to take a good look to the JqGrid documentation:

trirand.com/jqgridwiki/doku.php?id=wiki:form_editing


i tried as you said but the event is not triggered

Offline

#13 2014-01-24 13:54:00

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

->setNavigatorOptions('navigator', array('multipleSearch'=>true,'multipleGroup'=>true))

i tried above the code for getting multi search . but i dint get ? Any solutions

Offline

#14 2014-01-24 22:13:05

mgallegos
Artisan
From: El Salvador
Registered: 2013-12-04
Posts: 5

Re: [Package] Laravel 4 jqGrid package

sureshamk wrote:

->setNavigatorOptions('navigator', array('multipleSearch'=>true,'multipleGroup'=>true))

i tried above the code for getting multi search . but i dint get ? Any solutions

You are using an incorrect parameter to set search options, it should be:

->setNavigatorOptions('search', array('multipleSearch'=>true,'multipleGroup'=>true))

Offline

#15 2014-01-27 11:59:02

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

i am coded files to respond add and edit , operations are done as per edit or add or delete . After this operations i cant able to show  results or validation error , to the ADD/EDIT modal. How can i do this . ?

Offline

#16 2014-01-28 08:44:58

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

How can able export to excel format ? is there any inbuilt functionality is available ?

Offline

#17 2014-01-29 08:32:08

sureshamk
Artisan
From: india
Registered: 2014-01-03
Posts: 12

Re: [Package] Laravel 4 jqGrid package

How define new button , that will make export option via our package in laravel ?

Offline

Board footer

Powered by FluxBB

');