jQWidgets Forums
Forum Replies Created
-
Author
-
Back to this issue which I still have not solved, in your example when I click the print button, I get a “undefined” message in the page, and nothing else, and I still not get the correct order when using json as the source.
August 18, 2017 at 12:55 pm in reply to: Dropdownlists in editor mode Dropdownlists in editor mode #95547Thanks again for the reply, in the mean time I managed to work around this issue by creating a hidden column in the datatable and populating that with the id of the selected dropdown.
However, now I’ve run into a new issue, I’m using both dropdownlists and combobox’s as my editors. In my getEditorValue: function, I return editor.value and editor.text, separated by a “:”. Then in rowEndEdit I am spliting this value and populating the cells appropriately, this works great for dropdownlists, however if I use a combox box, the editor.text value is always empty. Is this value called something different for combobox’s?
August 18, 2017 at 6:03 am in reply to: Dropdownlists in editor mode Dropdownlists in editor mode #95533Thanks for the reply.
The thing you have suggested I am already doing. I guess I do not have a good understanding of how editor mode works with datatable and templated or custom editors. Can you tell me, when a row goes out of edit mode, what happens to each editor (for instance the dropdownlist), is it destroyed? or just hidden? Basically what I’m trying to do is get the value (not text) of the dropdownlist upon a form submission, while only displaying the text of the dropdownlist in the cell it’s self. Otherwise when I select the item in the dropdownlist and the row goes out of edit mode, a number is displayed in the cell, and not the text it’s self. I hope this makes sense, it’s a difficult issue to describe.
August 16, 2017 at 2:06 pm in reply to: Dropdownlists in editor mode Dropdownlists in editor mode #95501I also thought I could maybe store the value in another column that is hidden, however I’m not too sure where to set the hidden columns value, tried setting it in getEditorValue: but that does not work.
Thanks for the quick reply, maybe my description wasn’t quite accurate but I wasn’t sure how else to describe it. What you’ve suggested is exactly what I tried, and while it seemed to make the delay a little quicker, it still did not completely fix the problem.
Thanks for the reply, yes I see that does work, the only difference between my example and this one is that my source is json. It seems to be using the order that the server provides the data in, not the order that the table has been sorted in.
May 11, 2017 at 8:25 am in reply to: Datatable takes a long time to render Datatable takes a long time to render #93481Hi Peter,
Thank you for the quick reply and example, I will continue to troubleshoot and work on sharing a jsfiddle which recreates the issue if I can’t find a fix using your example, cheers.
January 12, 2015 at 8:42 am in reply to: updateBoundData and rowDetails updateBoundData and rowDetails #65245Fixed.
$(document).ready(function () {
var expands = [];var url = “objects.txt”;
// prepare the data
var source =
{
dataType: “json”,
dataFields: [
{ name: ‘cell1’, type: ‘string’ },
{ name: ‘cell2’, type: ‘string’ },
{ name: ‘cell3’, type: ‘string’ },
{ name: ‘cell4’, type: ‘string’ }
],
url: url
};
var dataAdapter = new $.jqx.dataAdapter(source);var initRowDetails = function (id, row, element, rowinfo) {
var tabsdiv = null;
var information = null;
var notes = null;
// update the details height.
rowinfo.detailsHeight = 360;
element.append($(“<div>” + row.cell4 + “</div>”));
tabsdiv = $(element.children()[0]);}
$(“#dataTable”).jqxDataTable(
{
width: ‘100%’,
pageable: false,
rowDetails: true,
pagerButtonsCount: 10,
source: dataAdapter,
columnsResize: true,columns: [
{ text: ‘Aircraft’, dataField: ‘cell1’, width: 170 },
{ text: ‘POB’, dataField: ‘cell2’, width: 300 },
{ text: ‘Schedule and Route’, dataField: ‘cell3’, }
],
ready: function () {
// expand the first details.
//$(“#dataTable”).jqxDataTable(‘showDetails’, 0);
},
initRowDetails: initRowDetails});
$(‘#dataTable’).on(‘bindingComplete’, function (event) {
expands.forEach(function(entry) {
$(“#dataTable”).jqxDataTable(‘showDetails’, entry);
});});
$(‘#dataTable’).on(‘rowExpand’,
function (event)
{
var index = args.index;
expands.push(index);
});$(‘#dataTable’).on(‘rowCollapse’,
function (event)
{
var index = args.index;
for(var i = expands.length – 1; i >= 0; i–) {
if(expands[i] === index) {
expands.splice(i, 1);
}
}
});});
window.setInterval(function() {
$(“#dataTable”).jqxDataTable(‘updateBoundData’);
}, 3000);
-
AuthorPosts