![]() |
Flexigrid - Lightweight but rich data grid - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Flexigrid - Lightweight but rich data grid (/showthread.php?tid=7179) |
Flexigrid - Lightweight but rich data grid - El Forum - 04-08-2008 [eluser]paulopmx[/eluser] [quote author="ecarsted" date="1207691466"][quote author="paulopmx" date="1207673722"] Great Job Eric. I would have use different technique, but as long as it works for you, and that the plugin is useful for you then I'm happy about it. :-). Paulo[/quote] I am sure you would! I just started learning Javascript on Saturday, still having trouble with the prototypal nature of the language and syntax. I will say I have learned a ton from reading your code and stepping through it with the debugger. Coffees on the way, to say TY. Eric ps. BAH!, still got a bug, clobbered my paging. Lack of sleep kills. My mistake was to add page to params. What is the correct way to call flexOptions with just one option to set, i.e. page:1 ?[/quote] Hi Eric, Thanks for the coffee. you can set the page you want through flexOptions with this setting Code: $('#flex1').flexOptions({newp:1}); Flexigrid - Lightweight but rich data grid - El Forum - 04-08-2008 [eluser]ecarsted[/eluser] Hey Paulo, Code: $('#flex1').flexOptions({newp:1}); Fixed my paging problem. A couple questions for you. 1) Is it possible to set the table to only select one row? 2) How do I add an event to a row being selected/deselected? I am sure it is something like you posted before for the cell edit Code: function yourfunction() Code: function selectRowClassfunction(rowDiv) Eric Flexigrid - Lightweight but rich data grid - El Forum - 04-08-2008 [eluser]paulopmx[/eluser] [quote author="ecarsted" date="1207711338"]Hey Paulo, Code: $('#flex1').flexOptions({newp:1}); Fixed my paging problem. A couple questions for you. 1) Is it possible to set the table to only select one row? 2) How do I add an event to a row being selected/deselected? I am sure it is something like you posted before for the cell edit Code: function yourfunction() Code: function selectRowClassfunction(rowDiv) Eric[/quote] I really did not design it that way. It's possible to add an event to the cell that i'm passing to the process API, and you might be able to do it that way, although you can't stop the current behavior of the row from triggering, this can result from multiple events triggering when user clicks a row. But someone else has ask for this feature, and I while considering adding custom behavior API in the next release. It is still in beta anyway. Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]wardenik[/eluser] hey, i've just started using flexigrid, but found it quite weird that it doesn't work in IE7 with this type of table: <table class="flexme1"> <thead> <tr> <th width="100">Col 1</th> </tr> </thead> </table> <table class="flexme2"> <thead> <tr> <th>Day</th> </tr> </thead> </table> $('.flexme1').flexigrid(); $('.flexme2').flexigrid(); So, the first one works. The second does not if you don't specify width. That's quite weird especially when using jquery that should figure out the styling quite easily. Anyone had that problem? Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]paulopmx[/eluser] [quote author="wardenik" date="1207776149"]hey, i've just started using flexigrid, but found it quite weird that it doesn't work in IE7 with this type of table: <table class="flexme1"> <thead> <tr> <th width="100">Col 1</th> </tr> </thead> </table> <table class="flexme2"> <thead> <tr> <th>Day</th> </tr> </thead> </table> $('.flexme1').flexigrid(); $('.flexme2').flexigrid(); So, the first one works. The second does not if you don't specify width. That's quite weird especially when using jquery that should figure out the styling quite easily. Anyone had that problem?[/quote] Hi Wardenik, Yes width is a required setting. You can see it in my example 1 and example 2. Why? Because different browsers has different way of rendering a table without width definition, specially Internet Explorer. You will see that although I can render Flexigrid with the zero setting, that I do require some standards, like having a thead, a tbody and width definition. This will ensure that Flexigrid renders the same table similarly among its supported browsers. Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]wardenik[/eluser] Hey, That is cool that you do, but this is almost an inline style. It should not require (it can't!) an inline width specification. CSS is for that and you can set all styles you want in there and CSS is to ensure it is rendered in all browsers the same. Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]paulopmx[/eluser] [quote author="wardenik" date="1207791929"]Hey, That is cool that you do, but this is almost an inline style. It should not require (it can't!) an inline width specification. CSS is for that and you can set all styles you want in there and CSS is to ensure it is rendered in all browsers the same.[/quote] After the grid is generated you will see that the width property is removed. Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]wardenik[/eluser] [quote author="paulopmx" date="1207796283"][quote author="wardenik" date="1207791929"]Hey, That is cool that you do, but this is almost an inline style. It should not require (it can't!) an inline width specification. CSS is for that and you can set all styles you want in there and CSS is to ensure it is rendered in all browsers the same.[/quote] After the grid is generated you will see that the width property is removed.[/quote] Erm, indeed. but that is not the point ![]() I mean, i don't want to generate styling inside a datamodel because it is not the way it should be done and is pretty pointless. moreover, i can't see any reason for adapting the width automatically. if the user does not like it, he has the CSS for it. Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]paulopmx[/eluser] [quote author="wardenik" date="1207798271"][quote author="paulopmx" date="1207796283"][quote author="wardenik" date="1207791929"]Hey, That is cool that you do, but this is almost an inline style. It should not require (it can't!) an inline width specification. CSS is for that and you can set all styles you want in there and CSS is to ensure it is rendered in all browsers the same.[/quote] After the grid is generated you will see that the width property is removed.[/quote] Erm, indeed. but that is not the point ![]() I mean, i don't want to generate styling inside a datamodel because it is not the way it should be done and is pretty pointless. moreover, i can't see any reason for adapting the width automatically. if the user does not like it, he has the CSS for it.[/quote] Ehem. Styling is not the point also ![]() Flexigrid - Lightweight but rich data grid - El Forum - 04-09-2008 [eluser]wardenik[/eluser] Ok then, if it is not for styling, then where is the problem of dropping the declaration and using the header model derived from the table <thead> itself? ![]() |