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_Related Related Topics sp_TopicIcon
Inline row delete button for local data
25/02/2011
14:07
Avatar
lilalfyalien
New Member
Members
Forum Posts: 1
Member Since:
25/02/2011
sp_UserOfflineSmall Offline

Hi,

I am trying to have a little custom delete button for each row. I have tried (every variation I could find / think of):

        $('#emailsGrid')
                .jqGrid(
                        {
                            datatype : "local",
                            colNames : [ 'Email', 'use1', 'use2',
                                    'use3' ],
                            colModel : [ {
                                name : 'email',
                                index : 'email',
                                editable : false,
                                width : 200
                            }, {
                                name : 'use1',
                                index : 'use1',
                                editable : true,
                                edittype : 'checkbox',
                                editoptions : {
                                    value : "True:False"
                                },
                                formatter : "checkbox",
                                formatoptions : {
                                    disabled : false
                                },
                                width : 60
                            }, {
                                name : 'use2',
                                index : 'use2',
                                editable : true,
                                edittype : 'checkbox',
                                editoptions : {
                                    value : "True:False"
                                },
                                formatter : "checkbox",
                                formatoptions : {
                                    disabled : false
                                },
                                width : 60
                            }, {
                                name : 'use3',
                                index : 'use3',
                                editable : true,
                                edittype : 'checkbox',
                                editoptions : {
                                    value : "True:False"
                                },
                                formatter : "checkbox",
                                formatoptions : {
                                    disabled : false
                                },
                                width : 60
                            } ],
                            gridComplete : function() {
                                                                var ids = $('#comz-CMR-emailsGrid').jqGrid(
                                        'getDataIDs');
                                for ( var i = 0; i < ids.length; i++) {
                                    var id = ids[i];
                                    delBut = "<input style='height:22px;width:20px;' type='button' value='E' onclick="$('#comz-CMR-emailsGrid').delRowData('"
                                            + id + "');" />";
                                    $('#emailsGrid').jqGrid(
                                            'setRowData', id, {
                                                act : delBut
                                            });
                                }
                                }
                            },
                            width : 500,
                            height : 100,
                            cellEdit : true,
                            editurl : "server.php"
                        });

But no button ever shows? What have I done wrong?

Thanks,

lilalfyalien

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
19 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