jQWidgets Forums
Forum Replies Created
-
Author
-
Checkbox values can’t be used as part of a form submission?
i.e., dataString = jQuery(“#myForm”).serialize();
Thanks, I’ve just emailed you the example.
Thank you. Is there something I can do in the mean time?
I have this all working now (Thanks!) except for one thing, and that’s the filter/sort dropdown menu is too small. It is barely wide enough to contain the word “Ascending” and is only tall enough to And/Or dropdrown menu.
I thought maybe “columnsmenuwidth” was a setting for that, but setting it to something like 100 did nothing.
Yes, my static text works too. I tried to simplify my pasted code too much, initrowdetails still has a lot of the additional column stuff in it, but it still works with my static text so I didn’t paste it in here as it didn’t seem to make a difference.
But my real question is how to debug this so that I can solve these questions myself. Where do I look in Firebug, or elsewhere?
Anyway, here’s the complete code:
$(document).ready(function () { var theme = 'energyblue'; var url = "index.php?module=PSTeams&type=ajax&func=mentormatch&pid=4713"; var source = { datatype: "json", datafields: [ { name: 'PeoplePID'}, { name: 'Username'} ], id: 'PeoplePID', url: url, root: 'data' }; var initrowdetails = function (index) { var tabsdiv = null; var information = null; var notes = null; var bio = null; var availnotes = null; tabsdiv = $.find('.tabs' + index); if (tabsdiv != null) { information = $.find('.information' + index); notes = $.find('.notes' + index); bio = $.find('.bio' + index); availnotes = $.find('.availnotes' + index); var container = $('<div style="margin: 5px"></div>') container.appendTo($(information)); var photocolumn = $('<div style="float: left;width: 15%"></div>'); var leftcolumn = $('<div style="float: left;width: 45%"></div>'); var rightcolumn = $('<div style="float: left;width: 40%"></div>'); container.append(photocolumn); container.append(leftcolumn); container.append(rightcolumn); var datarecord = data[index]; var photo = $("<div style='margin: 10px'><b>Photo:</b></div>"); var image = $("<div style='margin-top: 10px'></div>"); var imgurl = 'images/avatar/' + datarecord.avatar; var img = $('<img src="' + imgurl + '" />'); image.append(img); image.appendTo(photo); photocolumn.append(photo); var firstname = "<div style='margin: 10px'><b>First Name:</b> " + datarecord.firstname + "</div>"; var lastname = "<div style='margin: 10px'><b>Last Name:</b> " + datarecord.lastname + "</div>"; var PeoplePID = "<div style='margin: 10px'><b>PID:</b> <a href="index.php?module=pagesetter&func=viewpub&tid=5&pid=">"+datarecord.PeoplePID+"</a></div>"; var org = "<div style='margin: 10px'><b>Organization:</b> " + datarecord.org + "</div>"; $(leftcolumn).append(firstname); $(leftcolumn).append(lastname); $(leftcolumn).append(PeoplePID); $(leftcolumn).append(org); var availability = "<div style='margin: 10px'><b>Availability:</b> " + datarecord.availability + "</div>"; $(rightcolumn).append(availability); var notescontainer = $('<div style="margin: 5px"><span>' + datarecord.adminnotes + '</span></div>'); var biocontainer = $('<div style="margin: 5px"><span>' + datarecord.bio + '</span></div>'); var availnotescontainer = $('<div style="margin: 5px"><span>' + datarecord.availnotes + '</span></div>'); $(notes).append(notescontainer); $(bio).append(biocontainer); $(availnotes).append(availnotescontainer); $(tabsdiv).jqxTabs({ width: 1100, height: 170, theme: theme }); } } var addfilter = function () { var filtergroup = new $.jqx.filter(); var filter_or_operator = 1; var filtervalue = '1LT'; var filtercondition = 'contains'; var filter1 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition); filtervalue = 'Tuo'; filtercondition = 'starts_with'; var filter2 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition); filtergroup.addfilter(filter_or_operator, filter1); filtergroup.addfilter(filter_or_operator, filter2); // add the filters. $("#jqxmentorgrid").jqxGrid('addfilter', 'Username', filtergroup); // apply the filters. $("#jqxmentorgrid").jqxGrid('applyfilters'); } var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxmentorgrid").jqxGrid( { width: 1200, rowsheight: 30, height: 700, source: dataAdapter, theme: theme, filterable: true, sortable: true, ready: function () { //addfilter(); }, autoshowfiltericon: true, columnsresize: true, rowdetails: true, initrowdetails: initrowdetails, columns: [ { text: 'Username', dataField: 'Username', width: 70 } ] }); // set row details. $("#jqxmentorgrid").jqxGrid('beginupdate'); for (var i = 0; i < data.length; i++) { var details = "<div style='margin: 10px'>DetailsAdmin NotesBioAvail. Notes<div></div><div></div><div></div><div></div></div>"; $("#jqxmentorgrid").jqxGrid('setrowdetails',i, details, 200, true); } $("#jqxmentorgrid").jqxGrid('resumeupdate'); });
Here’s the json-ized output of my query:
[{“PeoplePID”:”1″,”Username”:”1Bbrown”},{“PeoplePID”:”5″,”Username”:”1SRussell”},{“PeoplePID”:”28″,”Username”:”1LTuominen”}]
-
AuthorPosts