Code Monkey home page Code Monkey logo

laravel-jqgrid's Issues

ErrorException: getJavascriptExportFunctionCode() must be an instance of Mgallegos\LaravelJqgrid\Renders\string, string given

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)

Already using repository

How can you integrate this if you are already extending your own custom repositories and interfaces?
$this->GridEncoder->encodeRequestedData expects Mgallegos\LaravelJqgrid\Repositories\RepositoryInterface

Problema al mostrar los datos en la grilla

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!

Excel and CSV buttons not working

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!

Error Model On Laravel 5.2

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?

Is it working in Laravel 5.2

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.

jQuery not found

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

GridRender is not working... jQuery(...).jqgrid is not a function

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???

laravel-jqgrid para laravel 5.*

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.

Ayuda con la URL para el controlador [->setGridOption('url',URL::to('example/grid-data'))]

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.

Agregar navButtons

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',
},

Getting empty table

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?

Problemas con el token de validación

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.

save() not working

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.

I'm new in laravel and I am using jqGrid. I have included all .css and .js files as in example, but I'm still having a parse error on my view.

{{ GridRender::setGridId('WarehouseGrid') ->enablefilterToolbar(true, false) ->hideXlsExporter() ->hideCsvExporter() ->setGridOption('url',URL::to('/warehouse-grid')) ->setGridOption('rowNum', 10) ->setGridOption('rownumbers', true) ->setGridOption('width', 750) ->setGridOption('height', 225) ->setGridOption('rowList',array(10,20,30)) ->setGridOption('caption','Warehouse') ->setGridOption('viewrecords',true) ->setGridEvent('onSelectRow', 'onSelectRowEvent') ->addColumn(array('index' => 'warehouse_id', 'hidden' => true)) ->addColumn(array('label' => 'Magazina', 'index'=>'warehouse_name')) ->addColumn(array('label' => 'Pershkrimi','index' => 'warehouse_description')) ->addColumn(array('label' => 'Data krijimit','index' => 'created_at')) ->renderGrid(); }}

Reg:- setColProperty not working

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

dataEvent not working?

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.

Render grid after page loaded

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.

Dynamic Column model

Hi Mgallegos,

How to create columns at run time? as my columns are database based.

thanks
arasu.b

may be include new method fo prepare select-list ?

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%;',
                                                             ]
                                           ]
                                  )

Building a Pivot Grid and handling jqGrid $app is undefined

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());
});

extendeble export

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

Cómo agregar columna personalizada ?

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....

img_capjqgrid

De antemano... gracias....

Color de fondo a celda

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

How to use where

I need to filter data using facade where DB $this->where('sales.type_sale_id', 2); it does not work

como ocultar el boton exportar a excel

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

hasMany relationship squeezed into 1 cell, editable & searchable

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.

jqGridRender.php

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

Format date columns when exporting

The following options will be added in the 'default_export_buttons_options':

  • srcDateFormat: source (database) date format (default value: Y-m-d)
  • newDateFormat: new date format (default value: m/d/Y)

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')))

Grouping / TreeGrid question

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.