Forum Replies Created
-
Author
-
Thanks Peter! 🙂
I know how to use the ‘initeditor’ callback, but how do I use it with the ‘celldoubleclick’ event?
All sorted, there was a hidden piece of code in a third party plugin that was applying
visibility:visible
to all children of my dialog.Thanks anyway
I have figured out what is happening but I do not know why. The menu’s that I am initiating within my popup are being given a ‘visibility’ of ‘visible’. Is there any reason why this could be happening?
I have achieved this using the ‘cellclassname’ callback function like so:
var cellclass = function(row,column,value,data){ if(typeof data!=='undefined'){ // Determine what styles to apply switch(data.item_type){ case 'C': return 'jqx-grid-cell-alt jqx-grid-cell-alt-'+theme; break; } } };
Is this the best method to achieve this?
Brilliant, thanks very much Peter! 🙂
June 5, 2014 at 11:05 am in reply to: Multiline editors within grid Multiline editors within grid #55412Also, what is the best method to catch a key press for the cell so that I can prevent the
cellendedit
method being called when the Enter key is pressed?June 5, 2014 at 10:56 am in reply to: Multiline editors within grid Multiline editors within grid #55411Think I have sorted it, but just one thing I should probably point out as it may be a typing error…
In the example, the parameters for
initeditor
arefunction(row, cellvalue, editor, celltext, pressedkey)
, but in the docs they arefunction(row, cellvalue, editor, celltext, cellwidth, cellheight)
. Am I missing something?June 5, 2014 at 10:41 am in reply to: Multiline editors within grid Multiline editors within grid #55407Gosh! Its always the small things you miss isn’t it!!! I will have another play. Sorry about that 🙂
June 5, 2014 at 10:33 am in reply to: Multiline editors within grid Multiline editors within grid #55404I have taken a good look at the method you have suggested but what is unclear is how I remove the
editor
instead of applying ajqx
widget to it… I need to remove theinput
and replace it with atextarea
but when I calleditor.remove()
I then get errors later on.From what I can understand thus far:
createeditor: function(parameters...){ // Create the textarea here and replace the editor with the textarea }, initeditor: function(parameters...){ // Place the value of the cell into the textarea } geteditorvalue: function(parameters...){ // Return the value of the textarea }
Whilst the above seems correct, if I call
editor.remove()
theniniteditor
andgeteditorvalue
will not be able to accesseditor
and I will receive errors. Would you be able to advise my algorithm a little better?June 4, 2014 at 1:43 pm in reply to: Multiline editors within grid Multiline editors within grid #55336I will take another look. Thank you Peter
June 4, 2014 at 1:23 pm in reply to: Multiline editors within grid Multiline editors within grid #55332Thank you for your prompt reply! 🙂
I have been referring to this page when writing my script but I found some problems with it which I couldn’t get around… For instance, when I did the following, it just placed a
textarea
within aninput
in the DOM:var textarea= $("<textarea>").prependTo(editor);
and this would result in:
<input jqxstuffhere...> <textarea></textarea> </input>
So with that in mind, I wrote my own method. Are you saying that I can achieve what I would like if I use the methods highlighted on this page?
June 4, 2014 at 8:38 am in reply to: Get Column Index from Createeditor Get Column Index from Createeditor #55308Thanks to another answer I have found within this forum, I was able to fix this issue like so:
$.each(data.columns,function(index,value){ // If the column is a number input then apply the number input editor if(data.columns[index].columntype=='numberinput'){ // Append the relevant column object with the createeditor callback data.columns[index] = $.extend({ createeditor: function(row,cellvalue,editor){ editor.jqxNumberInput({ decimal: cellvalue, inputMode: 'simple', max: 99999999999999999999, min: -99999999999999999999, decimalDigits: data.columns[index].decimal_places, decimalSeparator: data.localization.decimalseparator, digits: 20 }); } },data.columns[index]); } });
Apologies for this thread, very dumb mistake from me. I forgot to put
columntype: 'numberinput'
…All sorted 🙂
Hi Peter,
Thank you for getting back to me. I updated to 3.2.2 thinking that would probably sort it but unfortunately it hasn’t…
When I run
$('#some_grid').jqxGrid('destroy');
, I am still receiving the error: Uncaught TypeError: Cannot read property ‘coord’ of undefined…The ‘destroy’ method succeeds in removing the grid, but it seems to leave the code for the filter popup. So, when I create the grid again, there is duplicate code throughout the DOM (the duplicate code bug is fixed in version 3.2.2, as in, it doesn’t create another
div
as it detects that it is already there)…Would you like me to try and create a jsFiddle as an example of this?
I have looked into this further and it appears that the error only occurs when
filterable:true
is specified. I think this may be the same issue as: http://www.jqwidgets.com/community/topic/maybe-a-bug-in-destroy-method-when-using-filtering/Is there a solution yet?
-
AuthorPosts