Welcome Guest, Not a member yet? Register   Sign In
Flexigrid - Lightweight but rich data grid

[eluser]zend[/eluser]
how to load two tables from the database and merge them?
I have two tables Users and Groups I want to show customers and to show what group they belong to the Administrator or Normal User

function JOIN is not work in fg

[eluser]Basketcasesoftware[/eluser]
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.

[eluser]indrajit_l[/eluser]
this is not working in CI 2.0, can u pls post an example for CI 2.0

thanks

[eluser]Basketcasesoftware[/eluser]
Please see my reply in the other Flexigrid thread you posted this question in.

[eluser]german.zvonchuk[/eluser]
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.
Code:
SELECT
  CONCAT(IFNULL(client_name, ""), " ", IFNULL(CONCAT(SUBSTRING(client_patronymic, 1, 1), "."), ""), " ", 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:
Code:
SELECT
  CONCAT(IFNULL(client_name, ""), " ", IFNULL(CONCAT(SUBSTRING(client_patronymic, 1, 1), "."), ""), " ", 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

[eluser]- Obonk -[/eluser]
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 :
Code:
$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 :

Code:
$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

[eluser]Unknown[/eluser]
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?

Code:
$(document).ready(function() {
$("#newTable").flexigrid({
url: 'agendaTipoAppuntamentoInitJson.do',
dataType: 'json',
colModel : [
  {display: 'ID',             name : 'idTipoAppuntamento', width : 40, sortable : false, align: 'center', hide: true},
  {display: 'Codice',         name : 'codice', width : 60, sortable : false, align: 'left'},
  {display: 'Descrizione',   name : 'descrizione', width : 130, sortable : false, align: 'left'},
  {display: 'Descr. breve',   name : 'descrBreve', width : 80, sortable : false, align: 'left'},
  {display: 'Colore',         name : 'colore', width : 80, sortable : false, align: 'left'},
  {display: 'ID Struttura',    name : 'idStruttura', width : 60, sortable : false, align: 'left', hide: true},
  {display: 'Descr. Struttura',   name : 'descrizioneStruttura', width : 150, sortable : false, align: 'left'},
  {display: 'ID Spec',     name : 'idSpecializzazione', width : 60, sortable : false, align: 'left', hide: true},
  {display: 'Descr. Spec',    name : 'descrizioneSpecializzazione', width : 150, sortable : false, align: 'left'},
  
  
  ],
usepager: true,
title: 'Gestione tipi appuntamento',
useRp: true,
rp: 15,
showTableToggleBtn: true,
width: 'auto',
height: 'auto',
singleSelect: true,
click: editMe

}); });

This is def. for table.

Thanks...

[eluser]anthrotech[/eluser]
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.


[quote author="Kevin Kietel" date="1209384992"][quote author="Roberto Miguez" date="1209204323"]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.[/quote]

@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:
Code:
SELECT id,iso,name,printable_name,iso3,numcode FROM country WHERE `name` LIKE 'F%'

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

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

Hope this will help you and other users![/quote]

[eluser]Unknown[/eluser]
Nice, very nice

[eluser]Unknown[/eluser]
I can't set my database properties instead of the example codes.
Whereas I replace my database properties as well in the codes.
should I change the codes of the .js or .css files too?
Any help is appreciated.




Theme © iAndrew 2016 - Forum software by © MyBB