Telerik Grid with FormTemplate

Feb 17, 2011 at 7:26 AM

Hi,

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>&nbsp;
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>

I got below error when edit row in Grid:

A critical error has occurred.
Value cannot be null. Parameter name: expression
Reference : http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx

Thanks !

Coordinator
Feb 18, 2011 at 6:30 PM

Hello,

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: http://xsltdb.codeplex.com/discussions/244743

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.

HTH.