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,
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.
That is just how it was explained to me. The issue we have is that updating our grids by a primary key is no good because our columns dont always have unique numbers.
Correct The hidden column didn't work because of the counts. Sometimes functions count total columns as 3 and some as 2 ( 0 as first ). I tried every work around suggested and I always hit a wall of some kind.
So I gather you're suggesting I once again try the hidden column? The issue that we run in to is that its not always immediately obvious what problems are in the way. So I guess its best to leave this topic open and not close it right off.
Adding the primary key columns and hiding it: Error bug log.
1) Is there any way to hie the column chooser ? I tried $(".selector").igGridHiding("hideColumnChooser"); but tha didnt work. So far the only way to do it is by applying allowHiding: false to each column.
$(
".selector"
).igGridHiding(
"hideColumnChooser"
);
2) I get this error "Error: Syntax error, unrecognized expression: #myDiv0_table_featureChooser_dd_ROW# jquery-1.8.2.js:4679" I was hopping you could give me an idea what may have caused it, I can't seem to narrow this one down. The error is thrown during the igGrid( {...}) section I believe.
If I comment this out it works.
{ name: "Hiding", columnSettings: [ { columnKey: PRIKEY, allowHiding: false, hidden: true }, ] },
this is the table data
myDiv0_table is part of my header.
471830.1 is my primary key
[{"AM":"12.13","ROW#":"4.99999","471830.1":0},{"AM":"6.78","ROW#":"4","471830.1":1},{"AM":"3.78","ROW#":"3","471830.1":2},{"AM":"2.11","ROW#":"2","471830.1":3},{"AM":"1.18","ROW#":"1","471830.1":4},{"AM":"0.66","ROW#":"0","471830.1":5}]
3) getting that nasty rec type error again... When I do a set cell idUpdating.setCellValue( cells[c].rowIndex, cells[c].columnKey, "3" ) I get TypeError: rec is null. I tried to alert (INSTANCE.gridIDMap.option("primaryKey" )); just before that line and the PK is good. The last time I got this error support concluded it was a fault primary key but now I'm using a primary key.old issue: http://ko.infragistics.com/community/forums/p/84982/430958.aspxcould anything else cause this error. If you need to see more code ill put it in a new post on this thread so I dont make a mess of this post.
IE says this
{origRec=this.findRecordByKey(t.rowId,origDs)}}if(t.type==="cell"){rec[t.col]=t.value;if(origRec)
{exception} Unable to set property 'Coolant Temp at Start' of undefined or null reference
'Coolant Temp at Start' is the column I'm trying to modify in.
DEBUGrec=this.findRecordByKey(t.rowId); = null but the data going in to findRecordByKey is good. Not sure why it returns null?
SO if I trace in to the function I get to the issue here
data[i][search]===key // fails because search is undefined.
search uses findRecordByKey
//this function fails because len is undefined. len failed because data is undefined and I have no idea why data is undefined.
findRecordByKey:function(key,ds)
{
var i,data=ds||this._data ,len=data?data.length:0 ,search=len>0&&$.isArray(data[0])?this._lookupPkIndex():this.settings.primaryKey;
for(i=0;i<len;i++){if(data[i][search]===key){return data[i]}}return null}
For the first issue, the hideColumnChooser method will hide the actual column chooser dialog. If you are referring to the icons in the header, you will need to set the allowHiding options in each columnSettings. For more information on the ColumnHiding feature, please see our documentation here:
http://help.infragistics.com/doc/jQuery/2014.1/CLR4.0/?page=igGrid_Hiding_Column_Chooser.html
Your other issues will take a little more time to look into. I will have another update for you by Monday with more information.
thx Michael, thanks for the info.
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.