mgallegos / laravel-jqgrid Goto Github PK
View Code? Open in Web Editor NEW@Laravel jqGrid package allows you to easily integrate the popular @jQuery Grid Plugin (jqGrid) into your Laravel application.
Home Page: mariogallegos.com
License: Other
@Laravel jqGrid package allows you to easily integrate the popular @jQuery Grid Plugin (jqGrid) into your Laravel application.
Home Page: mariogallegos.com
License: Other
Filter tool bar option is working fine in local . after i moved to hosted for live then i am not able get search result . but the query is posted .
may make the export function of the outside from JqGridJsonEncoder / encodeRequestedData ?
perform the necessary action depending on the value $postedData['exportFormat']
I wanted to do data export using templates, but unfortunately I do not understand anything in Laravel facades/providers/containers :(((
obviously it requires a mechanism for extending the export methods
all hope for you
Hello I have used your laravel package.when i am trying to export data as XLS, get a wrong format.can you please let me know what are issues?
Attached file as below as zip format.
AssociationGrid(1).xls.zip
Buen dia como seria para poner un color de fondo a una celda de acuerdo al valor que tenga, es decir si tiene como valor 'pendiente' se ponga de color rojo y si esta 'aceptado' en color fondo verde
I would like to see a small example of TreeGrid
Hola Muchas gracias por este paquete aunque me he gastado muchas horas intentando probarlo.
En la consola del navegador me bota "500 (Internal Server Error) " cuando intenta ejecutar el método POST que se establece mediante la línea "->setGridOption('url',URL::to('example/grid-data'))" en el GridRender. Porfa ayudame ya que no he podido cargar los datos porque no me ejecuta el método "postGridData()" del controlador.
Muchas gracias de antemano Mario.
Estoy teniendo este problema "TokenMismatchException in VerifyCsrfToken.php line 53" y es porque no se esta enviando un token de validacion con "setGridOption('url',URL::to('/grid-data'))" como se podria añadirlo para no tener que desactivarlo.
Hola, buenas tardes.... antes que nada gracias por crear este paquete... estoy seguro que para muchos nos ha sido de gran utilidad, en lo particular, apenas empiezo a conocer laravel.. y ya venia utilizando jqgrid así que me ha resultado algo dificil agarrarle el hilo de como integrarlo....
Mi duda es, será posible agregar columnas "personalizadas", con la finalidad de incluir un boton que me realize alguna acción mediante ajax....
De antemano... gracias....
ErrorException in EloquentRepositoryAbstract.php line 323:
A non-numeric value encountered
How can you integrate this if you are already extending your own custom repositories and interfaces?
$this->GridEncoder->encodeRequestedData expects Mgallegos\LaravelJqgrid\Repositories\RepositoryInterface
Hola como puedo hacer que el id del grid coicida con el id de la base de datos
Are there examples for how to set the color of the line depending on the value in the column?
Como puedo añadir el evento doble click al grid que llame a una funcion personalizada es decir la posiblidad de hacer doble click en la fila y obtener informacion de dicha fila
I need to filter data using facade where DB $this->where('sales.type_sale_id', 2); it does not work
I always geting error,'Something went wrong, please try again later.' at the below section:
type: 'POST',
//Creates an object from form fields.
//The "formToObject" is a custom helper function, its definition
//can be foound in the public/assets/tutorial/js/helpers.js script.
data: JSON.stringify($('#book-form').formToObject('')),
dataType : 'json',
url: url,
seems JSON.stringify not able to prepare data. please help me.
Following the tutorial "Building a Pivot Grid and handling jqGrid" i get an error. Laravel say to me $app is undefined. The piece of code that generate the problem is this :
Route::post('/invoice-item-grid', function() use ($app)
{
GridEncoder::encodeRequestedData(new InvoiceItemRepository($app['db']), Input::all());
});
Hola mgallegos, primero que nada muchas gracias por el desarrollo de este framework. Te cuento que lo implemente en laravel 4.2 y no he tenido ningun problema. Ahora lo estoy implementando en laravel 5,y luego de realizar todos los cambios necesarios logre mostrar la grilla pero sin las columnas de datos. Se que los datos estan pasando a la vista ya que puedo exportar como un xls los datos y aparecen en el excel, pero no entiendo por que no puedo verlos en la grilla.
de ante mano muchas gracias!
I need to hide the default buttons, see, search
Hola mgallegos muy buen trabajo con lo del laravel-jqgrid ya me he acostumbrado a usarlo, pero ahora que estoy actualizando a laravel 5 veo que que tu paquete no lo soporta te ruego encarecidamente que lo actualices, o hay alguna forma que pueda instalarlo en L5,
Desde ya muchas gracias por su respuesta.
Hey,
my problem: I have a JQGrid with Data from my database. When i want to edit a row, i got the Edit-Form with 3 Selects. I found already out how to disable two of these selects. Now i want, when i choose something other from the first select, that the second one get enabled and when i choose something in the second one, that the third one gets enabled.
I tried it already with Javascript, but it´s not working with onchange() for the Select, and in the editoptions of the colmodel it should be possible to do a 'dataEvent', something like this:
'editoptions' => array( 'dataUrl' => URL::to( 'myURL' ), 'dataEvent' => array('type'=>'change', 'fn'=>'function(){alert("Test");}')
The Grid is loading, yes, but nothing happens onchange, are there any mistakes in the code? What a code should be in the function()? I tried already to make a own function in javascript and to call it there in then, but it´s not working too.
Hope for a fast answer!
Greetz.
The following options will be added in the 'default_export_buttons_options':
Both options should be valid php date format.
These options can be override on any grid using the method:
setExportButtonsOption($option, $value)
If the the model options srcformat and newformat are set, these will replace (only on that column) the default options:
->addColumn(array('label' => 'date', 'index' => 'start_date', 'formatter' => 'date', 'formatoptions' => array('srcformat' => 'Y-m-d H:i:s', 'newformat' => 'd/m/Y h:i a')))
Hi Mario,
I've got error like below message on implementation for Laravel 5.2 :
FatalErrorException in routes.php line 40:
Class 'InvoiceRepository' not found
Could you please advice for the solution?
I follow tutorial steps and got "class demo/Reponsitory/ReponsitoryServiceProvider not found" after doing composer dump-autoload when trying to do database migrate, any idea where I'm doing wrong?
Hi! I followed your tutorial with my own database model, but the table renders empty. Additionally the server responds "500 Internal Server Error" to the POST request. What could be wrong?
Hi mgallegos,
It was a great one you have did for the laravel and thanks for this wonderful stuff.
Let me come to the problem,
Do we have the setColProperty ? if not how we can implement the dropdown with the select and have with inline edit?
thanks
arasu.b
Hi there,
Great work. Looks really good all this. However, I have an exotic requirement which is, I believe, all-encompassingly described in the subject. I need to display a hasMany relationship in one of the cells of each object row, which should become editable and searchable. I have come a long way, so here are the facts and the lacks:
My routes.php (fairly unchanged from the tutorial you made)
Route::post('/companies-grid', function () {
GridEncoder::encodeRequestedData(new CompanyRepository(new Company()), Input::all());
});
My companyRepository:
public function __construct(Model $Model)
{
$this->Database = $Model::with('Nace11s');
$this->visibleColumns = $Model->getAttributes();
$this->orderBy = array(array('name', 'asc'));
}
So with this, I get my objects through in the grid and with a formatter in javascript I can display a comma-separated list of the properties of the object. Now I have also implemented a multiselect to filter this column in the grid with multiple values, which, of course, returns me a server error, because (in my case) sql server cannot find the column "nace11s", of course, because it does not exist. The input parameters come through correctly though, when I, for instance, select 11,12,13,14, it passes those values in a comma-separated list to the filter parameters in the post request. Now of course the GridEncoder doesn't know how to go about this and dies on a sql error produced by the sql generated by the EloquentRepositoryAbstract (I suppose?). As I am all new to your interface, maybe you could point me out to the right places for the right approach on handling this.
Hello!
Laravel 5.1 is supported ?
Is it compulsory to user Repositories to use jqgrid? I tried to Learn and implement repositories but now luck!
Can any one guide me in right direction to use jqgrid with laravel 5.2.?
Thanks in advance.
how append _token to array editData at jqGrid ?
Dear Mario,
Tengo el siguiente problema
ErrorException (E_ERROR)
Argument 1 passed to Mgallegos\LaravelJqgrid\Renders\JqGridRender::getJavascriptExportFunctionCode() must be an instance of Mgallegos\LaravelJqgrid\Renders\string, string given, called in F:\easyphp56z\eds-www\tutorial\vendor\mgallegos\laravel-jqgrid\src\Mgallegos\LaravelJqgrid\Renders\JqGridRender.php on line 1026 and defined (View: F:\easyphp56z\eds-www\tutorial\app\views\tutorial.blade.php)
Opté por comentar esa linea (1026) y funciona normalmente.
No se si esa linea
$script .= $this->getJavascriptExportFunctionCode( substr($key, 0, -1*strlen('ButtonVisible') ) );
hace alguna cosa en especial, no se por que da ese error en mi proyecto
It's because jquery should be included at the bottom of HTML page for better loading speed, hence the grid's script should only be trigger after on page's load event.
Hello Martin Gallegos...
I try your laravel-jqgrid but I have a problem.
I can't load the grid table because jQuery(...).jqgrid is not a function..
I follow your instruction at http://www.mariogallegos.com/tutorials/crud-custom-form but the grid is not loading...
If I follow this instruction http://www.trirand.com/jqgridwiki/doku.php?id=wiki:first_grid, it works.
Why function GridRender::setGridId("...") is not working???
Can you help me???
ErrorException in JqGridRender.php line 1162:
Argument 1 passed to Mgallegos\LaravelJqgrid\Renders\JqGridRender::getJavascriptExportFunctionCode() must be an instance of Mgallegos\LaravelJqgrid\Renders\string, string given, called in /Users/mgallegos/workspace/decima-erp/vendor/mgallegos/laravel-jqgrid/src/Mgallegos/LaravelJqgrid/Renders/JqGridRender.php on line 1026 and defined (View: /Users/mgallegos/workspace/decima-inventory/src/views/movement-management.blade.php)
Hi Mario! Just after finishing the first part of my practice with your library I found a new problem. My example isn't exporting the data to Excel or CSV.
It seems to be a Javascript issue. Here is what FireBug tells me:
TypeError: jQuery(...).getGridParam is not a function
And it references to the following generated Javascript
jQuery("#AccLogsGridModel").val(JSON.stringify(jQuery("#AccLogsGrid").getGridParam("colModel")));
I spend the past hour trying to fix it without results. Any idea? Thanks!
Hi, I am trying to implement the advanced search functionality with this. Does this not support the case when groupOp is selected as 'any' for the filters ?
Hi There - so far I love the product, but I was wondering if 'Grouping' will be added to your ToDo list (or how soon or how soon TreeGrid might be added. Love to hear if anybody has an easy workaround. Thanks
Hi Mgallegos,
How to create columns at run time? as my columns are database based.
thanks
arasu.b
some like this:
public function prepareSelect_jqGrid( $data, $first = null){
if(!is_null($first)){
$data->prepend($first, '');
}
$base = array();
foreach($data as $k => $v){
$base[] = $k . ':' . $v;
}
return '\'' . implode(';', $base) . '\'';
}
now we can prepare SELECT from lists :
$listUsers = $this->prepareSelect_jqGrid(User::where('enabled', true)->get()->pluck('full_name', 'id'), ' - ALL - ');
..........................
->addColumn([
'label'=>'User full name',
'index'=>'user_id',
'align'=>'left',
'width' => 300,
'fixed' => false,
'editable' => true,
'editrules' => ['required' => true],
'edittype' => 'select',
'formatter' => 'select',
'editoptions' => [
-----------------------------------------------> 'value' => $listUsers,
'style' => 'width: 90%;',
]
]
)
I am using blade template with jq grid , after the installation I got jquery not found error
I have checked the source it has source jquery ,jquery ui and jq grid
I am not sure what I have missed ?can some one help on this
Esta muy buena tener la opcion de exportar a excel, pero en un grid necesito ocultar las opciones de exportar a excel y a csv por no ser indispensable en ese lugar
Hola Mgallegos, he instalado la ultima version de tu paquete ("mgallegos/laravel-jqgrid": "dev-master") pero estoy obteniendo este error Target [Mgallegos\LaravelJqgrid\Encoders\RequestedDataInterface] is not instantiable. Alguna sugerencia.
como puedeo añadir mas navButtons y como puedo cambiar el icono predefinido estoy usando la plantilla Ace - Responsive Admin Template
/navButtons
jQuery(grid_selector).jqGrid('navGrid',pager_selector,
{ //navbar options
edit: true,
editicon : 'icon-pencil blue',
add: true,
addicon : 'icon-plus-sign purple',
del: true,
delicon : 'icon-trash red',
search: true,
searchicon : 'icon-search orange',
refresh: true,
refreshicon : 'icon-refresh green',
view: true,
viewicon : 'icon-zoom-in grey',
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.