Search Results

Search found 14 results on 1 pages for 'flexigrid'.

Page 1/1 | 1 

  • Jquery Flexigrid reload only if flexigrid initially ran

    - by John
    Im trying to use flexigrid to show results using the values from a form. So when a person clicks a form I want it to load the flexigrid function if its the first time the person clicked the button to initialize the table. Then if someone adjusts the values in the form then clicks the button again it then reloads the flexigrid table with the new form values. How can I do this in one function? Right now I have the flexigrid code running on page load, then if they click the button it runs this: <script type="text/javascript"> $(function() { $('#RunReport').click( function() { var report_name = $('input[name=report-name]').val(); var report_cell = $('input[name=report-cell]').val(); var query_url = encodeURI('name=' + report_name + '&cell=' + report_cell); $('#reporting').flexOptions({ url: '/report.php?' + query_url }).flexReload(); }); }); </script> But instead of having it in both functions I wanted it all in one function only running the reload if flexigrid was already initialized. Hope this makes sense, still new at all of this.

    Read the article

  • Add Checkbox column in flexigrid

    - by Ramji
    The issue about jquery flexigrid using php. unfortunately http://flexigrid.info site is down very often so managed to take some sample code from http://sanderkorvemaker.nl/test/flexigrid/ and worked based on that. The above sample code works now I need to create a grid with a column with checkboxes, So that I can click a couple of those checkboxes and click delete button it should get all the id in which the checkboxes are checked to and create a delete query and execute. Can anyone give me an example please Thanks in advance

    Read the article

  • Cant get flexigrid to work in Jquery Tools Tab

    - by John
    Im fairly new to jquery and Im using jquery tools for tabs. I am wanting in one of the tabs to show flexigrid, but when I try to do this flexigrid does not show up, its just blank. If I setup flexigrid in a stand alone page outside the tab it works just fine. Below is the code that isnt working. Again Im new so please go easy! <ul class="css-tabs"> <li><a href="#details">Account Details</a></li> <li><a href="#accounts">Sub Accounts</a></li> <li><a href="#groups">Groups</a></li> <li><a href="#support">Tickets</a></li> </ul> <div class="css-panes"> <div>Tab 1</div> <div><table id="flex1" style="display:none"></table></div> <div>Tab 3</div> <div>Tab 4</div> </div> <script> $(function() { $("ul.css-tabs").tabs("div.css-panes > div").history(); }); $('.flexme1').flexigrid(); $('.flexme2').flexigrid({height:'auto',striped:false}); $("#flex1").flexigrid ( { url: '/accounts_list.php', dataType: 'json', colModel : [ {display: 'ID', name : 'id', width : 45, sortable : true, align: 'center'}, {display: 'Username', name : 'username', width : 120, sortable : true, align: 'left'}, {display: 'Display Name', name : 'displayname', width : 150, sortable : true, align: 'left'}, {display: 'Limit', name : 'accounts', width : 50, sortable : true, align: 'center'}, {display: 'Rate', name : 'charge', width : 50, sortable : true, align: 'center'}, {display: 'Subs', name : 'subcount', width : 50, sortable : true, align: 'center'} ], searchitems : [ {display: 'ID', name : 'id'}, {display: 'Username', name : 'username', isdefault: true}, {display: 'Display Name', name : 'displayname'} ], sortname: "id", sortorder: "desc", usepager: true, singleSelect: true, title: 'Test', useRp: true, rp: 20, showTableToggleBtn: false, width: 500, height: 250 }); </script>

    Read the article

  • Sorting issues in flexigrid with "json" data

    - by John Sieber
    I'm currently using flexigrid to display data in a current project, but am running into issues with its ability to properly sort certain columns that contain dates or numbers. The data is being sent from a ColdFusion CFC that selects the appropriate data and then delivers it in the proper "json" format. As the date/time stamps and other fields containing numbers are sent as "strings" they do not sort properly in the data grid. Is this a limitation of Flexigrid or am I sending the data improperly to Flexigrid? I can provide examples of my code if that is helpful.

    Read the article

  • Using Flexigrid with an xml formatted source how do you specify how the xml is formatted?

    - by stormist
    I have my columns set as follows: colModel : [ {display: 'column1', name : 'column1', width : 200, sortable : true, align: 'center'}, {display: 'column2', name : 'column2', width : 100, sortable : true, align: 'left'}, {display: 'column3', name : 'column3', width : 100, sortable : true, align: 'left'}, {display: 'column4', name : 'column4', width : 300, sortable : true, align: 'left'}, ], I set my data source to a url that returns xml. The xml is like this: <?xml version="1.0"?> <items_list> <item> <column1>BlahBlah</column1> <column2>BlahBlah</column2> <column3>BlahBlah</column3> <column4>BlahBlah</column4> </item> <item> <column1>BlahBlah</column1> <column2>BlahBlah</column2> <column3>BlahBlah</column3> <column4>BlahBlah</column4> </item> </items_list> How can I bind the grid to the xml datasource, it doesn't appear to recognize it as it is?

    Read the article

  • codeigniter with flexgrid

    - by Suj
    I have just downloaded the flexigrid and examples and tried to execute. In the example, there is a function getCountries, which populates the grid with countries from the database… I tried this and it seems the flexigrid just keeps processing (it says processing and turns and turns)... Am i doing anything wrong. ThanX

    Read the article

  • Why is Flexigird not working on IE

    - by Jrubins
    Hi I have a page with a flexigrid on it and it works on FF,Chrome,Opera except IE. it points out that the error is at line of "if(!btn.separator)" which is null or not an object. Well, every thing inside that block is an error on IE cause i think the error is on the "btn" objects.. has anyone ever encountered this error? this is from the latest version of flexigrid for(i=0;i< p.buttons.length;i++){ var btnfor = p.buttons[i]; if(!btn.separator) { //do things here } } Thanks Jrubins

    Read the article

  • Jquery's a FREE grid display

    - by mmcgrail
    I have been using Flesigrid for my CMS and I like it except there are some things I think it could do better like get the column headers from the ajax results rather then in the setup of the flexigrid or having the ability to change the buttons on reload things of that nature. I've been considering a mod of the plugin though I'm not sure i really want to do that. But the question is ... is there something that might be better that I somehow missed when I was looking for grid display ?

    Read the article

  • jQuery Grid Recommendations

    - by Wilco
    What are the most recommended jQuery grid plugins out there? I've been messing around with Flexigrid which seems to be fairly decent. Are there any other noteworthy ones out there I should be looking at?

    Read the article

  • Converting a Linq expression tree that relies on SqlMethods.Like() for use with the Entity Framework

    - by JohnnyO
    I recently switched from using Linq to Sql to the Entity Framework. One of the things that I've been really struggling with is getting a general purpose IQueryable extension method that was built for Linq to Sql to work with the Entity Framework. This extension method has a dependency on the Like() method of SqlMethods, which is Linq to Sql specific. What I really like about this extension method is that it allows me to dynamically construct a Sql Like statement on any object at runtime, by simply passing in a property name (as string) and a query clause (also as string). Such an extension method is very convenient for using grids like flexigrid or jqgrid. Here is the Linq to Sql version (taken from this tutorial: http://www.codeproject.com/KB/aspnet/MVCFlexigrid.aspx): public static IQueryable<T> Like<T>(this IQueryable<T> source, string propertyName, string keyword) { var type = typeof(T); var property = type.GetProperty(propertyName); var parameter = Expression.Parameter(type, "p"); var propertyAccess = Expression.MakeMemberAccess(parameter, property); var constant = Expression.Constant("%" + keyword + "%"); var like = typeof(SqlMethods).GetMethod("Like", new Type[] { typeof(string), typeof(string) }); MethodCallExpression methodExp = Expression.Call(null, like, propertyAccess, constant); Expression<Func<T, bool>> lambda = Expression.Lambda<Func<T, bool>>(methodExp, parameter); return source.Where(lambda); } With this extension method, I can simply do the following: someList.Like("FirstName", "mike"); or anotherList.Like("ProductName", "widget"); Is there an equivalent way to do this with Entity Framework? Thanks in advance.

    Read the article

  • Building a jQuery Plug-in to make an HTML Table scrollable

    - by Rick Strahl
    Today I got a call from a customer and we were looking over an older application that uses a lot of tables to display financial and other assorted data. The application is mostly meta-data driven with lots of layout formatting automatically driven through meta data rather than through explicit hand coded HTML layouts. One of the problems in this apps are tables that display a non-fixed amount of data. The users of this app don't want to use paging to see more data, but instead want to display overflow data using a scrollbar. Many of the forms are very densely populated, often with multiple data tables that display a few rows of data in the UI at the most. This sort of layout does not lend itself well to paging, but works much better with scrollable data. Unfortunately scrollable tables are not easily created. HTML Tables are mangy beasts as anybody who's done any sort of Web development knows. Tables are finicky when it comes to styling and layout, and they have many funky quirks, especially when it comes to scrolling both of the table rows themselves or even the child columns. There's no built-in way to make tables scroll and to lock headers while you do, and while you can embed a table (or anything really) into a scrolling div with something like this: <div style="position:relative; overflow: hidden; overflow-y: scroll; height: 200px; width: 400px;"> <table id="table" style="width: 100%" class="blackborder" > <thead> <tr class="gridheader"> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th >Column 4</th> </tr> </thead> <tbody> <tr> <td>Column 1 Content</td> <td>Column 2 Content</td> <td>Column 3 Content</td> <td>Column 4 Content</td> </tr> <tr> <td>Column 1 Content</td> <td>Column 2 Content</td> <td>Column 3 Content</td> <td>Column 4 Content</td> </tr> … </tbody> </table> </div> </div> that won't give a very satisfying visual experience: Both the header and body scroll which looks odd. You lose context as soon as the header scrolls off the top and when you reach the bottom of the list the bottom outline of the table shows which also looks off. The the side bar shows all the way down the length of the table yet another visual miscue. In a pinch this will work, but it's ugly. What's out there? Before we go further here you should know that there are a few capable grid plug-ins out there already. Among them: Flexigrid (can work of any table as well as with AJAX data) jQuery Scrollable Table Plug-in (feature similar to what I need but not quite) jqGrid (mostly an Ajax Grid which is very powerful and works very well) But in the end none of them fit the bill of what I needed in this situation. All of these require custom CSS and some of them are fairly complex to restyle. Others are AJAX only or work better with AJAX loaded data. However, I need to actually try (as much as possible) to maintain the original styling of the tables without requiring extensive re-styling. Building the makeTableScrollable() Plug-in To make a table scrollable requires rearranging the table a bit. In the plug-in I built I create two <div> tags and split the table into two: one for the table header and one for the table body. The bottom <div> tag then contains only the table's row data and can be scrolled while the header stays fixed. Using jQuery the basic idea is pretty simple: You create the divs, copy the original table into the bottom, then clone the table, clear all content append the <thead> section, into new table and then copy that table into the second header <div>. Easy as pie, right? Unfortunately it's a bit more complicated than that as it's tricky to get the width of the table right to account for the scrollbar (by adding a small column) and making sure the borders properly line up for the two tables. A lot of style settings have to be made to ensure the table is a fixed size, to remove and reattach borders, to add extra space to allow for the scrollbar and so forth. The end result of my plug-in is a table with a scrollbar. Using the same table I used earlier the result looks like this: To create it, I use the following jQuery plug-in logic to select my table and run the makeTableScrollable() plug-in against the selector: $("#table").makeTableScrollable( { cssClass:"blackborder"} ); Without much further ado, here's the short code for the plug-in: (function ($) { $.fn.makeTableScrollable = function (options) { return this.each(function () { var $table = $(this); var opt = { // height of the table height: "250px", // right padding added to support the scrollbar rightPadding: "10px", // cssclass used for the wrapper div cssClass: "" } $.extend(opt, options); var $thead = $table.find("thead"); var $ths = $thead.find("th"); var id = $table.attr("id"); var cssClass = $table.attr("class"); if (!id) id = "_table_" + new Date().getMilliseconds().ToString(); $table.width("+=" + opt.rightPadding); $table.css("border-width", 0); // add a column to all rows of the table var first = true; $table.find("tr").each(function () { var row = $(this); if (first) { row.append($("<th>").width(opt.rightPadding)); first = false; } else row.append($("<td>").width(opt.rightPadding)); }); // force full sizing on each of the th elemnts $ths.each(function () { var $th = $(this); $th.css("width", $th.width()); }); // Create the table wrapper div var $tblDiv = $("<div>").css({ position: "relative", overflow: "hidden", overflowY: "scroll" }) .addClass(opt.cssClass); var width = $table.width(); $tblDiv.width(width).height(opt.height) .attr("id", id + "_wrapper") .css("border-top", "none"); // Insert before $tblDiv $tblDiv.insertBefore($table); // then move the table into it $table.appendTo($tblDiv); // Clone the div for header var $hdDiv = $tblDiv.clone(); $hdDiv.empty(); var width = $table.width(); $hdDiv.attr("style", "") .css("border-bottom", "none") .width(width) .attr("id", id + "_wrapper_header"); // create a copy of the table and remove all children var $newTable = $($table).clone(); $newTable.empty() .attr("id", $table.attr("id") + "_header"); $thead.appendTo($newTable); $hdDiv.insertBefore($tblDiv); $newTable.appendTo($hdDiv); $table.css("border-width", 0); }); } })(jQuery); Oh sweet spaghetti code :-) The code starts out by dealing the parameters that can be passed in the options object map: height The height of the full table/structure. The height of the outside wrapper container. Defaults to 200px. rightPadding The padding that is added to the right of the table to account for the scrollbar. Creates a column of this width and injects it into the table. If too small the rightmost column might get truncated. if too large the empty column might show. cssClass The CSS class of the wrapping container that appears to wrap the table. If you want a border around your table this class should probably provide it since the plug-in removes the table border. The rest of the code is obtuse, but pretty straight forward. It starts by creating a new column in the table to accommodate the width of the scrollbar and avoid clipping of text in the rightmost column. The width of the columns is explicitly set in the header elements to force the size of the table to be fixed and to provide the same sizing when the THEAD section is moved to a new copied table later. The table wrapper div is created, formatted and the table is moved into it. The new wrapper div is cloned for the header wrapper and configured. Finally the actual table is cloned and cleared of all elements. The original table's THEAD section is then moved into the new table. At last the new table is added to the header <div>, and the header <div> is inserted before the table wrapper <div>. I'm always amazed how easy jQuery makes it to do this sort of re-arranging, and given of what's happening the amount of code is rather small. Disclaimer: Your mileage may vary A word of warning: I make no guarantees about the code above. It's a first cut and I provided this here mainly to demonstrate the concepts of decomposing and reassembling an HTML layout :-) which jQuery makes so nice and easy. I tested this component against the typical scenarios we plan on using it for which are tables that use a few well known styles (or no styling at all). I suspect if you have complex styling on your <table> tag that things might not go so well. If you plan on using this plug-in you might want to minimize your styling of the table tag and defer any border formatting using the class passed in via the cssClass parameter, which ends up on the two wrapper div's that wrap the header and body rows. There's also no explicit support for footers. I rarely if ever use footers (when not using paging that is), so I didn't feel the need to add footer support. However, if you need that it's not difficult to add - the logic is the same as adding the header. The plug-in relies on a well-formatted table that has THEAD and TBODY sections along with TH tags in the header. Note that ASP.NET WebForm DataGrids and GridViews by default do not generate well-formatted table HTML. You can look at my Adding proper THEAD sections to a GridView post for more info on how to get a GridView to render properly. The plug-in has no dependencies other than jQuery. Even with the limitations in mind I hope this might be useful to some of you. I know I've already identified a number of places in my own existing applications where I will be plugging this in almost immediately. Resources Download Sample and Plug-in code Latest version in the West Wind Web & AJAX Toolkit Repository © Rick Strahl, West Wind Technologies, 2005-2011Posted in jQuery  HTML  ASP.NET  

    Read the article

1