Hello,
I am initializing my grid with hidden columns inside a helper class:
Columns.Add(new GridColumn { HeaderText = "ViewModelType", Key = "ViewModelType", Hidden = true, Width = "0%" }); Columns.Add(new GridColumn { HeaderText = "DevianceEntityIds", Key = "DevianceEntityIds", Hidden = true, Width = "0%" }); Columns.Add(new GridColumn { HeaderText = "EntityType", Key = "EntityType", Hidden = true, Width = "0%" });
When I try to edit non-hidden cells, I always receive a javascript exception:
Error: Uncaught TypeError: Cannot read property 'template' of undefined
url: http://localhost:60470/Scripts/Infragistics/infragistics.lob.jsline: 135column: 30844error: TypeError: Cannot read property 'template' of undefined
Hello Mohamed,
Thank you for posting in our forums!
I do not have a clear understanding of how you are initializing grid with hidden columns inside a helper class.
The JS file which you sent me is in your localhost (Your machine) so I can’t see it.
To better assist you with this, please attach JS file again which reproduce the issue you are seeing.
Also provide me with the steps to reproduce so I may better understand the issue.
Hello again,I figured out that this problem occurs in combination with Virtualization feature.I have a sample attached for you!When editing any cell the already mentioned error occurs.Due to the hidden column "ID" the "_renderRow" function which the error points to iterates over all visible columns (2 elements) but uses the virtualColumnCount as the last index (which is 3).Please, notice that I have columnVirtualization set to false!Best regards,Mohamed
Thank you for providing me sample code.
I have investigated your issue and able to reproduce it. Now I have asked our engineering staff to examine this further.
I will update you with any new information after the review. You can also continue to send updates to this case at any time.
Hello Mohamed, The script error is thrown in combination with Virtualization feature and hidden field and this issue has already been fixed internally and will be included in the next service release. I have linked this case to Development Issue 212197 so that you will be notified when the service release is available. You can see the service release schedule here:http://es.infragistics.com/support/service-releases
Let me know if you have any questions.