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

[eluser]dark_lord[/eluser]
[quote author="wish_bear" date="1207859592"][quote author="Armorfist" date="1207858400"]Glad I could help! Smile[/quote]
One more question?

How come my first column of my record does not display(e.g. ID)? It starts with the second column (e.g. Name)? What could be the problem with my code?[/quote]

yah I got it! hehehe.. sorry I miss that other ID.. hehe.. Thanks again.. cheers!

[eluser]dark_lord[/eluser]
[quote author="Armorfist" date="1207859874"]Did you modify the /system/application/controller/ajax.php controller? If so can you post the "foreach" code, the one that runs through all db query records?[/quote]

What about hiding a column(Hiding it by default)? Like for example the Printable name? any added parameter for that?

[eluser]Armorfist[/eluser]
Good call!
I forgot to add that option. Its easy to implement tho:

On the file system/application/helpers/flexigrid_helper.php on line 57

Replace:
Code:
$grid_js .= "{display: '".$value[0]."', ".($value[2] ? "name : '".$index."'," : "")." width : ".$value[1].", align: '".$value[3]."'},";


With:
Code:
$grid_js .= "{display: '".$value[0]."', ".($value[2] ? "name : '".$index."'," : "")." width : ".$value[1].", align: '".$value[3]."'".(isset($value[5]) && $value[5] ? ", hide : true" : "")."},";

Then, in the flexigrid.php controller, on the colModel array insert a new BOOLEAN value at the end, TRUE or FALSE:

E.g.
Code:
$colModel['id'] = array('ID',40,TRUE,'center',2,TRUE);

TRUE - Hidden
FALSE - Show

If you do not insert a value it will show by default.

E.g.
Code:
$colModel['id'] = array('ID',40,TRUE,'center',2);

I will add this later to the download zip.
Thanks

[eluser]ecarsted[/eluser]
Heya Paulo,

Sorry for the re-request ;

How do i get the row id so I can create a call to get the details for that record;

Code:
function yourfunction()
{
$(".selectrow").click(function(){
alert("HIT!");    (Something goes here to get the row id)
});
}

Eric

[eluser]dark_lord[/eluser]
Just an idea, anyway, Flexigrid rocks! Kudos Paulo! Good Job! :-)

: Just want to thank you all guys for the help. Y'all a master!

: By the way, suggest what about check box instead of highlighting? to check the record(s) before going to delete? Would that be possible, at least I can say, a user can verify or confirm easily that he/she is going to delete a or those records just by seeing a check in the tick box?

Would that be possible? Hope you can do that too, I want to do it, but "he,he,he," not a master like you guys... peace.V,,

Thanks and hope to see that feature.

[eluser]Unknown[/eluser]
Hi Paulo, Great Job! I have been looking into various grid frame works and yours is the best from what I have seen so far!

I got your 3rd example working with a php back end (php creating xml data). I would like to extend this to the next level and I am not sure what I should do here.

My task is to get a live data grid going..., I have a mysql table getting updated every second and I like that data to be pushed/pulled to the flexigrid.

I try to do the page refresh, but that is not efficient. Is there a way to update the table every 1second? Please let me know of any solutions. Any code snips will be much appreciated, as I am still learning java scripting.

Thanks,

Nikke,

[eluser]Synergiq[/eluser]
What's the largest amount of records anyone has used with this? I'm trying to use about 1200 but it's dying. I'm not sure if it's too much for the grid or if it's because I'm using asp and sybase so I cant use LIMIT.

[eluser]wiredesignz[/eluser]
@Synergiq, I have a paging class for vbscript if you're interested.

[eluser]paulopmx[/eluser]
[quote author="ecarsted" date="1207894246"]Heya Paulo,

Sorry for the re-request ;

How do i get the row id so I can create a call to get the details for that record;

Code:
function yourfunction()
{
$(".selectrow").click(function(){
alert("HIT!");    (Something goes here to get the row id)
});
}

Eric[/quote]

Where are you going to attach this event? to the process API?
Do you want to call the function when the user clicks the row or a cell or a link inside a cell?

[eluser]paulopmx[/eluser]
[quote author="thenike" date="1207909232"]Hi Paulo, Great Job! I have been looking into various grid frame works and yours is the best from what I have seen so far!

I got your 3rd example working with a php back end (php creating xml data). I would like to extend this to the next level and I am not sure what I should do here.

My task is to get a live data grid going..., I have a mysql table getting updated every second and I like that data to be pushed/pulled to the flexigrid.

I try to do the page refresh, but that is not efficient. Is there a way to update the table every 1second? Please let me know of any solutions. Any code snips will be much appreciated, as I am still learning java scripting.

Thanks,

Nikke,[/quote]

Let me see how about this, after running flexigrid you can call a function that you can assign to a setTimeout method:
Code:
myfunc();

function myfunc()
{

$('.flextable').flexReload();
setTimeout('myfunc()',1000);

}

something like that.




Theme © iAndrew 2016 - Forum software by © MyBB