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,
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://ko.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.
I am currently discussing this with my supervisor for further guidance on this issue.
I will have more information for you by Thursday.
Ok, looking forward to a resolution.
I am not sure where you are getting the idea that the grid requires a constant DB connection when using a primary key. The primary key is required to edit the grid, however, the primary key is not required on any DB you are using the grid with, if that's what you are concerned about. A dummy key can be injected into the client side datasource and then you can push whatever required data to the server that you need, when you need it. This remains true with or without using a primary key. The primaryKey for the igGrid is used as an identifier so the client side operations know which row to process. Using one in the igGrid does not require any need of a connection to a DB.
As I mentioned in my earlier update, the inconsistency between the lengths of the columns collection which includes the hidden columns is the nature of javascript's arrays. The column exists whether it is hidden or not and the grid needs to know this. My suggested code will provide you with an array of only visible columns for where you need to reference them.
Since this would resolve the inconsistencies as you mention here, is there some other reason you would not be able to switch back to using the hidden column primary key? I have attached a sample that uses a hidden column for a primary key so the igGridUpdating feature works as expected and I also implement my visible column collection into a function for easy use. Without any more detail regarding what issues you are running into when including a primary key, I cannot offer much more advise as this is how the grid is designed to be used and including a primary key is the recommended solution.
If you still have any questions or concerns with this, please let me know.
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.