So I just got the latest update and I can no longer make updates. The I try to update my code I get this attached look. I do my updates a bit different so I'd rather just like to know what this is and how to turn it off.
Hello seang,
Thank you for posting in our forums!
Please answer the following questions so I may have a better understanding of this issue:
a.) What is the version and build you are upgrading to? e.g. 13.2.20132.2212
b.) You say you handle updates differently. Could you please provide more details on how you are updating the grid?
c.) When does this popup box appear? During row editing mode, when the grid renders, or some other time?
Looking forward to hearing from you.
a) version 20141.2031
b) not really, I have had many complications dealing with primary keys. Some of your staff is familiar with how I do updates and there are a lot of forum posts about it. In short I have to by pass all the normal events. Like hitting enter after a cell is updated or double clicking to enter update mode. To update cells I use something like this
var text = this.gridIDMap.cellAt( cell.index, cell.rowIndex )
text.innerHTML = ...
c) seems to only happen when I'm editing the primary key column. Maybe its during the call to editCellEnding.
I was hoping you could just tell me what would make that box pop up? Looks like you possibly do not know? Thus I maybe on my own to figure it out here.
Hi seang,
Without being able to reproduce this, I would not know the cause of the box popping up. I tried several methods using the code you provided to edit the innerHTML, and I was unable to reproduce the box popping up. If you have a sample that reproduces it that you can provide for me, I would be able to offer you some more information. If you have any further questions I can assist you with, please let me know.
I think the reason you dont see the problem is because of that primary key thing.
I modified one of your samples. Just double click on any cell and see what I did in the code ( sorry its messy I know ). The second row is the only one that enter edit mode but it does so on the wrong row?
<!DOCTYPE html><html><head> <title></title> <!-- Ignite UI Required Combined CSS Files --> <link href="../../css/themes/infragistics/infragistics.theme.css" rel="stylesheet" /> <link href="../../css/structure/infragistics.css" rel="stylesheet" /> <script src="../js/modernizr.min.js"></script> <script src="../js/jquery.min.js"></script> <script src="../js/jquery-ui.min.js"></script> <!-- Ignite UI Required Combined JavaScript Files --> <script src="../../js/infragistics.core.js"></script> <script src="../../js/infragistics.lob.js"></script></head><body> <table id="grid"></table> <script> //Readey the column data to sort correctly. $( document ).dblclick( function ( e ) { var cell = $( "#grid" ).data( 'igGrid' ).activeCell(); $( "#grid" ).data( 'igGridUpdating' ).startEdit( cell.rowIndex, cell.index, true ); return false; } ); var columns = []; var agc = true;inData = [{"Coolant Temp at Start":"25.4","Delay":"1"},{"Coolant Temp at Start":"25.4","Delay":"1"},{"Coolant Temp at Start":"25.4","Delay":"1"},{"Coolant Temp at Start":"25.4","Delay":"1"},{"Coolant Temp at Start":"25.4","Delay":"1"},{"Coolant Temp at Start":"-40","Delay":"1"}] if ( 1 )//sort for tables { var fr = inData[0], pmin = -2, cmin, rkey, count = 0; agc = false; for ( i in fr ) { count++; cmin = 1000000; $.each( fr, function ( key ) { var keyNumber = key === "_" ? -1 : parseFloat( key ); if ( keyNumber < cmin && keyNumber > pmin ) { cmin = keyNumber; rkey = key; } } ); columns.push( { key: rkey, headerText: rkey, dataType: "string" } );//dont mess with first collumn //columns.push( { key: rkey, headerText: rkey, dataType: "number", format: "000.000###########" } );//ensures 3 but displays more if they exist ); pmin = cmin; } } else //add a data type to all columns for any other types. $.each( inData[0], function ( colName ) { columns.push( { headerText: colName, key: colName, dataType: "string" } ); } ); //presission will be done on the back end. //fix for this primary key stuff for ( i in inData[0] ) { var priK = i; } this.priKey = priK; $(function () { $("#grid").igGrid ( { primaryKey: priKey, height: 600, width: 700, columns: columns, fixedHeaders: true, autoFormat: "mumber", dataSourceType: "array", dataSource: inData, features: [ { name: "Updating", editMode: "none",//no longer use this. enableAddRow: false, enableDeleteRow: false, editCellStarted: function ( evt, ui ) { var input = $( "input.ui-igedit-field" ); setTimeout( function () { //if we have a keypress in the buffer replace the text otherwise delete the input.val( "test" ); input.prop( "selectionStart", input.val().length ).select(); }, 150 ); return false; }, editCellStarting: function ( evt, ui ) { }, editCellEnding: function ( evt, ui ) { return false; }, editCellEnded: function ( evt, ui ) { return false; } }, { name: "Selection", mode: "cell", multipleSelection: true, } ] } ) }); </script> <script src="../data-files/northwind.js"></script></body></html>
Oh sorry forgot to mention this bug seems to be somewhat similar to the left over box problem. I believe they are one in the same.
Thank you for the sample code. The white box that pops up in your sample is the edit input for the cell. I would expect to see this if you are also calling startEdit in your app. I notice the input appears misaligned in your screenshot though. Is this a second input that is appearing other than the editing mode cell? Can you type in it and if so does the grid update any cells afterwards?
After looking into the issue where only the first row enters edit mode, this is being caused by setting the Delay column as the primaryKey. Since these values are all 1 and non-unique, when you call startEdit the grid searches for rows with a data-id attribute (the primary key value for the row) that is equal to the "row" argument that is passed in. When you click the second row, it has a data index of 1, which the grid is using to search for data-ids and it finds all six of these. It then gets the <columnIndex>th td element of the matching row collection and enters edit mode on that cell. This is always the first row due to the primary key being non-unique.
It's actually an interesting coincidence how this works out in the sample because when you click on any other rows, you pass in the current rowIndex such as 0, 1, 2, etc... but there are no primary keys other than 1, so only clicking the second row enters edit mode. If you pass in cell.rowId, this will actually always enter edit mode (but still in the first row).
One solution I found is to let the grid handle entering editMode on a cell itself. What is the reason you have editMode set to "none" in the igGridUpdating feature? When I set this to "cell" editing works just fine through out the grid. Please see my attached sample for a demonstration of this.
I've dug around in some of your older posts to get an idea of the entire situation and although it has been suggested before to create a primary key column and hide it, I see this post is your concern for this suggestion:
http://es.infragistics.com/community/forums/p/80484/422424.aspx#422424
In this thread you say you found a solution, but I do not see it implemented in the sample. Are you still using this resolution?
In response to your concern in the above post, the reason "this.gridIDMap.option("columns").length" returns the total number of columns is because "columns" returns a javascript array of the columns used to create the grid. It has no concern of whether the columns are hidden or not. You can still use this array to check the number of visible columns. Please see the following code example:
var visibleColumns = $.grep(this.gridIDMap.option("columns"), function(column, idx) { return !column.hidden; });
As another solution, if you include a unique primary key column in this sample, handling your double click event should work if you pass in cell.rowId (the primary key) rather than cell.rowIndex to your startEdit call.
If you have any further questions or concerns with this, please let me know.
Can you type in it and if so does the grid update any cells afterwards? -- the system is broken at that state. it accepts text but does not set the fields. It gives me a Error: Permission denied to access property 'nodeType' jquery-1.8.2.js:106
What is the reason you have editMode set to "none" in the igGridUpdating feature-- Mainly I have to band-aid the code to stop primary key issue from accruing.If I let it go further I get primary key issues.
It does seem that every update that comes out something breaks my work arounds. I did make a feature request ( lost the link ) but my guess is that is very low on the todo list for Infragistics.
In this thread you say you found a solution, but I do not see it implemented in the sample. Are you still using this resolution? -- Yeah I use that fix in the example I sent you. Something like
for ( i in inData[0] )//this gets us a the first column it finds. { var priK = i; }
but like everything else it does not hold up well after updates to the grid code. I understand you can not support my work around but I have to keep updating so that I can get bugs fixed. I really wish someone would work with me here and find a permanent solution instead of giving all these work arounds. Though I realize that may not be a viable option.
As another solution, if you include a unique primary key column in this sample, handling your double click event should work if you pass in cell.rowId (the primary key) rather than cell.rowIndex to your startEdit call. -- Right but my primary key is a dummy key, for reasons I have explained in other threads I just can not use a primary key with our grid design. I must find away to ovoid it. Many of your developers on the forums have helped to the point of understanding the issue. They agree, yes your code will not work with a primary key and they proceed to give a work around.
Our request is extremely simple.
We need to see a chart of data and manipulated it based on row and column data. That is it, no more, no DB connection is used, no need for a primary key just a simple grid text change. Once the data is edited and the user likes what they have, a save option will write back to the DB. Though the issue here is that the grid almost mandates a constant connection to a DB and demands the need for a primary key. This is what we are fighting against.
So thus far we have escaped and worked around all the primary key issues and just edited the visual (html) data. Though in this recent update when I update the html as shown above I get errors and broken code.
So if I let the grid handle entering editMode on a cell itself, I get primary key bugs. The second solution I dont quite follow. but if I can pass in another dummy primary key and figure this out programmatically ( another work around ) maybe I can fix the issue.
Also wanted to comment that I get the same issue ( with auto generate off ) when destroying.
this.gridIDMap.destroy(); <--- gives me that error.
Hi Sean,
This appears to be due to jQuery thinking a new element id is going to be provided. Since jQuery uses the '#' to denote a new ID selector for an element, this is causing problems for jQuery.
If you normally define your own columns, this shouldn't be a problem and when AutoGenerateColumns is enabled it makes its best guess for a column name, which in this case includes the #.
I would recommend defining your own columns to avoid this in the future.
change autoGenerateColumns to true and re-run your script.
I dont recall why I had that in there as I do all my column construction now but that seems to cause the error.
Thank you for the information.
I referenced the same script versions as you have with a simple version of the igGrid using your data. I do not receive the error you are seeing, but my rows do not show until the page is resized in IE10. I also run into this issue when the ROW# column is renamed to remove the "#".
I have attached the sample project I used to test this. Please test this project on your PC and let me know what results you are getting. If you are seeing the same results as usual, this indicates either a problem possibly specific to your environment.
If the sample does show the product feature working correctly, or with rows that are hidden until the windows resizes, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
jquery-1.8.2.jsjquery-ui-1.9.1.jsmodernizr-2.5.3.js
infragistics.core.js -- 13.2.20132.2212infragistics.lob.js -- 13.2.20132.2212
The code I had has been changed to fix the bugs discussed here. Though the data going in I provided has not changed. If there is anything you need from my just let me know and ill provided it.