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.
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://es.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}
Hi seang,
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.
So I've been following this thread for a while and I am thoroughly confused. I have no clue what you are trying to do because your screenshot doesn't match the sample JS code you posted and it is littered with errors. Infragistics won't ever admit to this or speak openly about sloppy code but I am not associated with them so I'll speak freely.
- In any development shop whether IT or software, if you upgrade software and encounter issues, you immediately roll it back. You have not stated why you chose to upgrade even if it was necessary for either new functionality or fixes to blocking bugs. That being said, why are you guys upgrading? It seems to be doing more harm than good. Obviously Infragistics wants their customers to upgrade but it is not always a simple task as you've encountered.
- From looking at the screenshot, I presume you are creating a matrix of sorts. Between using ColumnFixing and FixedHeaders you should be able to achieve your end result pretty easily.
- I don't agree with how you are performing your edits. It seems over complicated. Here is what I see:
1. Headers are sorted from lowest to highest.2. 1st row column is sorted from highest to lowest.3. 1st row column is read-only with same styling as header.4. The intersection is the value within the matrix.
I prefer setting the option on the grid to autoCommit: true. This way it will update your data source directly without having to mess with a transaction log. Not only that, you can easily get the values of each row without figuring out which cell was selected.
I can provide samples if you would like to see this implementation.
- The primary key issue is your issue. You introduced it probably for no reason. In most cases, you should not be editing a primary key. Instead, create a (hidden) column in your grid and assign that to your primary key. If you must edit the primary key, then in your data source create another column just for a client side key. That way the grid will not get confused on which row is being edited because the underlying key was changed. To add a new property simple loop through data source and create a new property and assign a number to each row. It's that simple. When you save this back to your database, you simply ignore this field.
I can provide samples on this as well.
- You mentioned that you update cells by getting the innerHTML which is a little absurd. Let the grid handle it unless you are providing additional business logic to the updates.
I can provide a sample on this as well if you like.
- Lastly, your primary question was why is there a box hovering around the grid when you enter edit mode. Honestly, this is a CSS issue. If you are using templates from ThemeRoller, I'd try to update it to a new version. Otherwise I'd use the base theme to see if it goes away before you try anything else. If you made changes to the CSS files from the OLD version of Infragistics, then those were overridden because you upgraded to a new version. Check source control and see if anyone made specific changes to any CSS files before you performed an upgrade. Also use Fiddler to ensure that all files are being loaded correctly and that you aren't experiencing any 404 errors.
We've created some pretty crazy grids here using their Ignite UI. It has handled just about everything we threw at it. I've never created a matrix before but I am certain we would be able to do it pretty easily. I'd be more than happy to help you out if you want. We would just need a bit more information to get that jump started. Its been a month but I'll help to try to get this one solved.
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.