Part of the EllisLab Network
   
68 of 68
68
Flexigrid - Lightweight but rich data grid
Posted: 08 February 2011 07:41 AM   [ Ignore ]   [ # 671 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  474
Joined  01-30-2011

That’s because Flexigrid handles it’s own database queries. It doesn’t bother with models. At least that’s what I make out from reading what little documentation that is there. It breaks the MVC pattern.

 Signature 

This is the wonderful logo InsiteFX did for me. I had to scale it for this site. But his work is worth showing off.

Profile
 
 
Posted: 16 February 2011 03:15 AM   [ Ignore ]   [ # 672 ]  
Summer Student
Total Posts:  4
Joined  02-03-2011

this is not working in CI 2.0, can u pls post an example for CI 2.0

thanks

Profile
 
 
Posted: 16 February 2011 03:55 AM   [ Ignore ]   [ # 673 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  474
Joined  01-30-2011

Please see my reply in the other Flexigrid thread you posted this question in.

 Signature 

This is the wonderful logo InsiteFX did for me. I had to scale it for this site. But his work is worth showing off.

Profile
 
 
Posted: 22 February 2011 10:13 AM   [ Ignore ]   [ # 674 ]  
Summer Student
Total Posts:  9
Joined  01-05-2011

Hello, codeigniter developers.
I have a problem with Flexigrid. I have a table with some fields which feeds flexigrid. When I run the below code, I get some fields under the flexigrid table to search by fields. When I select client_fullname, it tries to search client_fullname field on the selected table but there is no such field. I know I can do it using subquery but I don’t know how to do it with active records.

SELECT
  CONCAT
(IFNULL(client_name""), " "IFNULL(CONCAT(SUBSTRING(client_patronymic11), "."), ""), " "IFNULL(client_lastname"")) AS client_fullname,
  
DATE_FORMAT(reg_date"%Y-%m-%d %H:%i") AS reg_date,
  
DATE_FORMAT(date_issue_login"%Y-%m-%d %H:%i") AS date_issue_login,
  
login,
  
agent_login
FROM 
(account)
WHERE login '151501'
ORDER BY reg_date DESC
LIMIT 1 

Active Record code is below:

SELECT
  CONCAT
(IFNULL(client_name""), " "IFNULL(CONCAT(SUBSTRING(client_patronymic11), "."), ""), " "IFNULL(client_lastname"")) AS client_fullname,
  
DATE_FORMAT(reg_date"%Y-%m-%d %H:%i") AS reg_date,
  
DATE_FORMAT(date_issue_login"%Y-%m-%d %H:%i") AS date_issue_login,
  
login,
  
agent_login
FROM 
(account)
WHERE login '151501'
AND `client_fullname` LIKE "%Testname%"
ORDER BY reg_date DESC
LIMIT 1 
Profile
 
 
Posted: 13 June 2011 09:26 PM   [ Ignore ]   [ # 675 ]  
Summer Student
Total Posts:  13
Joined  08-11-2009

I have successfully implement Flexigrid with CI 2.0.2. but my problem come when I connected to more than with 1 database on CI.

When I use flexigrid with :

$this->db->select('schedule.id_schedule, schedule.group AS groups');
$this->db->from($table_name);

$this->flexigrid->build_query(); 

The flexigrid work perfectly, but when i use flexigrid with another database connection :

$this->dbsms $this->load->database('sms'TRUE);
$this->dbsms->select('schedule.id_schedule, schedule.group AS groups');
$this->dbsms->from($table_name);

$this->flexigrid->build_query(); 

The flexigrid Limit, Sort & search is not working.

is there some bugfix for this? I hope some one could help me.

Thanks alot

Profile
 
 
Posted: 15 November 2011 01:47 AM   [ Ignore ]   [ # 676 ]  
Summer Student
Total Posts:  8
Joined  08-27-2010

Hi all,

    I am not sure whether I am posting my question in right area.

    I am facing a problem with datepicker along with flexigrid. I have view page in which I have a flexigrid and also datepicker field. My datepicker not working and got error: datepicker is not a function.

Please help me
Thanks in advance
iijb

Profile
 
 
Posted: 17 January 2012 04:01 PM   [ Ignore ]   [ # 677 ]  
Summer Student
Total Posts:  1
Joined  01-17-2012
paulopmx - 08 April 2008 03:38 AM
wish_bear - 08 April 2008 07:30 AM

How can I integrate a code where a downloadable link is listed in the table like an enitities listed for (e.g. Printable_Name) is a link? How can I do that?...

2 ways:

1. You can send the data with a link already in it. This is easier if your not into Javascript. Just remember to handle the quotes and double quotes.

2. In the colModel

{display'Printable Name'name 'printable_name'width 120sortable truealign'left'}

add a property called process

{display'Printable Name'name 'printable_name'width 120sortable truealign'left'processmakeLink}

then create a function with the name makeLink

function makeLink(celDiv)
{
       
$(celDiv).html('<a href="thisisalinkfolder/' + $(celDiv).html() + '">Link</a>');

The assumption here is that what ever data you are passing to that column is what you need to create your link.

Hope this helps. grin

I have used both methods to wrap the text with DOM elements.  The issue I am having is that doing so it breaks the column resizing.  The column header width and column width get out of sync until you hit the refresh button.

The first method I used was exactly like you did above, the second was modifying my json with a div element and title so I could display a tooltip on hover.  Both methods work great except for the column resizing.  The issue does not exist with just the text.  Any suggestions?  Is there something else I need to modify?

The width and height of the grid are set to ‘auto’ if that helps.

Profile
 
 
Posted: 30 January 2012 11:01 AM   [ Ignore ]   [ # 678 ]  
Summer Student
Total Posts:  1
Joined  01-30-2012

Hi to all…

I started to use FlexiGrid few weeks ago and I am preety happy with functionality of it.

Have one issue and need someone to help me how to solve it, and on the net I didn’t find any example of this. The problem is that I have in one column of table color that is represented by name or code (red, green etc.). I need to color that cell with color that is in it. Is it possible to do that in Flexigrid?

$(document).ready(function() {
 
$("#newTable").flexigrid({
 url
'agendaTipoAppuntamentoInitJson.do',
 
dataType'json',
 
colModel [
  {display
'ID',             name 'idTipoAppuntamento'width 40sortable falsealign'center'hidetrue},
  
{display'Codice',         name 'codice'width 60sortable falsealign'left'},
  
{display'Descrizione',   name 'descrizione'width 130sortable falsealign'left'},
  
{display'Descr. breve',   name 'descrBreve'width 80sortable falsealign'left'},
  
{display'Colore',         name 'colore'width 80sortable falsealign'left'},
  
{display'ID Struttura',    name 'idStruttura'width 60sortable falsealign'left'hidetrue},
  
{display'Descr. Struttura',   name 'descrizioneStruttura'width 150sortable falsealign'left'},
  
{display'ID Spec',     name 'idSpecializzazione'width 60sortable falsealign'left'hidetrue},
  
{display'Descr. Spec',    name 'descrizioneSpecializzazione'width 150sortable falsealign'left'},
  
  
  
],
 
usepagertrue,
 
title'Gestione tipi appuntamento',
 
useRptrue,
 
rp15,
 
showTableToggleBtntrue,
 
width'auto',
 
height'auto',
 
singleSelecttrue,
 
clickeditMe
 
}
); }); 

This is def. for table.

Thanks…

Profile
 
 
Posted: 24 April 2012 10:29 AM   [ Ignore ]   [ # 679 ]  
Summer Student
Total Posts:  21
Joined  12-12-2007

Kevin - How did you get Pagination to work??? I think my issue may be related to a joined table query. But I am not sure how to get Pagination to work. Please advise.

Kevin Kietel - 28 April 2008 07:16 AM
Roberto Miguez - 26 April 2008 05:05 AM

Trying the example made by Kevin Kietel at http://sanderkorvemaker.nl/test/flexigrid/ I saw that the search based on letters doesn’t work. This is a great functionality. Can anyone help me to solve this issue? I tried but I don’t know what to do.

@Roberto:

I’ve updated the example on http://sanderkorvemaker.nl/test/flexigrid/ (the zip file is also updated)
The search based on letters is functional now. You can use the letters on the top of the grid to find items that start with a certain letter. The search criteria are set by the select box in the quick search bar. So when the quick search bar is set to ‘name’, and you press the letter F, the MySQL query will be like:

SELECT id,iso,name,printable_name,iso3,numcode FROM country WHERE `nameLIKE 'F%' 

When you want to see all numerical items, the MySQL query will be:

SELECT id,iso,name,printable_name,iso3,numcode FROM country WHERE `nameREGEXP '[[:digit:]]' 

Hope this will help you and other users!

Profile
 
 
Posted: 18 May 2012 03:42 AM   [ Ignore ]   [ # 680 ]  
Summer Student
Avatar
Total Posts:  1
Joined  05-18-2012

Nice, very nice

Profile
 
 
   
68 of 68
68