views:

66

answers:

1

I trying to use this plugin for jquery which seems perfect for what I am being asked to do to do.

http://flexigrid.info/

Now what I'm working with is an HTML table, and I don't have the ability to change it. The above site has three examples. The first two seem to apply the flex grid to existing tables, which is what I need, but they do not have the sorting option.

This is the code given for the first:

$('.flexme').flexigrid();

with the html table being:

<table class="flexme">
<thead>
        <tr>
            <th width="100">Col 1</th>
            <th width="100">Col 2</th>
            <th width="100">Col 3 is a long header name</th>
            <th width="300">Col 4</th>
        </tr>
</thead>
<tbody>
        <tr>
            <td>This is data 1 with overflowing content</td>
            <td>This is data 2</td>
            <td>This is data 3</td>
            <td>This is data 4</td>
        </tr>

</tbody>

and I thought I could simply add the following:

{sortable : true}

ending up with:

$('.flexme').flexigrid( {sortable : true});

But this does not work.

Anyone have any experience with this plug-in, know how I should do this?

A: 

I don't use flexigrid personally, but on the http://flexigrid.info/ you can see 1.0b3 Released 14 July 2008. Is it really needed to use so old product?

Try to use jqGrid. It has also tableToGrid function which can be interesting for you to start working with jqGrid. Look at demo to see what can jqGrid and which code do you need to write.

Oleg