Forum

May 22nd, 2014
A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

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

Topic RSS
loadComplete function
27/10/2008
17:16
pat
Member
Forum Posts: 9
Member Since:
14/10/2008
Offline

This works …
loadComplete: function() {
    $.each(colNames2, function(i,k) { $("#"+ctab).setCell("0", k, "", {'font-weight':'bold'}); });
}

But this …
loadComplete: setBold(ctab, colNames1)

function setBold(grd, nameArr) {
    $.each(nameArr, function(i,k) { $("#"+grd).setCell("0", k, "", {'font-weight':'bold'}); });
};

fails because the $t.grid object doesn't exist in the setCell function. Is there a way to get this setBold function to work?

27/10/2008
17:27
digitalspaghetti
Member
Forum Posts: 7
Member Since:
25/10/2008
Offline

In your case, you need to do an anonymous function, like this:

loadComplete: function() {
    setBold(ctab, colNames1);
}

That should for you, however on the same function – my function is failing, and I don't know why:

'loadComplete': function() {
            var row_ids = jQuery("#campaigns-list").getDataIDs();
            jQuery.each(row_ids, function(i, row_id){
                var output = [];
                output.push('<a href="#" rel="'+row_id+'" class="campaign-button-edit">edit</a>');
                output.push('<a href="#" rel="'+row_id+'" class="campaign-button-delete">delete</a>');
                jQuery("#campaigns-list").setRowData(row_id, {
                    'actions':output.join('')
                    }
                );
            });

}

In my function I can see the row_id when i output it to firebug, however nothing appears in the column, except the column header – and I only get 5 columns back, when I should be getting 6 (the actions being missing).

Any ideas folks?

27/10/2008
18:29
digitalspaghetti
Member
Forum Posts: 7
Member Since:
25/10/2008
Offline

NM, I managed to fix it by passing a null value in the returned array of row values from PHP

Forum Timezone: Europe/Sofia

Most Users Ever Online: 215

Currently Online: poff
92 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1214

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11194

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10397

Posts: 30722

Newest Members: SathishSakthi, DGS, sunilkatta99, Surendra Rayapati, rize, Jamil1234

Moderators: tony (7516), Rumen[Trirand] (81)

Administrators: admin (61)

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information