i'm having an issue getting the row edit dialog to pop up Ihave it configured like this, assume i'm doing something wrong. using version 2012.2 I select row then tried F2, doubleclick and enter nothing seems to happen, I looked with firebug an don't see any errors. Note i'm using cakephp framework view to render page below is javascript, the grid populates it just seems row edit functionality not working. any assistants would be appreciated TIA
var ds = null;var jsonp = null;$(document).ready(function () { $.ig.loader({ scriptPath: 'ig/js/', cssPath: 'ig/css/', resources: 'igHierarchicalGrid.*', theme: 'metro' });
var render = function (success, error) { if (success) { var ds = jsonp
} else { alert(error); } };
$.ig.loader(function () { var jsonp = new $.ig.DataSource({ dataSource: "/childcare/api/users.json", datatype: "jsonp", callback: "render", responseDataKey: "User" });
$("#grid1").igHierarchicalGrid({ dataSource: jsonp, dataSourceType: "json", responseDataKey: "User", autoGenerateColumns: false, autoGenerateLayouts: false, width: "100%", initialDataBindDepth: -1, primaryKey: "id", features: [ { name: "Selection", mode: "row", activation: true }, { name: 'Paging', type: 'local', pageSize: 10 }, { name: "Updating", editMode: 'rowedittemplate', enableAddRow: true, enableDeleteRow: true, rowEditDialogWidth: 400, rowEditDialogHeight: 400, rowEditDialogFieldWidth: 150, enableDataDirtyException: true, inherit: true, startEditTriggers: "dblclick,F2,enter", }
], columns: [ { key: "id", headerText: "ID", dataType: "string", width: "130px" }, { key: "username", headerText: "User Name", dataType: "string", width: "130px" }, { key: "password", headerText: "Password", dataType: "string", width: "130px" }, { key: "lastname", headerText: "last name", dataType: "string", width: "130px" }, { key: "phone", headerText: "Phone", dataType: "string", width: "130px" }, { key: "email", headerText: "Email", dataType: "string", width: "130px" }, { key: "role", headerText: "Role", dataType: "string", width: "130px" }, { key: "created", headerText: "Created", dataType: "date", width: "130px" }, { key: "modified", headerText: "Modified", dataType: "date", width: "100px" } ]
}); });});
I changed the java script reference to use CDN and the dialog now pops up, it has fields but they are not populated?
scriptPath: "http://cdn-na.infragistics.com/jquery/20122/latest/js/", cssPath: "http://cdn-na.infragistics.com/jquery/20122/latest/css/", resources: 'igHierarchicalGrid.*', theme: 'metro'
Hi,
The problem with the empty fields is that the record cannot be found by primary key. The type of your primary key column is declared as "string", but it is "number", so change it to "number" in order to make it work.
$(document).ready(function () {}); is not needed when you use Infragistics loader. Loader calls the $.ig.loader(function() {}); when the required JavaScript files are downloaded and parsed and the DOM is loaded.
I see that you're instantiating igHierarchicalGrid, but there is only one layout defined in the grid. Is it on purpose? Maybe you didn't post all the code, so I'm just checking. If you don't use the igHierarchicalGrid functionality then it is better to use igGrid instead.
Hope this helps,
Martin Pavlov
Infragistics, Inc.
Hello,
I have created a private support case CAS-103932-S3V9B6 for you. I would suggest you to upload the sample on that support case.
I hope this helps.
I never got it resolved. I temporally moved on to other parts of project and was going to go back to this with fresh eyes. I believe issue may be with the json format. although everything else in Hgrid seems to work. I noticed in the sample that was sent the json was reformatted. I know I only sent a small sample, I wasn't sure if there were any size restrictions on posts. I can post full json if that will help. sorry for delay Thanks for following up
I am just following up to see if you need any further assistance with this matter.
I was able to see row edit template as well as grid using the sample provided by Martin on Wed, Nov 7 2012 5:34 AM. I have tested the sample on major browser version like IE 9, Firefox 16, and Chrome 22 and it works fine. I would also recommend verifying whether the script and CSS files are not blocked on the machine using IE developer toolbar.
http://www.microsoft.com/en-us/download/details.aspx?id=18359
If the issue is still present I can create a private support case for you and we can look in to this further.
After seeing your example I download jquery.min.js 1.6.2 and jqueryui.min.js 1.8.11 and latest igloader from same cdn's in your example. restarted to make certain nothing was cached. it still doesn't work, i tried with Chrome, Firefox and IE 9. I tried your example on my server where i'm hosting my app and it works. Appears it is my issue, not sure what yet maybe something to do with my json coming from api since it appears to work when json is hardcoded in sample