Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    cserfoss
    @cserfoss
    Hi, not sure if this is a good place for this or not, but I'm looking for some help with setCallback in Nayjest/Grids. Here is a pastebin with the code: http://pastebin.com/9KLZjwif The question is how I can embed the 'id' field in the link (instead of the $val) passed value. Thanks for your time!
    Vitaliy Stepanenko
    @Nayjest
    Hi!
    Callback can accept DataRow instance and you can extract any value from DataRow.
    Example:
    $column->setCallback(function($val, DataRow $row)
        {
            $icon  = "<span class='glyphicon glyphicon-user'></span>&nbsp;";
            $src = $row->getSrc();
            return $icon . HTML::linkRoute(
                'users.profile',
                $src->login,
                $src->id]
            );
        })
    cserfoss
    @cserfoss
    Ahhh... most excellent! Thanks: both for the code snippet as well as Grids -- it's been a huge time saver!
    Marius Iversen
    @P1llus
    Hello, I was wondering if there is any hints if i could use the grid for huge json responses? Lets say i can call a "list all network devices", and i want to get a hostname and ip for each, and list it in a grid. Could this be used for this, or is it just for databases?
    Marius Iversen
    @P1llus
    Is it easy enough as to point the src to something other than a eloquent model for example?
    Vitaliy Stepanenko
    @Nayjest
    @P1llus it's easy in view-components/grids (this project is a framework-agnostic successor of nayjest/grids) see https://github.com/view-components/grids
    dtyson
    @dtyson
    First I want to say the grid is great! Are there any plans to add row/table edit functionality to the grids?