Hi,
I was checking this different times, but I am not able to understand this error...I set igUpdating with GridEditMode.RowEditTemplate and all works fine. I would like to introduce RowEditDialogRowTemplateID, but when the dialog starts rendering the browser stops and give me an error on infragistics.templating.js, Row 22 Character 75...something like "impossible to obtain property 'replace' value: object null or not defined"...Do you think I missed some .js file? Or I did a wrong consideration about RowEditDialogRowTemplateID??
Thanks
Flavio
Damn! I had to know it!!It works fine now...Thank you very much,Flavio
Hello Flavio,
Thank you for getting back to us.
The issue that you experience is because list of blocks are not supported by the templating engine.
http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.2/CLR4.0/html/igTemplating%20Overview.html#_Ref317270044
You should use nested blocks or define it in a single one. For example your code snippet should look like this :
rowEditDialogRowTemplate: "<tr> {{if ${headerText} === 'Make Flag'}}
<td> D </td><td data-key='${dataKey}'><input type='checkbox' /></td>
{{else}}
<td> ${headerText} </td><td data-key='${dataKey}'><input readOnly='true' /></td>
{{/if}}</tr>",
Hope this helps.
You're right: RowEditDialogRowTemplate is the best choice.Although I am not able to completely use it...This is my code, by controller side:
GridUpdating updating = new GridUpdating(); updating.EnableAddRow = true; updating.StartEditTriggers = GridStartEditTriggers.F2; updating.EditMode = GridEditMode.RowEditTemplate; updating.RowEditDialogRowTemplate = "<tr>" + "<td>" + "{{if ${headerText} =='Description'}} <label>D</label>" + "{{else}} <label>${headerText}</label> {{/if}}" + "</td>" + "<td data-key='${dataKey}'>" + //"{{if ${headerText} =='Description'}} <input type='text' />" + //"{{else}} <input /> {{/if}}" + "</td></tr>"; updating.RowEditDialogContainment = "owner"; updating.ShowReadonlyEditors = false; updating.Validation = true;
Look at the bold code. If I comment it, all seems to work, in the sense that the label "D" is rendered well, in respect of the if-condition.If I uncomment it, I get an error:[10:01:02.707] TypeError: this.directives[k[1]] is undefined @ http://localhost:61466/Scripts/IG/modules/infragistics.templating.js:22
the first time I press F2, while next times I get this one:[10:03:00.036] TypeError: b is undefined @ http://localhost:61466/Scripts/IG/modules/infragistics.templating.js:22
by firefox side. In Internet Explorer I get the same:SCRIPT5007: Impossible to get 'start' property value: object is null or not definedinfragistics.templating.js, Riga 22 Carattere 4631
What am I doing wrong?
Thank you for your update.
rowEditDialogRowTemplate property is better choice in this scenario.
Please take a look at the help documentation
http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.2/CLR4.0/html/igGrid_Updating_RowEditTemplate.html#_Toc335653829
Thanks Tsvetelina,
I solve out. I think the application was not able to find the template I defined, because I set a wrong one...But now I am not so sure that this RowEditDialogRowTemplateID is what I would like to have...I see that I can define ${headerText} or ${dataKey}, but my question is: is it possible to select detailed fields? For example, I need to change font only to the Id field, while the text editor description field has to be filled with a color and other different cases...Is there a syntax to get every single field, and defining template in the text/x-jquery-tmpl template?