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

[eluser]Unknown[/eluser]
I'm wondering if its possible to make a flexigrid thats based on a table column sortable? Is that possible? How/where do I add those options?

[eluser]adwin[/eluser]
Paulo:
is there any rss feed so that when you update the flexigrid, we can get the news Smile [ instead of visiting this forum everyday ] Wink

[eluser]gius[/eluser]
[quote author="adwin" date="1217769774"]Paulo:
is there any rss feed so that when you update the flexigrid, we can get the news Smile [ instead of visiting this forum everyday ] Wink[/quote]

Do you mean the RSS 2.0 button in the page footer? (or the RSS icon in the address bar - depends on your browser).

[eluser]marcd[/eluser]
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... Sad(

http://www.sigmawidgets.com/products/sig...aging.html



anybody an idea?
would be a very great feature to flexigrid with combining to form usage.


bye,
marcd

[eluser]justinkelly[/eluser]
[quote author="justinkelly" date="1217491556"][quote author="Armorfist" date="1217006496"][quote author="justinkelly" date="1216961466"][quote author="paulopmx" date="1216905639"]

Hi guys,

I didn't really design flexigrid to use % sizes as the dragndrop and resizing functions are dependent on accurate per pixel measurements.

Paulo[/quote]

Thanks for the reply Paulo

its more of an visual appeal factor - i use 100% width grid for my project and having columns in px will leave a blank space in the grid on a larger screen (which doesn't look to nice)

from what i can remember open rico grid does some funky % -> px calculation based on grid size to handle resize etc and columns based on %

question: is there an easy way to find the px width of a flexigrid? - if so then i can look at writing a % -> px type conversion type

If anyone else has any suggestions i would appreciate hearing them

Cheers

Justin[/quote]

Hello Justin,
This is actually very simple:

With jquery COOKIE plugin, I retrieve the screen resolution width and store it in a cookie:
Code:
[removed]
$(document).ready(function() {
    $.cookie('scrres', screen.width);
});
[removed]

Then with PHP all you have to do is get that cookie and calculate the column size based on the percentage.

Code:
function calculate_column_size($column_size)
    {
        $screen_res = get_cookie('scrres'); //This is a codeigniter function from the "cookie" helper
        if ($screen_res != FALSE)
            $usable_screen = ($screen_res);
        else
            $usable_screen = (1024); //Default resolution
        
        return ($column_size*($usable_screen/100)); //Calculate in pixels and return
    }

You also can probably do this with javascript only.
Hope it helps![/quote]

Thanks Armorfist!

I will give this a go

Cheers

Justin[/quote]

just an update

- i got this working by using the jquery dimensions (http://brandonaaron.net/docs/dimensions/) plugin
Code:
var grid_width = $('.col').width();

where .col if the class of the div that the grid is in

then use do some maths on grid_width and put the resulting variables in the col_width section in the colModel

Thanks again!!

note: flexigrid will now be the grid used in Simple Invoices (www.simpleinvoices.org) replacing the original open rico grid and thankfully replacing the need for extjs grid (i had converted most grids to extjs but this is much nicer and smaller!!)

Cheers

Justin

[eluser]Armorfist[/eluser]
Nice! Thanks

[eluser]unexpectedly[/eluser]
Hi Marcd,

Hmmm, I'm having the same issue. To get the checkboxes working, I added an onclick() to them and the handler will add the checkbox's ID to a global array. btw, to get to the same checkboxes from your functions, you need to use $('input#the-id'), as $('#the-id') wouldn't work for me. And in case anyone reading along is as new to javascript as I, use .parent() (maybe more than once) to apply a class styling to a row.

I don't know how to get a call back for after the reload. I believe that the row is written near line 480, so if anything, maybe I'll hack another parameter for my external function to manipulate the row. ??

I would definitely appreciate some direction if anyone has ideas.

Thanks!
Chris

[quote author="marcd" date="1217868129"]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... Sad(

http://www.sigmawidgets.com/products/sig...aging.html

anybody an idea?
would be a very great feature to flexigrid with combining to form usage.

bye,
marcd[/quote]

[eluser]Armorfist[/eluser]
[quote author="marcd" date="1217868129"]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... Sad(

http://www.sigmawidgets.com/products/sig...aging.html



anybody an idea?
would be a very great feature to flexigrid with combining to form usage.


bye,
marcd[/quote]

I'm also trying to do this but without success. If anyone has an idea please share.

[eluser]marcd[/eluser]
Hi!

Well, I managed to add a form element like checkbox or radio button.

I added at post.php in JSON Part my checkbox function:
Code:
$json .= "cell:['<input type=\"checkbox\" name=\"checkbox[]\" value=\"".$row['NAME']."\"/>','".$row['ROW']."','".$row['NAME']."'";

with this and an this line in colModel at index.php:
Code:
{display: 'BOX',name: 'check', width : 40, sortable : true, align : 'center'},

I can show the checkbox.
When adding a form tag in HTML part I can post this values.

But I still cannot store checkbox values when paging. selected checkboxes are unselected after clicking "forward" / "backward". cross postback does not work and I have no idea how to implement this.

Anyone an idea????


bye,
marc

[quote author="Armorfist" date="1218121172"][quote author="marcd" date="1217868129"]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... Sad(

http://www.sigmawidgets.com/products/sig...aging.html



anybody an idea?
would be a very great feature to flexigrid with combining to form usage.


bye,
marcd[/quote]

I'm also trying to do this but without success. If anyone has an idea please share.[/quote]

[eluser]bao.vu[/eluser]
[quote author="paulopmx" date="1217307712"][quote author="bao.vu" date="1217306067"][quote author="TheJayL" date="1217288265"]When you say one page, you mean one physical page of paper, or do you mean one page like the pager?

If its one page, as in the pager, then the query is still using LIMITED, or it is not using the new data, but the data the list was created with.[/quote]

One page of the physical paper. All data on my table displays in one page of the grid (I don't have to click next page). But when I print, only the portion that is on the first page printed. I hope I explained that well.[/quote]

Add this to your html

Code:
<style media="print">
        .bDiv
            {
            height: auto !important;
            }
    </style>

Let me know if it helps.[/quote]

Sorry for the late reply but that did not work either. I have about 500 record to show on the table. The table displays find, but printout was cut off at the section that would fit a physical page.




Theme © iAndrew 2016 - Forum software by © MyBB