Telerik Grid with FormTemplate

Feb 17, 2011 at 7:26 AM


Please help me check "Container" to show INSERT or UPDATE buttons

<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"

I got below error when edit row in Grid:

A critical error has occurred.
Value cannot be null. Parameter name: expression
Reference :

Thanks !

Feb 18, 2011 at 6:30 PM


XsltDb does not allow expressions that must be compiled. So you must put you code in ascx file and referemce it within XsltDb. Please, review the following discussion for a sample:

In other words XsltDb allows you to put ASP.NET control on the page and assign properties using current DNN/ASP.NET context. So you must always prefer creating user controls or web controls instead of creating complex ASP.NET code inside XsltDb configuration.