Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
tableToGrid with colModel option empties the table.
29/09/2011
12:45
Avatar
blan
New Member
Members
Forum Posts: 1
Member Since:
29/09/2011
sp_UserOfflineSmall Offline

Hello,

When i use tableToGrid with the colModel option, my table always become empty.

An example of code is :

    <table id="myTable">
        <tr>
            <th>Col1</th>
            <th>Col2</th>
        </tr>
        <tbody>
            <tr>
                <td>Value1</td>
                <td>Value2</td>
            </tr>
        </tbody>
    </table>

    <script type="text/javascript">
        tableToGrid("#myTable", {
            height:'100%',
            colModel : [ {name:'c1', index:'c1'}, {name:'c2', index:'c2'}]
        });
    </script>

The content of the cells ('Value1' and 'Value2') has disappeared.

If i remove the colModel option, everything works fine.

Thank you for the help.

28/10/2011
04:32
Avatar
derek
Member
Members
Forum Posts: 5
Member Since:
17/08/2011
sp_UserOfflineSmall Offline

This place is abuzz with activity.  I am sure your question will be answered with a lot of speed.

Probably after you are fired.

02/11/2011
23:14
Avatar
RustedBucket
Member
Members
Forum Posts: 8
Member Since:
24/09/2011
sp_UserOfflineSmall Offline

You need to use the unminified version of tabletogrid.js there's a apparently a bug in the minified version.

05/03/2012
04:52
Avatar
helpse
New Member
Members
Forum Posts: 1
Member Since:
05/03/2012
sp_UserOfflineSmall Offline

I have the same problem, but it doesn't work either with the full or the minimalistic version of jqgrid. Any1 knows how to solve this problem, what lines of the code should i modify?

13/09/2012
18:24
Avatar
Maxxon
New Member
Members
Forum Posts: 1
Member Since:
13/09/2012
sp_UserOfflineSmall Offline

It happened the same to me.

Here is the solution:

<table id="myTable">
        <tr>
            <th id="idCol1">Col1</th>
            <th id="idCol2">Col2</th>
        </tr>
        <tbody>
            <tr>
                <td>Value1</td>
                <td>Value2</td>
            </tr>
        </tbody>
    </table>

    <script type="text/javascript">
        tableToGrid("#myTable", {
            height:'100%',
            colModel : [ {name:'idCol1', index:'idCol1'}, {name:'idCol2', index:'idCol2'}]
        });
    </script>

14/09/2012
14:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You do not need to set the colModel in this case (when a id is set th the th tag)

Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information