nope. sorting and paging are left to the remote server. that’s why code is so small.
Ok… thanx for the answer… I’ll try it the other way then…
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 28, 2008 10:13am
Subscribe [82]#631 / Nov 09, 2008 1:43am
nope. sorting and paging are left to the remote server. that’s why code is so small.
Ok… thanx for the answer… I’ll try it the other way then…
#632 / Nov 12, 2008 7:54am
I’m kindly AND DESPERATLY asking You for help.
I am trying for several nights, without any sleep, to run flexigrid from CI but,
message:
>>>>>Processing, please wait ... flexigrid <<<<<< :gulp:
is killing me. I’m going to be tottaly crazy. I suppose i am very pain in the @#@!$.
I have already red all forums and posts
and i still can’t to resolve a problem.
I received data from ajax_model and ajax also, but in browser I can not see data in the grid.
My url in config is
<a href="http://sef/declan/">http://sef/declan/</a> and i call ajax contoller with baseurl.‘index.php/ajax’
and i load database in autoload.php
It must be some reason it doesn’t work, please try to help me, i will appriciate it.
Tank You in advanced,
Please help,
Tks in advanced
B.Grebenar
#633 / Nov 20, 2008 3:12am
Hello marcd,
I am using this nice grid and also looking for such a feature.
Have you ever got it done? I am not sure this can be done with this grid or not. It’s important to me.
Hi there!
I dont know if anybody already “solved” this problem I have…
Does anybody know how to add checkboxes to this grid with storing the selected values while paging?
I mean when you select some checkboxes on page 1 and then go further to page 2, select boxes there AND THEN switch back to page 1: all before selected boxes should be selected again…
something like here… but I unfortunately cannot transfer this to flexigrid… :((
http://www.sigmawidgets.com/products/sigma_grid2/demos/example_checkbox_paging.html
anybody an idea?
would be a very great feature to flexigrid with combining to form usage.
bye,
marcd
#634 / Nov 21, 2008 7:19am
Hey there,
First off, amazing app. This data grid is really excellent. Thanks 😊
I need a little help with a small addon I’m trying to write for it and I wondered if you have time to point me in the right direction.
Basically, I’m using it to return lists of results from a filter. I’d like to have it included into the form so that it updates over the ajax (like your paging and search features) but can’t see how to include my checkboxes and other form values into the post that is sent over ajax along with Flexigrid’s values
Cheers
#635 / Nov 27, 2008 10:12pm
Hello guys. First of all, sorry for my bad english.
Good script. Very good. But I have a problem. If you can, please help me to understand, what a problem…
I have javascript error in IE7.
Line: 796
Char: 6
Error: ‘display’ is null or not an obect
Code: 0
I use XML and in post.php show me normal XML from my SQL table.
There are my javascript code:
Problem in colModel ‘display’ variable. If delete it, IE7 don’t show any error, but FlexiGrid don’t working right. In Opera FlexiGrid showing, but I see only a grid with repeat animation (loading) and nothig more, i mean my data from MYSQL table.
Help plz, I need to using this folk! Respect to developer.
<table id=“flex1” [removed]></table>
[removed]
$(”#flex1”).flexigrid
(
{
url: 'post.php',
dataType: 'xml',
colModel : [
{display: 'id', name : 'id', width : 100, sortable : true, align: 'left'},
{display: 'name', name : 'name', width : 100, sortable : true, align: 'left'},
{display: 'title', name : 'title', width : 100, sortable : true, align: 'left'},
{display: 'status', name : 'status', width : 100, sortable : true, align: 'left'},
],
buttons : [
{name: 'Add', bclass: 'add'},
{name: 'Delete', bclass: 'delete'},
{separator: true}
],
searchitems : [
{display: 'name', name : 'name'},
{display: 'title', name : 'title', isdefault: true}
],
sortname: “id”,
sortorder: “asc”,
usepager: true,
title: ‘Directory’,
useRp: true,
rp: 15,
showTableToggleBtn: true,
width: 700,
height: 200
}
);
[removed]
#636 / Nov 28, 2008 5:19am
@Leonid. Just a small note, as I noticed after posting here myself. The Flexigrid forums have moved to
http://groups.google.com/group/flexigrid/
You’re more likely to get a response there.
#637 / Nov 29, 2008 7:36pm
kadanis
Big thx!
#638 / Feb 13, 2009 10:02am
Hi guys, I´m new here and in my website I´m starting to use this amazing plugin. With the jqModal I´m using the Add/Delete/Edit buttons using a popup and sending the information by ajax. This is working fine.
But I came across with a question ( sorry if this has been answered but I didnt see):
Is there a way to allow the user to select just one row?
Does someone here implemented it?
#639 / Feb 23, 2009 3:32pm
awesome job with this script paulo! just wondering…is there a way to hide /toggle the grid by default when the page loads?
just place the table in a div then hide that div
well i dont want to hide it completely, i simply want the grid hidden, with only the title and toggle button visible…like what you see when you click on the toggle button.
try this jQuery code that adds a class after calling the grid
$('.flexigrid').addClass('hideBody');
dont work :(
I tried this :
function Hidegrid($id_grid){
echo "<javascript>\r\n";
echo "\t$(function() {\r\n";
echo "\t$($('#".$id_grid."').get(0).grid.gDiv).addClass('hideBody');\r\n";
echo "\t$('style[title=\"hideonload\"]').remove();\r\n";
echo "\t});\r\n";
echo "</javascript>\r\n";
}.. and it work perfectly 😊
#640 / Feb 25, 2009 3:52pm
Is there anyway to make de Columns with a width equals a percentage value?
Like width: 60%
#641 / Mar 20, 2009 11:21am
Hey all I am New to flexigrid but so Far Loving it. however I am using the json data type and the only thing I cant seem to figure out is if I have an object selected in the grid how do I get the value of the selected column / row. below is my code and my json.
$("#flex2").flexigrid
(
{
url: '/utils/Renderxml/permsearch?
id=200&format=JSON¶m=roles&searchparam;=',
dataType: 'json',
colModel : [
{display: 'ID', name : 'id', width:
40},
{display: 'User / Role ID', name :
'username', width: 80, sortable : false, align: 'left'}
],
/* searchitems : [
{display: 'Username', name :
'username'},
{display: 'Assigned', name : 'assigned', isdefault: false}
],
sortname: "username",
sortorder: "asc",*/
//usepager: false,
title: 'Results',
//useRp: false,
//rp: 15,
//showTableToggleBtn: false,
width: 'auto',
height: 'auto'
//colResize: false
}
);$("#rolesearch").click(function(){
var visibleState = true;
$("#rolesearchdialog").css("visibility",(visibleState ? "visible" :
"hidden"));
$("#flex2").flexOptions({url: '/utils/Renderxml/permsearch?
id=200&format=JSON¶m=roles&searchparam;=' + document.getElementById
('role').value});
$("#flex2").flexReload();
$("#rolesearchdialog").dialog('open');
});here is my json
————————————————————————————————
{
page: 1,
total: 1,
rows: [
{id:'1007',cell:['1007','testrole']}]
}#642 / Mar 22, 2009 7:07pm
Hi there
I want to find a grid that can solve the following problem for me. Say I have a retailer and that retailer can sell product_types I would like to display 2 grids. The first displays all product_types the retailer sells and the second with all the product_types )(excluding the ones he is already selling for).
Then I would like to have 4 buttons <<, <, >, >> so I can move product_types between the controls. Would this be possible/ easy to do with this grid, I have several insteances where I want to implement this dual grid control.
If not can someone point me in the right direction please.
Kind regards
#643 / Mar 27, 2009 12:12am
Hey guys,
I was trying the new flexigrid and it worked great. I am happy to use the tool. Tried first with my table, it didn’t work. Then I just uploaded the code and it did work great. I think its a great utility. But, the delete button was unable to delete the first row. I went into the ajax.php code for function deletec and corrected the code as shown below:
foreach($countries_ids_post_array as $index => $country_id)
if (is_numeric($country_id) && $country_id >= 1)
$this->ajax_model->delete_country($country_id);
The “=” sign is missing in the code that prohibits deleting the first row.
Also, has anybody got simple instructions on implementing flexigrid? I believe it will be great if it has an automated code generation tool. I hope I will be successful on my next try.
Thanks.
#644 / Apr 01, 2009 1:42am
I could implement flexigrid properly. There were some errors on my controller.
Thanks.
#645 / Apr 10, 2009 3:33am
Hi,
how to add new data items to flexigrid…..
i have 2 text boxes and i want both the values inside the grid when i submit them or add them
here is my code.pls help
<?
mysql_connect(“localhost”,“root”,”“);
mysql_select_db(“lab”)or die(“CANNOT CONNECT To DATABASE”.mysql_error());
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html >
<head>
<meta http-equiv=“content-type” content=“text/html; charset=iso-8859-1” />
<title>Flexigrid</title>
<link rel=“stylesheet” type=“text/css” href=“css/flexigrid.css” />
[removed][removed]
[removed][removed]
[removed]
function getXMLHTTP() { //fuction to return the xml http object
var xmlhttp=false;
try{
xmlhttp=new XMLHttpRequest();
}
catch(e) {
try{
xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e1){
xmlhttp=false;
}
}
}
return xmlhttp;
}
$(document).ready(function(){
//$('#test_n').change(function() {
//$('#test_n').trigger('change');
//if($('#test_n option:selected').val()=="test")
//{
// var fname=$('#test_n').val();
//$('form').submit(function(){
//var fname=$('#test_n option:selected').val();
//jQuery("#flex1").flexReload();
//}
//else
//{
// var fname="";
// }
$(”#flex1”).flexigrid
(
{
/* $("form#submit").submit(function() {
// we want to store the values from the form input box, then send via ajax below
var fname = $('#fname').attr('value');
var lname = $('#lname').attr('value');
$.ajax({
type: "POST",
url: "ajax.php",
data: “fname=”+ fname + “& lname=” + lname,
success: function(del){
$('form#submit').hide();
$('div.success').fadeIn();
}
});
return false;
});
});*/
//type: “POST”,
//url: ‘add.php’,
dataType: ‘json’,
colModel : [
{display: 'Test Name', name : 'test', width : 180, sortable : true, align: 'left'},
{display: 'Test Dept ID', name : 'test1', width : 70, sortable : true, align: 'center'}
],
buttons : [
{name: 'Add', bclass: 'add', onpress : test},
{name: 'Delete', bclass: 'delete', onpress : test},
{separator: true}
],
usepager: true,
title: ‘TEST LIST’,
useRp: true,
rp: 10,
showTableToggleBtn: true,
width: 700,
height: 255
}
);
//return false;
//}
//else
//{
$('form').submit(function(){
var fname=$('#test').val();
var fname1=$('#test1').val();
jQuery('#flex1').flexOptions({newp:1, params:[{name:'type', value: fname},{name:'sal',value:fname1}]});
jQuery(”#flex1”).flexReload();
return false;
//}
});
});
function sortAlpha(com)
{
jQuery('#flex1').flexOptions({newp:1, params:[{name:'letter_pressed', value: com}]});
jQuery(”#flex1”).flexReload();
}
function test(com,grid)
{
if (com=='Delete')
{
if($('.trSelected',grid).length>0){
if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){
var items = $('.trSelected',grid);
var itemlist ='';
for(i=0;i<items.length;i++){
itemlist+= items.test_id.substr(3)+",";
}
$.ajax({
type: "POST",
dataType: "json",
url: "delete.php",
data: "items="+itemlist,
success: function(data){
alert〈"Query: "+data.query+" - Total affected rows: "+data.total〉;
$("#flex1").flexReload();
}
});
}
} else {
return false;
}
}
else if (com==‘Add’)
{
alert〈'Add New Item Action'〉;
}
}
[removed]
</head>
<body align=“center” bgcolor=”#ffffff”>
<form method=‘post’ action=’<? $_SERVER[‘PHP_SELF’] ?>’>
<div id=“statediv”>Test Name:
<input type=“text” name=“test” id=“test” />
<input type=“text” id=“test1” name=“test1”>
<input type=“submit” value=“submit” name=“submit”></div>
<table id=‘flex1’ [removed] ></table>
</form>
</body>
</html>