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

[eluser]Charles Bandes[/eluser]
I have a dataset that needs color-coding - is there a way to change the text (or bg) color on a line-by-line basis with flexigrid? I tried putting style tags into my json object, but that didn't work.

[eluser]Unknown[/eluser]
I love Flexigrid. It helps me a lot.
I have made some modification for my own needs. Like,
1. single select
2. toggle the default display of search bar wiht init option
3. auto search. toggle by init option
4. a minor bug of Next button when using JSON. (it should do math add instead of string cat).

My fixes are just workable solutions and not perfect. I think some guys may need the same features. I also think paulopmx can do better integration than me in the after version. The forum can't attach .js and .zip. Can some one tell me how to feedback the code?

[eluser]paky[/eluser]
can I send a specific query to flaxgrid with POST data ?

thanks

[eluser]paulopmx[/eluser]
[quote author="Charles Bandes" date="1211502179"]I have a dataset that needs color-coding - is there a way to change the text (or bg) color on a line-by-line basis with flexigrid? I tried putting style tags into my json object, but that didn't work.[/quote]

The easy way is to wrap your text in a span, then add a class in the span.

Then on your css, add rules for your classes.

There is a javascript way, but let me know if this works out for you first.

[eluser]paulopmx[/eluser]
[quote author="paky" date="1211486302"][quote author="SeanRock" date="1211485190"]Hi

i successfully loaded a plain text file that contained some json data. however i had to amended the flexigrid.js file to accomplish this. you could add another option that would indicate if you are loading data from a page such as html, php, aspx or a text file.

if you look in the flexigrid.js file (approx line 599) where the $.ajax... call is made. i replaced this with $.getJSON('test.json',function(data){g.addData(data);

and it worked fine. so this part of the code could be changed to allow for this....

if (loading plain text)
load using getJSON
else
load using ajax


but obviously paging and sortingt (unless done on the client) would not be applicable.[/quote]

If I want another parameter ... for example ... query_post_fromfile:'AND user.age=3 AND user.niick=bob' ... how can I do it?
In post.php can I read it with $_POST[] .... Smile
thanks[/quote]

hi paky,

This is probably one of the more important questions I failed to answer.

Anyway, please check this sample HTML where I attached a form to flexigrid.
http://webplicity.net/flexigrid/sample1.html

paulo

[eluser]paulopmx[/eluser]
[quote author="Max Chan" date="1211523631"]I love Flexigrid. It helps me a lot.
I have made some modification for my own needs. Like,
1. single select
2. toggle the default display of search bar wiht init option
3. auto search. toggle by init option
4. a minor bug of Next button when using JSON. (it should do math add instead of string cat).

My fixes are just workable solutions and not perfect. I think some guys may need the same features. I also think paulopmx can do better integration than me in the after version. The forum can't attach .js and .zip. Can some one tell me how to feedback the code?[/quote]

Great work Max.
Your only option is to upload it to a server, and add a link here.

[eluser]paky[/eluser]
Quote:hi paky,

This is probably one of the more important questions I failed to answer.

Anyway, please check this sample HTML where I attached a form to flexigrid.
http://webplicity.net/flexigrid/sample1.html

paulo

great paulo .. then in same form send all POST data .. ok ... but the name of all parameter create from addFormData() function ?
If I have many
<input name="xx1" type="text">
<input name="xx2" type="text">
<input name="xx3" type="text">
how call it in post.php file ?

thanks Smile

[eluser]paulopmx[/eluser]
[quote author="paky" date="1211550297"]
Quote:hi paky,

This is probably one of the more important questions I failed to answer.

Anyway, please check this sample HTML where I attached a form to flexigrid.
http://webplicity.net/flexigrid/sample1.html

paulo

great paulo .. then in same form send all POST data .. ok ... but the name of all parameter create from addFormData() function ? If I have many <input type="text"> how call it in post.php file ?

thanks Smile[/quote]

Just add as many form fields as you want. serializeArray will base the POST name of each variable base on the 'name' attribute of each input tag. So if i add a field with <input type='hidden' name='customerid' value='1' /> then you can get it on the server like $_POST['customerid']. or if your using codeigniter $this->input->post('customerid').

[eluser]paky[/eluser]
Quote:Just add as many form fields as you want. serializeArray will base the POST name of each variable base on the 'name' attribute of each input tag. So if i add a field with <input type='hidden' name='customerid' value='1' /> then you can get it on the server like $_POST['customerid']. or if your using codeigniter $this->input->post('customerid').

mmm.... :| I must have form and Flexgrid in same page .php for use your sample.... ok Wink thanks

[error]
I have a selectbox with (name="sel_surname") in post2.php read it with this line
Code:
$x= $_POST['sel_surname'];
and the value put him in a textarea ... strange ... flexgrid go in loop .... Sad
why ? Sad

[eluser]paulopmx[/eluser]
[quote author="paky" date="1211555136"]
Quote:Just add as many form fields as you want. serializeArray will base the POST name of each variable base on the 'name' attribute of each input tag. So if i add a field with <input type='hidden' name='customerid' value='1' /> then you can get it on the server like $_POST['customerid']. or if your using codeigniter $this->input->post('customerid').

mmm.... :| I must have form and Flexgrid in same page .php for use your sample.... ok Wink thanks

[error]
I have a selectbox with (name="sel_surname") in post2.php read it with this line
Code:
$x= $_POST['sel_surname'];
and the value put him in a textarea ... strange ... flexgrid go in loop .... Sad
why ? Sad[/quote]

You just lost me. Can't understand anything you just said.

But if you give me a url that i can view, maybe i can check it out.

Paulo




Theme © iAndrew 2016 - Forum software by © MyBB